✨: restic munin plugins
This commit is contained in:
49
roles/munin_client/files/restic_backup
Normal file
49
roles/munin_client/files/restic_backup
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat << 'EOF'
|
||||
multigraph restic_file_processed
|
||||
graph_title Files/dirs processed by restic
|
||||
graph_vlabel Number of files/dirs processed by restic
|
||||
graph_args --base 1000 -l 0
|
||||
graph_category restic
|
||||
files_new.label files_new
|
||||
files_changed.label files_changed
|
||||
files_unmodified.label files_unmodified
|
||||
dirs_new.label dirs_new
|
||||
dirs_changed.label dirs_changed
|
||||
dirs_unmodified.label dirs_unmodified
|
||||
EOF
|
||||
cat << 'EOF'
|
||||
multigraph restic_data_added
|
||||
graph_title Data added to repo by restic
|
||||
graph_vlabel Data added in bytes
|
||||
graph_args --base 1024 -l 0
|
||||
graph_category restic
|
||||
data_added.label raw_data_added
|
||||
data_added_packed.label compressed_data_added
|
||||
EOF
|
||||
cat << 'EOF'
|
||||
multigraph restic_backup_duration
|
||||
graph_title Restic backup duration
|
||||
graph_vlabel Duration of restic backup (seconds)
|
||||
graph_args --base 1000 -l 0
|
||||
graph_category restic
|
||||
total_duration.label total_duration
|
||||
EOF
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
echo "multigraph restic_file_processed"
|
||||
echo "files_new.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .files_new)"
|
||||
echo "files_changed.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .files_changed)"
|
||||
echo "files_unmodified.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .files_unmodified)"
|
||||
echo "dirs_new.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .dirs_new)"
|
||||
echo "dirs_changed.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .dirs_changed)"
|
||||
echo "dirs_unmodified.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .dirs_unmodified)"
|
||||
echo "multigraph restic_data_added"
|
||||
echo "data_added.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .data_added)"
|
||||
echo "data_added_packed.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .data_added_packed)"
|
||||
echo "multigraph restic_backup_duration"
|
||||
echo "total_duration.value $(cat ${RESTIC_SUMMARY_LOG} | jq -r .total_duration)"
|
Reference in New Issue
Block a user