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.
When his dad brought home a Commodore PET computer, Chris was drawn into computers. 7 years later, after finishing his degree in Computer and Electrical Engineering at Purdue University, he found himself writing software for industrial control systems. His first foray into testing software resulted in an innovative control system for testing lubricants in automotive engines. The Internet grabbed his attention and he became one of the first Sun Certified Java Developers. His focus then locked on performance testing of websites. As Chief Engineer for Web Performance since 2001, Chris now spends his time turning real-world testing challenges into new features for the Load Tester product.