changed default redirect behaviour in httpcheck to follow
Chris committed
Feb 26, 2018 at 23:04 UTC
fbe7d11fcd74e24ef66ffc1da6e708e7b29197ca
3 files changed
+6
-7
conf.d/python.d/httpcheck.conf
+4
-4
@@ -67,13 +67,13 @@ chart_cleanup: 0
67
# # [required] the remote host url to connect to. If [:port] is missing, it defaults to 80
68
# # for HTTP and 443 for HTTPS. [path] is optional too, defaults to /
69
# redirect: yes # [optional] If the remote host returns 3xx status codes, the redirection url will be
70
-# # followed.
71
-# status_accepted: # [optional] By default, 200 is accepted. Anything else will result in 'error = 1' in the
72
-# # 'unexpected status' dimension, however: The response time will still be > 0, since the
70
+# # followed (default).
71
+# status_accepted: # [optional] By default, 200 is accepted. Anything else will result in 'bad status' in the
72
+# # status chart, however: The response time will still be > 0, since the
73
# # host responded with something.
74
# # If redirect is enabled, the accepted status will be checked against the redirected page.
75
# - 200 # Multiple status codes are possible. If you specify 'status_accepted', you would still
76
-# # need to add '200'. E.g. 'status_accepted: [301]' will trigger an error in 'unexpected status'
76
+# # need to add '200'. E.g. 'status_accepted: [301]' will trigger an error in 'bad status'
77
# # if code is 200. Do specify numerical entries such as 200, not 'OK'.
78
# regex: '.*' # If the status code is accepted, the content of the response will be searched for this
79
# # regex. Be aware that you may need to escape the regex string. If redirect is enabled,
python.d/README.md
+1
-2
@@ -860,8 +860,7 @@ Module monitors remote http server for availability and response time.
860
Following charts are drawn per job:
861
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.
863
+ * Time in 0.1 ms resolution in which the server responds.
864
If the connection failed, the value is missing.
865
866
2. **Status** boolean
python.d/httpcheck.chart.py
+1
-1
@@ -60,7 +60,7 @@ class Service(UrlService):
60
self.url = self.configuration.get('url', None)
61
self.regex = re.compile(self.configuration.get('regex', '.*'))
62
self.status_codes_accepted = self.configuration.get('status_accepted', [200])
63
- self.follow_redirect = self.configuration.get('redirect', False)
63
+ self.follow_redirect = self.configuration.get('redirect', True)
64
self.order = ORDER
65
self.definitions = CHARTS
66
self._manager = None