Add alarms on httpcheck errors
Chris committed
Feb 25, 2018 at 14:46 UTC
2d1118f788690c8e1e9c2f20e2b327184437813b
2 files changed
+85
-1
conf.d/health.d/httpcheck.conf
new
+84
@@ -0,0 +1,84 @@
1
+template: httpcheck_last_collected_secs
2
+families: *
3
+ on: httpcheck.error
4
+ calc: $now - $last_collected_t
5
+ every: 10s
6
+ units: seconds ago
7
+ warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
8
+ crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
9
+ delay: down 5m multiplier 1.5 max 1h
10
+ info: number of seconds since the last successful data collection
11
+ to: sysadmin
12
+
13
+# This is a fast-reacting no-notification alarm ideal for custom dashboards or badges
14
+template: web_service_reachable
15
+families: *
16
+ on: httpcheck.error
17
+ lookup: average -1m unaligned percentage of success
18
+ calc: ($this < 75) ? (0) : ($this)
19
+ every: 5s
20
+ units: up/down
21
+ info: at least 75% verified responses during last 60 seconds, ideal for badges
22
+ to: silent
23
+
24
+template: web_service_unexpected_contents
25
+families: *
26
+ on: httpcheck.error
27
+ lookup: average -5m unaligned percentage of unexpected_content
28
+ every: 10s
29
+ units: %
30
+ warn: $this >= 10 AND $this < 40
31
+ crit: $this >= 40
32
+ delay: down 5m multiplier 1.5 max 1h
33
+ info: average of unexpected http response content during the last 5 minutes
34
+ to: webmaster
35
+
36
+template: web_service_unexpected_status
37
+families: *
38
+ on: httpcheck.error
39
+ lookup: average -5m unaligned percentage of unexpected_status
40
+ every: 10s
41
+ units: %
42
+ warn: $this >= 10 AND $this < 40
43
+ crit: $this >= 40
44
+ delay: down 5m multiplier 1.5 max 1h
45
+ info: average of unexpected http status during the last 5 minutes
46
+ to: webmaster
47
+
48
+template: web_service_timeouts
49
+families: *
50
+ on: httpcheck.error
51
+ lookup: average -5m unaligned percentage of timeout
52
+ every: 10s
53
+ units: %
54
+ warn: $this >= 10 AND $this < 40
55
+ crit: $this >= 40
56
+ delay: down 5m multiplier 1.5 max 1h
57
+ info: average of timeouts during the last 5 minutes
58
+ to: webmaster
59
+
60
+template: web_service_fails
61
+families: *
62
+ on: httpcheck.error
63
+ lookup: average -5m unaligned percentage of failed
64
+ every: 10s
65
+ units: %
66
+ warn: $this >= 10 AND $this < 40
67
+ crit: $this >= 40
68
+ delay: down 5m multiplier 1.5 max 1h
69
+ info: average of failed requests during the last 5 minutes
70
+ to: webmaster
71
+
72
+# need help...
73
+
74
+#template: web_service_latency
75
+#families: *
76
+# on: httpcheck.responsetime
77
+# lookup: average -2m unaligned of response_time
78
+# every: 5s
79
+# units: %
80
+# warn: $this >= 5 AND $this < 40
81
+# crit: $this >= 40
82
+# delay: down 5m multiplier 1.5 max 1h
83
+# info:
84
+# to: sysadmin
web/dashboard_info.js
+1
-1
@@ -1138,7 +1138,7 @@ netdataDashboard.context = {
1138
1139
'httpcheck.responsetime': {
1140
info: 'The <code>response time</code> describes the time passed between request and response. ' +
1141
- 'The minimum is <code>0.1 ms</code> except on errors, where it will be <code>0.0 ms</code> ' +
1141
+ 'The minimum is <code>0.1 ms</code> except on errors, where it will be <code>0.0 ms</code>. ' +
1142
'Currently, the accuracy of the response time is low and should be used as reference only.'
1143
},
1144