Corrected httpcheck documentation
Chris committed
Feb 24, 2018 at 22:10 UTC
d0be12884ec767d46ab694fcc330b9691d22f566
4 files changed
+20
-21
conf.d/python.d/httpcheck.conf
+7
-6
@@ -56,17 +56,18 @@
56
# url: 'http[s]://host-ip-or-dns[:port][path]'
57
# # [required] the remote host url to connect to. If [:port] is missing, it defaults to 80
58
# # for HTTP and 443 for HTTPS. [path] is optional too, defaults to /
59
-# redirect: yes # [optional] If the remote host returns 30x status codes, the redirection url will be
59
+# redirect: yes # [optional] If the remote host returns 3xx status codes, the redirection url will be
60
# # followed.
61
# status_accepted: # [optional] By default, 200 is accepted. Anything else will result in 'error = 1' in the
62
-# # chart, however: The response time will still be > 0, since the host responded with something.
62
+# # 'unexpected status' dimension, however: The response time will still be > 0, since the
63
+# # host responded with something.
64
# # If redirect is enabled, the accepted status will be checked against the redirected page.
65
# - 200 # Multiple status codes are possible. If you specify 'status_accepted', you would still
65
-# # need to add '200'. E.g. 'status_accepted: [301]' will result in 'error = 2' if code is 200.
66
-# # Do specify numerical entries such as 200, not 'OK'.
66
+# # need to add '200'. E.g. 'status_accepted: [301]' will trigger an error in 'unexpected status'
67
+# # if code is 200. Do specify numerical entries such as 200, not 'OK'.
68
# regex: '.*' # If the status code is accepted, the content of the response will be searched for this
69
# # regex. Be aware that you may need to escape the regex string. If redirect is enabled,
69
-# # the regex will be matched to the redirected page, not the initial 30x response.
70
+# # the regex will be matched to the redirected page, not the initial 3xx response.
71
71
-# This plugin is intended for simple cases. For monitoring large networks, consider a real service monitoring tool.
72
+# This plugin is intended for simple cases. Currently, the accuracy of the response time is low and should be used as reference only.
73
python.d/README.md
+9
-10
@@ -862,15 +862,14 @@ Following charts are drawn per job:
862
1. **Response time** ms
863
* Time in 0.1 ms resolution in which the server responds. When connection is successful,
864
it will be at least 0.1 ms, even if the measured time is lower than 0.1 ms.
865
- If it is 0.0 ms, the connection failed with error code >=3 (useful for API)
865
+ If the connection failed, the value is missing.
866
867
-2. **Error code** int
868
- * One of:
869
- - 0: Connection successful
870
- - 1: Content does not satisfy regex pattern.
871
- - 2: HTTP status code not accepted
872
- - 3: Connection failed (port not listening or blocked)
873
- - 4: Connection timed out (host unreachable?)
867
+2. **Error** int
868
+ * Connection successful: value = 1 otherwise 0
869
+ * Unexpected content: No Regex match found in the response (value = 1, otherwise 0)
870
+ * Unexpected status code: Do we get 500 errors? (value = 1, otherwise 0)
871
+ * Connection failed: port not listening or blocked (value = 1, otherwise 0)
872
+ * Connection timed out: host or port unreachable (value = 1, otherwise 0)
873
874
### configuration
875
@@ -892,8 +891,8 @@ server:
891
* The error code chart is intended for health check or for access via API.
892
* A system/service/firewall might block netdata's access if a portscan or
893
similar is detected.
895
- * This plugin is meant for simple use cases. For monitoring large networks
896
- consider a real service monitoring tool.
894
+ * This plugin is meant for simple use cases. Currently, the accuracy of the
895
+ response time is low and should be used as reference only.
896
897
---
898
python.d/httpcheck.chart.py
-1
@@ -84,7 +84,6 @@ class Service(UrlService):
84
:return: dict
85
"""
86
data = dict()
87
- data[HTTP_RESPONSE_TIME] = 0
87
data[HTTP_SUCCESS] = 0
88
data[HTTP_UNEXPECTED_CONTENT] = 0
89
data[HTTP_UNEXPECTED_STATUS] = 0
web/dashboard_info.js
+4
-4
@@ -1136,15 +1136,15 @@ netdataDashboard.context = {
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.'
1139
+ 'httpcheck.responsetime': {
1140
+ info: 'The <code>response time</code> describes the time passed between request and response. ' +
1141
+ 'Currently, the accuracy of the response time is low and should be used as reference only.'
1142
},
1143
1144
'httpcheck.error': {
1145
valueRange: "[0, 1]",
1146
info: 'The <code>error</code> codes are returned by the plugin when it could verify the availability of the webserver. ' +
1147
- 'Each error dimension will have a value of <code>1</code> if triggered. Dimension <code>success</code> is always <code>1</code> on successful requests.' +
1147
+ 'Each error dimension will have a value of <code>1</code> if triggered. Dimension <code>success</code> is <code>1</code> if all constraints are satisfied.' +
1148
'This chart is most useful for alarms or third-party apps.'
1149
},
1150