grafana-entity-sql

command module
v0.0.0-...-60727b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

README

Grafana Setup

git fetch && git checkout toddtreece/entity-grpc-server

grafana.ini config:

[feature_toggles]
grpcServer = true
topnav = true
panelTitleSearch = true
storage = true
export = true
dashboardsFromStorage = true

Running the server

You will need to create a service account with an ADMIN role, and generate a new token. Copy the token, and set the GRAFANA_SERVICE_ACCOUNT_TOKEN env var before running the next command.

go run . -token $GRAFANA_SERVICE_ACCOUNT_TOKEN

You should then be able to connect to it using the mysql cli:

mysql -h localhost --protocol tcp grafana

Example query that will run against the devenv/dev-dashboards path:

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select JSON_EXTRACT(payload, "$.title") as title from dashboards;
+------------------------------------------+
| title                                    |
+------------------------------------------+
| "Datasource tests - Postgres"            |
| "Datasource tests - Postgres (unittest)" |
+------------------------------------------+
2 rows in set (0.01 sec)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL