A simple cli utility for importing or exporting dashboard json definitions using the Grafana HTTP API.

Overview

grafana-dashboard-manager

CodeQL

A simple cli utility for importing or exporting dashboard json definitions using the Grafana HTTP API.

This may be useful for:

  • Backing up your dashboards that already exist within your Grafana instance, e.g. if you are migrating from the internal sqlite database to MySQL.
  • Updating dashboard files for your Infrastructure-as-Code, for use with Grafana dashboard provisioning.
  • Making tweaks to dashboard JSON files directly and updating Grafana with one command.

Notable features:

  • Mirrors the folder structure between a local set of dashboards and Grafana, creating folders where necessary.
  • Ensures links to dashboards folders in a dashlist Panel are consistent with the Folder IDs - useful for deploying one set of dashboards across mulitple Grafana instances, e.g. for dev, test, prod environments.

Workflow

The intended development process is:

  1. Develop existing dashboard, or create a new one and save it in the web UI.
  2. Ensure the dashboard is in the desired folder.
  3. Use grafana-dashboard-manager to extract the new dashboards and save them to a local directory.
  4. Dashboards can be created/updated from the local directory back into Grafana.

Usage

Installation

Dependencies are managed with poetry.

Install from pypi:

$ poetry run pip install grafana-dashboard-manager

Install from source

$ cd /path/to/grafana-dashboard-manager
$ poetry install

Note that the admin login user and password are required, and its selected organization is correct.

See the full help text with poetry run grafana-dashboard-manager --help

Download dashboards from web to solution-data

poetry run grafana-dashboard-manager \
    --host https://my.grafana.com \
    --username admin --password mypassword \
    download all \
    --destination-dir /path/to/dashboards/

Upload dashboards from solution-data to web

poetry run grafana-dashboard-manager \
    --host https://my.grafana.com \
    --username admin --password mypassword \
    upload all \
    --source-dir /path/to/dashboards/

N.B. if your Grafana is not at port 80/443 as indicated by the protocol prefix, the port needs to be specified as part of the --host argument, e.g. for a locally hosted instance on port 3000: --host http://localhost:3000

Limitations

  • The home dashboard new deployment needs the default home dashboard to be manually set in the web UI, as the API to set the organisation default dashboard seems to be broken, at least on v8.2.3.

  • Currently expects a hardcoded 'home.json' dashboard to set as the home.

  • Does not handle upload of dashboards more deeply nested than Grafana supports.

  • Does not support multi-organization deployments

Owner
Beam Connectivity
Beam Connectivity
Seamlessly run Python code in IPython from Vim

Seamlessly run Python code from Vim in IPython, including executing individual code cells similar to Jupyter notebooks and MATLAB. This plugin also supports other languages and REPLs such as Julia.

Hans Chen 269 Dec 20, 2022
Runs a command in P4wnP1 and displays the output on OLED screen (SH1106)

p4wnp1-oled-terminal Runs a command in P4wnP1 and displays the output on OLED screen (SH1106) Works on Raspberry Pi Zero 2 W Tested successfully on RP

PawnSolo 1 Dec 14, 2021
Package installer for python

This is a package that adds a JSON file to your project that records all of the packages used in it and allows people to install it with a single command.

Anmol Malik 1 May 23, 2022
Commandline script to interact with volkswagencarnet library

volkswagencarnet-client command line script to interact with volkswagencarnet library Table of Contents General Info Setup Usage Example Acknowledgeme

3 Jan 19, 2022
🖍️This is a feature-complete clone of the awesome Chalk (JavaScript) library.

Terminal string styling done right This is a feature-complete clone of the awesome Chalk (JavaScript) library. All credits go to Sindre Sorhus. Highli

Fabian Keller 132 Dec 27, 2022
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.

mycli A command line client for MySQL that can do auto-completion and syntax highlighting. HomePage: http://mycli.net Documentation: http://mycli.net/

dbcli 10.7k Jan 07, 2023
A simple note taker CLI program written in python

note-taker A simple note taker program written in python This allows you to snip your todo's, notes, and your tasks easily without extra charges Requi

marcusz 4 Nov 02, 2021
A command line utility to export Google Keep notes to markdown.

Keep-Exporter A command line utility to export Google Keep notes to markdown files with metadata stored as a frontmatter header. Supports exporting: S

Nathan Beals 85 Dec 17, 2022
Regis-ltmpt-auto - Program register ltmpt 2022 automatis

LTMPT Register Otomatis 2022 Program register ltmpt 2022 automatis dibuat untuk

1 Jan 13, 2022
Standalone Tailwind CSS CLI, installable via pip

Standalone Tailwind CSS CLI, installable via pip Use Tailwind CSS without Node.j

Tim Kamanin 144 Dec 22, 2022
A CLI for advanced management of your notes with simple commands

PyNoteManager This is a CLI for advanced management of your notes with simple co

3 Dec 30, 2021
Dart Version Manager CLI implemented with Python and Typer.

Dart Version Manager Dart Version Manager CLI implemented with Python and Typer Usage: $ dvm [OPTIONS] COMMAND [ARGS]... Options: --install-completion

EducUp 6 Jun 26, 2022
A simple script to make the operation of AltServer-Linux more easier with cli

A simple script to make the operation of AltServer-Linux more easier with cli

powen 23 Dec 13, 2022
CLI/GUI Math commands based on python 3

PyMath Commands Syntax Installation Commands: pymath add: usage: pymath add 12.5 12.5 sub: usage: pymath sub 25 12.5 div: usage: pymath div 144 12 mul

eggsnham07 0 Nov 22, 2021
Kubernetes shell: An integrated shell for working with the Kubernetes

kube-shell Kube-shell: An integrated shell for working with the Kubernetes CLI Under the hood kube-shell still calls kubectl. Kube-shell aims to provi

CloudNative Labs 2.2k Jan 08, 2023
Voidlx is a terminal cli apps launcher made in python

Voidlx is a terminal cli apps launcher made in python

2 Nov 13, 2021
A command line tool that creates a super timeline from SentinelOne's Deep Visibility data

S1SuperTimeline A command line tool that creates a super timeline from SentinelOne's Deep Visibility data What does it do? The script accepts a S1QL q

Juan Ortega 2 Feb 08, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

14 Sep 11, 2022
A minimalist Vim plugin manager.

A minimalist Vim plugin manager. Pros. Easy to set up: Single file. No boilerplate code required. Easy to use: Concise, intuitive syntax Super-fast pa

Junegunn Choi 30.2k Jan 08, 2023
A command line tool to create a graph representing your Ansible playbook tasks and roles

Ansible Playbook Grapher ansible-playbook-grapher is a command line tool to create a graph representing your Ansible playbook plays, tasks and roles.

Mohamed El Mouctar Haidara 424 Dec 20, 2022