wmde/graphite-backup

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

graphite-backup

A crude script for backing up data from graphite.

How to Backup
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
Advanced Backups

Backup wildcard targets

php run.php metric.*.foo

Backup multiple targets

php run.php metric.1 metric.2
How to Restore

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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.