Questions tagged [grafana-api]

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.

Grafana HTTP documentation

161 questions
0
votes
0 answers

Grafana: Adding indivisual Ldap user using ldap.toml

I am looking for a solution on how to add a specific LDAP user to access grafana. The current configuration I have in "ldap.toml" works for a group or multiple groups but not sure how to add individual ldap users. We want to only add specific group…
SHC
  • 487
  • 1
  • 6
  • 19
0
votes
0 answers

Querying loki logs using python

I am using the following script to query logs from loki which is running on some vm.I want to get the logs on multiple boxes and do some operation on them. so i am using loki as a source to get all the logs collectively. import requests import…
Nitz
  • 31
  • 1
0
votes
1 answer

Grafana Dashboard not getting deleted through Grafana Delete API from NodeJS code

I was able to delete Grafana dashboard through its delete API from Postman but when I try deleting it through NodeJS code, it is not working. I get status as 200 from the code but the response body which I am getting is different than the Postman…
Raghav Gupta
  • 341
  • 1
  • 6
  • 20
0
votes
0 answers

Grafana - Interval for getting values from a specific time

I need to display values in a graph in Grafana iteratively starting from a specific time. For example, you want to display data for the time interval 08:00AM - 08:00PM (with a difference of 12 hours). To calculate the values for the interval, the…
Leo Smith
  • 1
  • 1
0
votes
1 answer

Grafana alert provisioning issue

I'd like to be able to provision alerts, and try to follow this instructions, but no luck! OS Grafana version: 9.2.0 Running in Kubernetes Steps that I take: Created a new alert rule from UI. Extract alert rule from API: curl -k…
0
votes
0 answers

Grafana Alert migration (from Legacy to Unified-Alerting): How do I get/export alert-rules, contactPoints and policies in NEW format?

Edit: I also posted this question, which describes the problem in a much more concise manner. I feel I might be missing something basic, but I just don't know. Any help would be appreciated. Thanks. Searching StackOverflow, I cam across this post,…
0
votes
0 answers

How to autoheal with automatic service after some threshold time upon receiving prometheus alert

Prometheus has detected that service went down and its sending alert after every 5 mins but after threshold time of 10 mins I want to restart service through prometheus or grafana only I couldn't find anything yet on this, I am still looking for…
0
votes
1 answer

How to delete a panel from grafana dashboard using python requests?

I am able to access dashboards using the following api call- url2 = server + "/api/dashboards/uid/" + uid #uid of dashboard r = requests.get(url=url2, headers=headers, verify=False) From this I can retrieve panel details in a particular…
avm
  • 387
  • 3
  • 16
0
votes
0 answers

got error : rpc error: code = Internal desc = failed to fetch creds for cluster, while streaming

i'm getting this issue in grafana again and again got error : rpc error: code = Internal desc = failed to fetch creds for cluster, while streaming i didn't get any solution over this to try and resolve
Sachin
  • 1
0
votes
1 answer

How do I update Grafana dashboard through it's API

I want to update the grafana dashboard through its API but i have found out 2 problems: i got an 412 HTTP error {'message': 'A dashboard with the same name in the folder already exists', 'status': 'name-exists'} when i change the name of the dash…
0
votes
1 answer

Grafana Alert Value String Templating

I'm creating a Grafana alert with the Elastic datasource. The condition operator is grouping all meaningful labels from my alert. [ var='A0' metric='' labels={header_host=hostname1.com value=1496 ], [ var='A1' metric=''…
0
votes
1 answer

Receiving 404 when trying to edit a datasource despite being able to retrieve it's details

I have a datasource created in Grafana and attempting to update it to refresh the bearer token for auth access. However, I'm receiving a 404 Not Found error from the grafana api when making a request to localhost:3000/api/datasources/uid/:uid with a…
Matthew Darwin
  • 325
  • 1
  • 10
0
votes
1 answer

Grafana GET /api/orgs/name/:orgName not working if the organization name has "/" character

I am using Grafana 8.5.2 version. I want to execute the API to get the organization ID by passing below the organization name My Organization name : ABC C/O Tools When I try to execute the below API, I am getting error as "Not Found". I tried by…
Soorya Prakash
  • 921
  • 3
  • 9
  • 29
0
votes
1 answer

How to add or delete panel to existed grafana dashboard using api?

I have a task to add panels dynamically if there any new host added to cluster. I used template variables to add or repeat panels based on variables output. But now required dynamic panels adding based on rest api Or programmable. Can any help me to…
Sai
  • 31
  • 3
0
votes
0 answers

Dashboard is frozen - no recent changes

When I try to load my Grafana dashboard , it sometimes freezes and the page becomes unresponsive. I can’t click anything. Only a couple panels show data before it freezes, and the rest of the panels are stuck with the rotating arrows. I have not…