summaryrefslogtreecommitdiffstats
path: root/modules/tozt/files/kapacitor/tarsnap.tick
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tozt/files/kapacitor/tarsnap.tick')
-rw-r--r--modules/tozt/files/kapacitor/tarsnap.tick28
1 files changed, 0 insertions, 28 deletions
diff --git a/modules/tozt/files/kapacitor/tarsnap.tick b/modules/tozt/files/kapacitor/tarsnap.tick
deleted file mode 100644
index 1239c69..0000000
--- a/modules/tozt/files/kapacitor/tarsnap.tick
+++ /dev/null
@@ -1,28 +0,0 @@
-dbrp "telegraf"."autogen"
-
-var message = '''
-{{- if eq .Level "OK" -}}
-backup target {{ index .Tags "name" }} is back to running
-{{- else -}}
-backup target {{ index .Tags "name" }} hasn't run for a while
-{{- end -}}
-'''
-
-var details = '''
-{{- if eq .Level "OK" -}}
-backup target {{ index .Tags "name" }} is now {{ index .Fields "days_since_last_run" }} days since its last run
-{{- else -}}
-backup target {{ index .Tags "name" }} hasn't run for {{ index .Fields "days_since_last_run" }} days
-{{- end -}}
-'''
-
-stream
-|from()
- .measurement('tarsnap')
- .groupBy('name')
-|min('days_since_last_run')
- .as('days_since_last_run')
-|alert()
- .crit(lambda: "days_since_last_run" > 2)
- .message(message)
- .details(details)