Add this tag to questions regarding Grafana HTTP API. The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving dashboards, creating users and updating data sources.
Questions tagged [grafana-api]
161 questions
18
votes
2 answers
How to add dashboard configuration json file in Grafana image?
I have a grafana docker image which have hawkular-datasource pre-configured using configuration files.
After after running grafana instance, I have a json given by teammate, which can be imported inside grafana and that json file creates dashboard…

GreyWorm
- 183
- 1
- 1
- 6
17
votes
4 answers
How to authenticate and embedded Grafana charts into iframe?
I embedded charts from Grafana into iframe into my HTML page.
It kept asking me to enter un/pw in the iframe.
How do I bypass the login that?
Is there a way to bypass that in the code?
Is this a setting in Grafana?
I explore further, I found…

code-8
- 54,650
- 106
- 352
- 604
13
votes
1 answer
Formatting Slack Notification from Grafana
Getting Alerts in slack from Grafana. But it's not in a good format. Is there any way to customize the notification in slack from Grafana?. I am using Node exporter to export the metrics. The dashboard is downloaded from…

AWS Coder
- 455
- 1
- 8
- 13
12
votes
2 answers
What is the best way to migrate grafana to a newer version?
What is the best-practice in terms of migrating grafana (configuration, dashboards etc.) to a a newer version ?
I want to migrate a v3 grafana installation to a new server which will be running the v4 codebase with alerting!
According to the docs,…

blak3r
- 16,066
- 16
- 78
- 98
11
votes
2 answers
Grafana: Add annotation on multiple panels at once
I would like to add an annotation on all panels (graphs) in the Grafana dashboard.
I could add annotations manually one-by-one on all panels -- but I hope there is a better way how to do it although I didn't find any information in the official…

mrek
- 1,655
- 1
- 21
- 34
10
votes
3 answers
Send logs directly to Loki without use of agents
Is there a way to send logs to Loki directly without having to use one of it's agents?
For example, if I have an API, is it possible to send request/response logs directly to Loki from an API, without the interference of, for example, Promtail?

OmarLittle
- 423
- 1
- 9
- 18
10
votes
2 answers
Physical location of grafana dashboards
In my project we use influx dB and Grafana for our log and other analysis which is running on an Ubuntu machine. Now recently due to a migration process, the ports were blocked like 3000(for Grafana) and 8086 (for influx dB) which will be remain…

Jyoti Prakash Mallick
- 2,119
- 3
- 21
- 38
8
votes
3 answers
programmatically export grafana dashboard data
I have a visual in grafana. I can manually go to the menu click export and export the time series data in json. This works great. Is there a way I can script that in python?. Is there some api I can hit that will return the json of a visual?
I was…

chowpay
- 1,515
- 6
- 22
- 44
8
votes
1 answer
Can we create an alert on a singlestat
Can we create an alert on a singlestat? I don't see an "alert tab" to create an alert. Can you please suggest me a way to compare two singlestat from 2 data sources.

naga g
- 121
- 1
- 2
- 7
7
votes
2 answers
Grafana showing "too many outstanding requests" error while querying loki dashboard
I am trying to use loki and grafana for generating and visualizing log-based metrics. I have created a Grafana dashboard using the loki filters. While clicking the refresh button, all dashboards fail with the error "too many outstanding requests"…

Shine Kumar K P
- 81
- 1
- 5
7
votes
2 answers
Grafana overwrite existing dashboard via API
I'm trying to overwrite existing grafana dashboard via API, like this :
curl -X POST -H "Content-Type: application/json" "https://api_key:xxx/api/dashboards/db" -d @test.json
And i'm facing an issue with versioning, cannot overwrite the same…

user2462699
- 429
- 2
- 8
- 17
6
votes
1 answer
How to add a dropdown menu in Grafana?
I need a way to add a Dropdown menu ( or similar solution ) to show the metrics for only one cpu ( cpu 1 or cpu 0 ). Is this possible?
The metric is node_cpu_seconds_total

xRobot
- 25,579
- 69
- 184
- 304
4
votes
3 answers
Grafana :: Cannot login to http://localhost:3000/login
I freshly installed Grafana and I cannot login at http://localhost:3000/login
All documentation shows that the default user/password should be admin/admin but I'm locked out.
If I go to check into the file C:\Program…

Francesco Mantovani
- 10,216
- 13
- 73
- 113
4
votes
2 answers
Options for creating a Grafana API Token
My organization runs a grafana 7.0 instance that only allows SSO logins. I would like to create an API token for my user account but based on these instruction it seems like doing so is not possible without supplying a password. Is this…

troutwine
- 3,721
- 3
- 28
- 62
4
votes
2 answers
How to calculate percentage in grafana datasource elastic
Need your help,
currently I have value elastic data sample like below :
Completed : 100
Declined : 20
Canceled : 5
How to create percentage success rate result with above condition in grafana with formula :
Completed / ( Completed + Declined +…

Fajar Hadiyanto
- 81
- 2
- 4