You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
First of all I am really thankful for your efforts to create this very useful library.
Now, I am having trouble with create_new_snapshot api, as when I use it, instead of static data, dashboard is keep on showing new data. Now interesting thing is, this is only happening if I am exporting it to snapshot.raintank.io, if I take local snapshot, it works fine.
Here is the code I used:
ref = grafana_api.search.search_dashboards()
for r in ref:
print(r)
dashboard1 = grafana_api.dashboard.get_dashboard(r['uid'])
if r['uid'] == 'gatling':
res = grafana_api.snapshots.create_new_snapshot(name="run_id_24"+r['title'], dashboard=dashboard1['dashboard'], external=True, key="abcd")
print(res)
break
Versions
Grafana: [7.2.1]
grafana_api: [ 1.0.3]
Authentication: [Basic]
So can you guys help me with it.
Here I am attaching one of the snapshot link.
The text was updated successfully, but these errors were encountered:
As far as I know, Grafana API doesn't provide any method to generate a snapshot content.
The api provided by grafana, and thus this python interface only give you a way to store a "json" content in grafana database.
If you want to build snapshot, you have to retrieve the dashboard and then get the data from the datasource and store the result in a valid format in JSON, and only then you can use the API to store the result.
You may have a look at the project https://github.com/peekjef72/grafana-snapshots-tool (still beta).
Feel free to give me some feebacks about it or if you have troubles in the installation part: I've produced some pull requests on grafana-api that is requirered for granafa-snapshoots-tool to work.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First of all I am really thankful for your efforts to create this very useful library.
Now, I am having trouble with
create_new_snapshot
api, as when I use it, instead of static data, dashboard is keep on showing new data. Now interesting thing is, this is only happening if I am exporting it to snapshot.raintank.io, if I take local snapshot, it works fine.Here is the code I used:
Versions
grafana_api
: [ 1.0.3]So can you guys help me with it.
Here I am attaching one of the snapshot link.
The text was updated successfully, but these errors were encountered: