Snapshot server setup

Hi,

Is it possible to setup a snapshot server (like raintank) for intranet use? The idea would be to create snapshots via API from the “real” server and publish them on a different, still not a public server? This would solve some security issues that I’m thinking.

I can’t seem to be able to google much on that even as the grafana configuration file clearly seems to enable that…

?
Thanks in advance…

In Grafana ini there are snapshot url and name options

I’m not sure I understand. I’m asking what do you have to do to enable a server to become a snapshot server that can present a snapshot like Raintank.

I have looked at the grafana.ini settings where you can set the url to export snapshots TO… How do the Grafana server and raintank communicate ? The API doesn’t seem to have a method or at least I didn’t find one. Only a setting to publish it externally (to the url set in grafana.ini).

I’m sure my explanation is poor but bare with me…

just run a grafana instance, and point these settings to that instance:

http://docs.grafana.org/installation/configuration/#external-snapshot-url

OK, so no special trick needed for the server. So I guess then just http access between them is needed. Thanks!

But we’re still struggling to create a working snapshot via the API… So bare with me again:

If I have a dashboard A and use the UI and select say two template variables color and form to be black and round, the data is fetched and when I create a snapshot via UI, the url will give the exact same dashboard but you can’t do any more color or form selections after that as the snapshot contains also the data for the selections. (You can see that with the API GET snapshots function).

But how do you re-create the exact same snapshot via the API? We’ve tried and the result is a snapshot that has the templating menus active and the snapshot attempts to access the data source which doesn’t work if you’re not authenticated. So it really doesn’t work the same way as the one’s done with the UI which doesn’t require any credentials to the server. It just works with the url.

If this is getting too long winded, we can do this via e-mail as well…

The snapshot needs to contain all the panel data inside them. (stored in the dashboard json)

Yes I understand that now but how do you get the dashboard with data via the API? Where do you give the time frame and templating variables?

This method only gives you the dashboard as such. Or is there a way to provide parameters for it?

GET /api/dashboards/db/:slug

Further googling reveals that you can’t get the dashboard with data included from the API. Only the UI will do that.

Right?

1 Like

yes, that is correct