Skip to content
Snippets Groups Projects
Commit 8b41384c authored by Jelle van der Waa's avatar Jelle van der Waa :construction:
Browse files

Merge branch 'borg-monitor-repo-sizes' into 'master'

Monitor borg repo sizes

See merge request !431
parents 90a51d33 0edc4292
No related branches found
No related tags found
1 merge request!431Monitor borg repo sizes
Pipeline #8966 passed
......@@ -28,6 +28,12 @@ if [[ -f /usr/local/bin/borg ]]; then
echo "# HELP borg_hetzner_last_archive_timestamp timestamp of last backup in UTC" >> $TMP_FILE
echo "# TYPE borg_hetzner_last_archive_timestamp counter" >> $TMP_FILE
echo "borg_hetzner_last_archive_timestamp $LAST_ARCHIVE_TIMESTAMP" >> $TMP_FILE;
REPO_SIZE=$(/usr/local/bin/borg info --json | jq '.cache.stats.unique_csize')
echo "# HELP borg_hetzner_repo_size_bytes amount of data stored in the repo in bytes" >> $TMP_FILE
echo "# TYPE borg_hetzner_repo_size_bytes gauge" >> $TMP_FILE
echo "borg_hetzner_repo_size_bytes $REPO_SIZE" >> $TMP_FILE
fi
# rsync.net borg
......@@ -40,6 +46,12 @@ if [[ -f /usr/local/bin/borg-offsite ]]; then
echo "# HELP borg_offsite_last_archive_timestamp timestamp of last backup in UTC" >> $TMP_FILE
echo "# TYPE borg_offsite_last_archive_timestamp counter" >> $TMP_FILE
echo "borg_offsite_last_archive_timestamp $LAST_ARCHIVE_TIMESTAMP" >> $TMP_FILE;
REPO_SIZE=$(/usr/local/bin/borg-offsite info --json | jq '.cache.stats.unique_csize')
echo "# HELP borg_offsite_repo_size_bytes amount of data stored in the repo in bytes" >> $TMP_FILE
echo "# TYPE borg_offsite_repo_size_bytes gauge" >> $TMP_FILE
echo "borg_offsite_repo_size_bytes $REPO_SIZE" >> $TMP_FILE
fi
mv -f $TMP_FILE $PROM_FILE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment