summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/httpcheck
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/python.d.plugin/httpcheck')
-rw-r--r--collectors/python.d.plugin/httpcheck/README.md22
-rw-r--r--collectors/python.d.plugin/httpcheck/httpcheck.chart.py3
-rw-r--r--collectors/python.d.plugin/httpcheck/httpcheck.conf3
3 files changed, 23 insertions, 5 deletions
diff --git a/collectors/python.d.plugin/httpcheck/README.md b/collectors/python.d.plugin/httpcheck/README.md
index 99b28cfeb..55aad52f0 100644
--- a/collectors/python.d.plugin/httpcheck/README.md
+++ b/collectors/python.d.plugin/httpcheck/README.md
@@ -1,6 +1,12 @@
-# httpcheck
+<!--
+title: "HTTP endpoint monitoring with Netdata"
+custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/httpcheck/README.md
+sidebar_label: "HTTP endpoints"
+-->
-Module monitors remote http server for availability and response time.
+# HTTP endpoint monitoring with Netdata
+
+Monitors remote http server for availability and response time.
Following charts are drawn per job:
@@ -17,7 +23,15 @@ Following charts are drawn per job:
- Connection failed: port not listening or blocked
- Connection timed out: host or port unreachable
-## configuration
+## Configuration
+
+Edit the `python.d/httpcheck.conf` configuration file using `edit-config` from the Netdata [config
+directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
+
+```bash
+cd /etc/netdata # Replace this path with your Netdata config directory, if different
+sudo ./edit-config python.d/httpcheck.conf
+```
Sample configuration and their default values.
@@ -32,7 +46,7 @@ server:
redirect: yes # optional
```
-### notes
+### Notes
- The status chart is primarily intended for alarms, badges or for access via API.
- A system/service/firewall might block Netdata's access if a portscan or
diff --git a/collectors/python.d.plugin/httpcheck/httpcheck.chart.py b/collectors/python.d.plugin/httpcheck/httpcheck.chart.py
index fd51370da..75718bb60 100644
--- a/collectors/python.d.plugin/httpcheck/httpcheck.chart.py
+++ b/collectors/python.d.plugin/httpcheck/httpcheck.chart.py
@@ -3,9 +3,10 @@
# Original Author: ccremer (github.com/ccremer)
# SPDX-License-Identifier: GPL-3.0-or-later
-import urllib3
import re
+import urllib3
+
try:
from time import monotonic as time
except ImportError:
diff --git a/collectors/python.d.plugin/httpcheck/httpcheck.conf b/collectors/python.d.plugin/httpcheck/httpcheck.conf
index 1e1dd0205..95adba270 100644
--- a/collectors/python.d.plugin/httpcheck/httpcheck.conf
+++ b/collectors/python.d.plugin/httpcheck/httpcheck.conf
@@ -70,9 +70,12 @@ chart_cleanup: 0
# url: 'http[s]://host-ip-or-dns[:port][path]'
# # [required] the remote host url to connect to. If [:port] is missing, it defaults to 80
# # for HTTP and 443 for HTTPS. [path] is optional too, defaults to /
+# header: {'Content-Type': 'application/json'}
+# # [optional] the HTTP header sent with the request.
# method: GET # [optional] the HTTP request method (POST, PUT, DELETE, HEAD etc.)
# redirect: yes # [optional] If the remote host returns 3xx status codes, the redirection url will be
# # followed (default).
+# body: {'key': 'value'} # [optional] the body sent with the request (e.g. POST, PUT, PATCH).
# status_accepted: # [optional] By default, 200 is accepted. Anything else will result in 'bad status' in the
# # status chart, however: The response time will still be > 0, since the
# # host responded with something.