Add dashboard info for httpcheck
Chris committed
Feb 20, 2018 at 19:28 UTC
00750d54494a705c271b484b4a0ee878280f3688
2 files changed
+27
-7
python.d/httpcheck.chart.py
+5
-7
@@ -27,7 +27,7 @@ CHARTS = {
27
'responsetime': {
28
'options': [None, 'HTTP response time', 'ms', 'response time', 'httpcheck.responsetime', 'line'],
29
'lines': [
30
- [HTTP_RESPONSE_TIME, 'response_time', 'absolute', 100, 1000]
30
+ [HTTP_RESPONSE_TIME, 'response time', 'absolute', 100, 1000]
31
]},
32
'error': {
33
'options': [None, 'HTTP check error code', 'code', 'error', 'httpcheck.error', 'line'],
@@ -66,12 +66,10 @@ class Service(UrlService):
66
if not self._manager:
67
return False
68
69
- self.info('Enabled {url} with (redirect={redirect}, status_accepted={accepted}, update_every={update}, '
70
- 'timeout={timeout})'
71
- .format(
72
- url=self.url, redirect=self.follow_redirect, accepted=self.status_codes_accepted,
73
- update=self.update_every, timeout=self.request_timeout
74
- ))
69
+ self.info('Enabled {url} with (redirect={redirect}, status={accepted}, interval={update}, timeout={timeout}, '
70
+ 'regex={regex})'
71
+ .format(url=self.url, redirect=self.follow_redirect, accepted=self.status_codes_accepted,
72
+ update=self.update_every, timeout=self.request_timeout, regex=self.regex.pattern))
73
return True
74
75
def _get_data(self):
web/dashboard_info.js
+22
@@ -177,6 +177,12 @@ netdataDashboard.menu = {
177
info: 'Network latency statistics, via <b>fping</b>. <b>fping</b> is a program to send ICMP echo probes to network hosts, similar to <code>ping</code>, but much better performing when pinging multiple hosts. fping versions after 3.15 can be directly used as netdata plugins.'
178
},
179
180
+ 'httpcheck': {
181
+ title: 'Http Check',
182
+ icon: '<i class="fas fa-heartbeat"></i>',
183
+ info: 'Web Service availability and latency monitoring using HTTP checks. This plugin is a specialized version of the port check plugin.'
184
+ },
185
+
186
'memcached': {
187
title: 'memcached',
188
icon: '<i class="fas fa-database"></i>',
@@ -1127,6 +1133,22 @@ netdataDashboard.context = {
1133
]
1134
},
1135
1136
+ // ------------------------------------------------------------------------
1137
+ // HTTP check
1138
+
1139
+ 'httpcheck.latency': {
1140
+ info: 'The <code>Latency</code> describes the time passed between request and response. ' +
1141
+ 'A response time of <code>0.0 ms</code> indicates a connection error.'
1142
+ },
1143
+
1144
+ 'httpcheck.error': {
1145
+ valueRange: "[0, 3]",
1146
+ info: 'The <code>Error</code> is returned by the plugin when it could not connect to the webserver. It is one of: ' +
1147
+ '<code>0</code> (connection successful), <code>1</code> (unexpected response content), <code>2</code> (unexpected status code), ' +
1148
+ '<code>3</code> (port unreachable), <code>4</code> (host unreachable). ' +
1149
+ 'The error code is most useful for 3rd-party apps and alarms.'
1150
+ },
1151
+
1152
// ------------------------------------------------------------------------
1153
// NETDATA
1154