grafana-api

How to copy dashboard to other organisations in Grafana

痞子三分冷 提交于 2021-01-05 09:29:07
问题 I'm using Grafana to show some data. I have 20 organisations and they all use the same dashboards (Dash1, Dash2, Dash3). Thus I can use the same json data for all dashboards in all organisations. But I do not want to update it manually every time when I change something, thus I'm trying to create a python script which will do it for me. I run the script as follows: python update_dashboards.py Dash1 The python code is as follows: try: dashboard_name = sys.argv[1] response = settings.get

How to use request parameter value in Grafana query string

ぃ、小莉子 提交于 2020-04-10 06:48:10
问题 I am using Grafana and my URL string is like: http://servername:3000/dashboard/db/dashboard?refresh=10s&node=hanoi How can i use the value of node i.e. "hanoi" in my Grafana Query string. SELECT count("value") FROM "autogen"."sensor" WHERE "system_id" = 'hanoi' AND $timeFilter GROUP BY time(1m) fill(null) Above 'hard coded' query for 'hanoi' is working fine, but i want to use node value passed as request parameter in my where clause of query string. I can see that refresh value i.e. 10s is

How to use request parameter value in Grafana query string

允我心安 提交于 2020-04-10 06:47:08
问题 I am using Grafana and my URL string is like: http://servername:3000/dashboard/db/dashboard?refresh=10s&node=hanoi How can i use the value of node i.e. "hanoi" in my Grafana Query string. SELECT count("value") FROM "autogen"."sensor" WHERE "system_id" = 'hanoi' AND $timeFilter GROUP BY time(1m) fill(null) Above 'hard coded' query for 'hanoi' is working fine, but i want to use node value passed as request parameter in my where clause of query string. I can see that refresh value i.e. 10s is

Automatic Authentication using Grafana API

一笑奈何 提交于 2019-12-28 19:27:09
问题 In my web application, I want to provide the ability to pass authenticated users from my dashboard across to Grafana. Once a user logged in my dashboard using credentials, a link to Grafana Dashboard will be displayed on my application. When user clicks that link, he/she will be redirected to Grafana page and automatically log in without displaying the Grafana login page. I don't want my users must encounter a second login screen, where they will be confused as to what username/password to

Automatic Authentication using Grafana API

时光总嘲笑我的痴心妄想 提交于 2019-11-28 11:41:01
In my web application, I want to provide the ability to pass authenticated users from my dashboard across to Grafana . Once a user logged in my dashboard using credentials, a link to Grafana Dashboard will be displayed on my application. When user clicks that link, he/she will be redirected to Grafana page and automatically log in without displaying the Grafana login page. I don't want my users must encounter a second login screen, where they will be confused as to what username/password to enter. I've followed Automatic login to grafana from web application , Auto login to grafana dashboard ,