Quellcode durchsuchen

added more comments

Toastie vor 3 Monaten
Ursprung
Commit
1e3065804d
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  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