Name: graphite-backup
Owner: Wikimedia Deutschland e.V.
Description: A crude script for backing up data from graphite
Created: 2015-11-16 13:17:12.0
Updated: 2017-05-22 14:08:24.0
Pushed: 2015-11-17 15:48:21.0
Homepage: null
Size: 6
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A crude script for backing up data from graphite.
php run.php metric.name
Will create a file in /data called metric.name.txt that looks like this:
1447595400 117
1447595460 128
1447595520 99
1447595580 132
Backup wildcard targets
php run.php metric.*.foo
Backup multiple targets
php run.php metric.1 metric.2
You could restore this data by iterating over the files using something like this:
echo "${METRIC} ${VALUE} ${TIMESTAMP}" | nc -q0 ${SERVER} ${PORT}
See http://graphite.readthedocs.org/en/latest/feeding-carbon.html for other similar code for the graphite api.