Browse Source

added more comments

Toastie 3 months ago
parent
commit
1e3065804d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      scripts/notify-prom-stats.sh

+ 3 - 1
scripts/notify-prom-stats.sh

@@ -1,10 +1,12 @@
 #!/bin/bash
 
+# Exit if no Prometheus Pushgateway URL is defined
 [ -z "$PROM_URL" ] && exit
 
+# Get latest backup status as json
 json=`borg info --last 1 --json`
 
-
+# Parse json in the Prometheus exposition formatand and transmit
 cat <<EOF | curl --data-binary @- $PROM_URL
 # TYPE borg_run_duration_seconds gauge
 # HELP borg_run_duration_seconds duration between start and end