diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:45:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:45:55 +0000 |
commit | a8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch) | |
tree | 77f0a30f016c0925cf7ee9292e644bba183c2774 /collectors/python.d.plugin/haproxy | |
parent | Adding upstream version 1.19.0. (diff) | |
download | netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip |
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/haproxy')
-rw-r--r-- | collectors/python.d.plugin/haproxy/README.md | 20 | ||||
-rw-r--r-- | collectors/python.d.plugin/haproxy/haproxy.chart.py | 7 |
2 files changed, 19 insertions, 8 deletions
diff --git a/collectors/python.d.plugin/haproxy/README.md b/collectors/python.d.plugin/haproxy/README.md index c4bb0447e..33d34f1ad 100644 --- a/collectors/python.d.plugin/haproxy/README.md +++ b/collectors/python.d.plugin/haproxy/README.md @@ -1,6 +1,12 @@ -# haproxy +<!-- +title: "HAProxy monitoring with Netdata" +custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/haproxy/README.md +sidebar_label: "HAProxy" +--> -Module monitors frontend and backend metrics such as bytes in, bytes out, sessions current, sessions in queue current. +# HAProxy monitoring with Netdata + +Monitors frontend and backend metrics such as bytes in, bytes out, sessions current, sessions in queue current. And health metrics such as backend servers status (server check should be used). Plugin can obtain data from url **OR** unix socket. @@ -28,7 +34,15 @@ It produces: - number of failed servers for every backend (in DOWN state) -## configuration +## Configuration + +Edit the `python.d/haproxy.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/haproxy.conf +``` Sample: diff --git a/collectors/python.d.plugin/haproxy/haproxy.chart.py b/collectors/python.d.plugin/haproxy/haproxy.chart.py index 8df712943..6f94c9a07 100644 --- a/collectors/python.d.plugin/haproxy/haproxy.chart.py +++ b/collectors/python.d.plugin/haproxy/haproxy.chart.py @@ -179,7 +179,6 @@ CHARTS = { } } - METRICS = { 'bin': {'algorithm': 'incremental', 'divisor': 1024}, 'bout': {'algorithm': 'incremental', 'divisor': 1024}, @@ -193,7 +192,6 @@ METRICS = { 'hrsp_other': {'algorithm': 'incremental', 'divisor': 1} } - BACKEND_METRICS = { 'qtime': {'algorithm': 'absolute', 'divisor': 1}, 'ctime': {'algorithm': 'absolute', 'divisor': 1}, @@ -201,7 +199,6 @@ BACKEND_METRICS = { 'ttime': {'algorithm': 'absolute', 'divisor': 1} } - REGEX = dict(url=re_compile(r'idle = (?P<idle>[0-9]+)'), socket=re_compile(r'Idle_pct: (?P<idle>[0-9]+)')) @@ -309,7 +306,7 @@ class Service(UrlService, SocketService): name, METRICS[metric]['algorithm'], 1, METRICS[metric]['divisor']]) self.definitions['fhrsp_total']['lines'].append(['_'.join(['frontend', 'hrsp_total', idx]), - name, 'incremental', 1, 1]) + name, 'incremental', 1, 1]) for back in self.data['backend']: name, idx = back['# pxname'], back['# pxname'].replace('.', '_') for metric in METRICS: @@ -317,7 +314,7 @@ class Service(UrlService, SocketService): name, METRICS[metric]['algorithm'], 1, METRICS[metric]['divisor']]) self.definitions['bhrsp_total']['lines'].append(['_'.join(['backend', 'hrsp_total', idx]), - name, 'incremental', 1, 1]) + name, 'incremental', 1, 1]) for metric in BACKEND_METRICS: self.definitions['b' + metric]['lines'].append(['_'.join(['backend', metric, idx]), name, BACKEND_METRICS[metric]['algorithm'], 1, |