summaryrefslogtreecommitdiffstats
path: root/modules/tozt/files/kapacitor/net.tick
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tozt/files/kapacitor/net.tick')
-rw-r--r--modules/tozt/files/kapacitor/net.tick36
1 files changed, 0 insertions, 36 deletions
diff --git a/modules/tozt/files/kapacitor/net.tick b/modules/tozt/files/kapacitor/net.tick
deleted file mode 100644
index 3da8dfb..0000000
--- a/modules/tozt/files/kapacitor/net.tick
+++ /dev/null
@@ -1,36 +0,0 @@
-dbrp "telegraf"."autogen"
-
-var message = '''
-{{- if eq .Level "OK" -}}
-{{ index .Tags "host" }} is no longer using excessive network
-{{- else -}}
-{{ index .Tags "host" }} is using excessive network
-{{- end -}}
-'''
-
-var details = '''
-{{- if eq .Level "OK" -}}
-{{ index .Tags "host" }} is now only averaging {{ index .Fields "activity" }}B/s of network usage
-{{- else -}}
-{{ index .Tags "host" }} has been averaging {{ index .Fields "activity" }}B/s of network usage for the last 10 minutes
-{{- end -}}
-'''
-
-stream
-|from()
- .measurement('net')
- .groupBy('host')
-|eval(lambda: "bytes_recv" + "bytes_sent")
- .as('activity')
-|sum('activity')
- .as('activity')
-|derivative('activity')
- .nonNegative()
-|window()
- .period(10m)
-|mean('activity')
- .as('activity')
-|alert()
- .crit(lambda: "activity" > 2*1024*1024)
- .message(message)
- .details(details)