Backup and Restore Chronograf Dashboards - Web Performance
Menu

Backup and Restore Chronograf Dashboards

Chronograf is a web-based GUI for visualizing time-series data, typically from a time-series database such as InfluxDB. I have been using it recently to store load-test measurements created by the MuseIDE Measurements extension.

I have been running it in the cloud, starting up a fresh instance whenever I have the need for storing load test results. This is handy and very cost-effective, but starting from scratch means that I need to set up dashboards of the metrics I want to see every time.

Looking for a solution, I found a post on the InfluxData blog that describes an API that can be used to backup and restore dashboards. But using curl from the command line is a bit inefficient. So I pulled together some code to do it from a friendlier CLI that allows backing up and restoring just one specific dashboard or all of them at once.

To backup all dashboards, now I can simply:

chronograf-dashboard backup http://myhostname.net/chronograf

and it produces a dashboards.json file containing the dashboards. Next time I want to restore those dashboards, I can simply:

chronograf-dashboard restore http://myhostname.net/chronograf

Adding a -id 3 parameter allows me to backup one specific dashboard, using the dashboards id (which is the last part of the dashboards URL). That dashboard file can then be restored independently.

Pre-built distribution, full instructions and the source code is on GitHub – pass it along! Download the distribution from the releases tab.

Add Your Comment

You must be logged in to post a comment.

Resources

Copyright © 2024 Web Performance, Inc.

A Durham web design company

×

(1) 919-845-7601 9AM-5PM EST

Just complete this form and we will get back to you as soon as possible with a quote. Please note: Technical support questions should be posted to our online support system.

About You
How Many Concurrent Users