@cryptotaxi247 / netdata-1 / commits / dfbc3bfb0

chore(python.d): remove python.d/* announced in v1.35.0 deprecation notice (#13370)

Ilya Mashchenko committed Jul 13, 2022 at 11:33 UTC dfbc3bfb034be1aa452cae5a2d932e4a0cc3a845
12 files changed +27 -598
collectors/COLLECTORS.md
+27 -22
@@ -22,13 +22,18 @@ version](/docs/collect/enable-configure.md), and enable the Python version. Netd
22 attempts to load the Python version and its accompanying configuration file.
23
24 If you don't see the app/service you'd like to monitor in this list:
25 -- Check out our [GitHub issues](https://github.com/netdata/netdata/issues). Use the search bar to look for previous discussions about that
26 -collector—we may be looking for assistance from users such as yourself!
27 -- If you don't see the collector there, you can make a [feature request](https://github.com/netdata/netdata/issues/new/choose) on GitHub.
28 -- If you have basic software development skills, you can add your own plugin in [Go](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin#how-to-develop-a-collector) or [Python](https://learn.netdata.cloud/guides/python-collector)
25 +
26 +- Check out our [GitHub issues](https://github.com/netdata/netdata/issues). Use the search bar to look for previous
27 + discussions about that collector—we may be looking for assistance from users such as yourself!
28 +- If you don't see the collector there, you can make
29 + a [feature request](https://github.com/netdata/netdata/issues/new/choose) on GitHub.
30 +- If you have basic software development skills, you can add your own plugin
31 + in [Go](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin#how-to-develop-a-collector)
32 + or [Python](https://learn.netdata.cloud/guides/python-collector)
33
34 Supported Collectors List:
31 - - [Service and application collectors](#service-and-application-collectors)
35 +
36 +- [Service and application collectors](#service-and-application-collectors)
37 - [Generic](#generic)
38 - [APM (application performance monitoring)](#apm-application-performance-monitoring)
39 - [Containers and VMs](#containers-and-vms)
@@ -44,7 +49,7 @@ Supported Collectors List:
49 - [Search](#search)
50 - [Storage](#storage)
51 - [Web](#web)
47 - - [System collectors](#system-collectors)
52 +- [System collectors](#system-collectors)
53 - [Applications](#applications)
54 - [Disks and filesystems](#disks-and-filesystems)
55 - [eBPF](#ebpf)
@@ -55,10 +60,10 @@ Supported Collectors List:
60 - [Processes](#processes)
61 - [Resources](#resources)
62 - [Users](#users)
58 - - [Netdata collectors](#netdata-collectors)
59 - - [Orchestrators](#orchestrators)
60 - - [Third-party collectors](#third-party-collectors)
61 - - [Etc](#etc)
63 +- [Netdata collectors](#netdata-collectors)
64 +- [Orchestrators](#orchestrators)
65 +- [Third-party collectors](#third-party-collectors)
66 +- [Etc](#etc)
67
68 ## Service and application collectors
69
@@ -169,9 +174,8 @@ configure any of these collectors according to your setup and infrastructure.
174 plugins metrics from an endpoint provided by `in_monitor plugin`.
175 - [Logstash](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/logstash/): Monitor JVM threads,
176 memory usage, garbage collection statistics, and more.
172 -- [OpenVPN status logs](/collectors/python.d.plugin/ovpn_status_log/README.md): Parse server log files and provide
173 - summary
174 - (client, traffic) metrics.
177 +- [OpenVPN status logs](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/openvpn_status_log): Parse
178 + server log files and provide summary (client, traffic) metrics.
179 - [Squid web server logs](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/squidlog/): Tail Squid
180 access logs to return the volume of requests, types of requests, bandwidth, and much more.
181 - [Web server logs (Go version for Apache,
@@ -200,8 +204,8 @@ configure any of these collectors according to your setup and infrastructure.
204
205 - [Bind 9](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/bind/): Collect nameserver summary
206 performance statistics via a web interface (`statistics-channels` feature).
203 -- [Chrony](/collectors/python.d.plugin/chrony/README.md): Monitor the precision and statistics of a local `chronyd`
204 - server.
207 +- [Chrony](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/chrony): Monitor the precision and
208 + statistics of a local `chronyd` server.
209 - [CoreDNS](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/coredns/): Measure DNS query round
210 trip time.
211 - [Dnsmasq](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/dnsmasq_dhcp/): Automatically
@@ -251,13 +255,14 @@ configure any of these collectors according to your setup and infrastructure.
255
256 - [AM2320](/collectors/python.d.plugin/am2320/README.md): Monitor sensor temperature and humidity.
257 - [Access point](/collectors/charts.d.plugin/ap/README.md): Monitor client, traffic and signal metrics using the `aw`
254 - tool.
258 + tool.
259 - [APC UPS](/collectors/charts.d.plugin/apcupsd/README.md): Capture status information using the `apcaccess` tool.
260 - [Energi Core](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/energid): Monitor
257 - blockchain indexes, memory usage, network usage, and transactions of wallet instances.
261 + blockchain indexes, memory usage, network usage, and transactions of wallet instances.
262 - [UPS/PDU](/collectors/charts.d.plugin/nut/README.md): Read the status of UPS/PDU devices using the `upsc` tool.
259 -- [SNMP devices](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/snmp): Gather data using the SNMP protocol.
260 -- [1-Wire sensors](/collectors/python.d.plugin/w1sensor/README.md): Monitor sensor temperature.
263 +- [SNMP devices](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/snmp): Gather data using the SNMP
264 + protocol.
265 +- [1-Wire sensors](/collectors/python.d.plugin/w1sensor/README.md): Monitor sensor temperature.
266
267 ### Search
268
@@ -482,9 +487,9 @@ Plugin orchestrators organize and run many of the above collectors.
487 If you're interested in developing a new collector that you'd like to contribute to Netdata, we highly recommend using
488 the `go.d.plugin`.
489
485 -- [go.d.plugin](https://github.com/netdata/go.d.plugin): An orchestrator for data collection modules written in `go`.
486 -- [python.d.plugin](python.d.plugin/README.md): An orchestrator for data collection modules written in `python` v2/v3.
487 -- [charts.d.plugin](charts.d.plugin/README.md): An orchestrator for data collection modules written in `bash` v4+.
490 +- [go.d.plugin](https://github.com/netdata/go.d.plugin): An orchestrator for data collection modules written in `go`.
491 +- [python.d.plugin](python.d.plugin/README.md): An orchestrator for data collection modules written in `python` v2/v3.
492 +- [charts.d.plugin](charts.d.plugin/README.md): An orchestrator for data collection modules written in `bash` v4+.
493
494 ## Third-party collectors
495
collectors/python.d.plugin/Makefile.am
-2
@@ -48,7 +48,6 @@ include bind_rndc/Makefile.inc
48 include boinc/Makefile.inc
49 include ceph/Makefile.inc
50 include changefinder/Makefile.inc
51 -include chrony/Makefile.inc
51 include dockerd/Makefile.inc
52 include dovecot/Makefile.inc
53 include example/Makefile.inc
@@ -71,7 +70,6 @@ include nginx_plus/Makefile.inc
70 include nvidia_smi/Makefile.inc
71 include nsd/Makefile.inc
72 include ntpd/Makefile.inc
74 -include ovpn_status_log/Makefile.inc
73 include openldap/Makefile.inc
74 include oracledb/Makefile.inc
75 include postfix/Makefile.inc
collectors/python.d.plugin/chrony/Makefile.inc deleted
-13
@@ -1,13 +0,0 @@
1 -# SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -# THIS IS NOT A COMPLETE Makefile
4 -# IT IS INCLUDED BY ITS PARENT'S Makefile.am
5 -# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
6 -
7 -# install these files
8 -dist_python_DATA += chrony/chrony.chart.py
9 -dist_pythonconfig_DATA += chrony/chrony.conf
10 -
11 -# do not install these files, but include them in the distribution
12 -dist_noinst_DATA += chrony/README.md chrony/Makefile.inc
13 -
collectors/python.d.plugin/chrony/README.md deleted
-61
@@ -1,61 +0,0 @@
1 -<!--
2 -title: "Chrony monitoring with Netdata"
3 -custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/chrony/README.md
4 -sidebar_label: "Chrony"
5 --->
6 -
7 -# Chrony monitoring with Netdata
8 -
9 -Monitors the precision and statistics of a local chronyd server, and produces:
10 -
11 -- frequency
12 -- last offset
13 -- RMS offset
14 -- residual freq
15 -- root delay
16 -- root dispersion
17 -- skew
18 -- system time
19 -
20 -## Requirements
21 -
22 -Verify that user Netdata can execute `chronyc tracking`. If necessary, update `/etc/chrony.conf`, `cmdallow`.
23 -
24 -## Enable the collector
25 -
26 -The `chrony` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config
27 -directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.
28 -
29 -```bash
30 -cd /etc/netdata # Replace this path with your Netdata config directory, if different
31 -sudo ./edit-config python.d.conf
32 -```
33 -
34 -Change the value of the `chrony` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl
35 -restart netdata`, or the appropriate method for your system, to finish enabling the `chrony` collector.
36 -
37 -## Configuration
38 -
39 -Edit the `python.d/chrony.conf` configuration file using `edit-config` from the Netdata [config
40 -directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
41 -
42 -```bash
43 -cd /etc/netdata # Replace this path with your Netdata config directory, if different
44 -sudo ./edit-config python.d/chrony.conf
45 -```
46 -
47 -Sample:
48 -
49 -```yaml
50 -# data collection frequency:
51 -update_every: 1
52 -
53 -# chrony query command:
54 -local:
55 - command: 'chronyc -n tracking'
56 -```
57 -
58 -Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate
59 -method](/docs/configure/start-stop-restart.md) for your system, to finish configuring the `chrony` collector.
60 -
61 -
collectors/python.d.plugin/chrony/chrony.chart.py deleted
-118
@@ -1,118 +0,0 @@
1 -# -*- coding: utf-8 -*-
2 -# Description: chrony netdata python.d module
3 -# Author: Dominik Schloesser (domschl)
4 -# SPDX-License-Identifier: GPL-3.0-or-later
5 -
6 -from bases.FrameworkServices.ExecutableService import ExecutableService
7 -
8 -# default module values (can be overridden per job in `config`)
9 -update_every = 5
10 -
11 -CHRONY_COMMAND = 'chronyc -n tracking'
12 -
13 -# charts order (can be overridden if you want less charts, or different order)
14 -ORDER = [
15 - 'system',
16 - 'offsets',
17 - 'stratum',
18 - 'root',
19 - 'frequency',
20 - 'residualfreq',
21 - 'skew',
22 -]
23 -
24 -CHARTS = {
25 - 'system': {
26 - 'options': [None, 'Chrony System Time Deltas', 'microseconds', 'system', 'chrony.system', 'area'],
27 - 'lines': [
28 - ['timediff', 'system time', 'absolute', 1, 1000]
29 - ]
30 - },
31 - 'offsets': {
32 - 'options': [None, 'Chrony System Time Offsets', 'microseconds', 'system', 'chrony.offsets', 'area'],
33 - 'lines': [
34 - ['lastoffset', 'last offset', 'absolute', 1, 1000],
35 - ['rmsoffset', 'RMS offset', 'absolute', 1, 1000]
36 - ]
37 - },
38 - 'stratum': {
39 - 'options': [None, 'Chrony Stratum', 'stratum', 'root', 'chrony.stratum', 'line'],
40 - 'lines': [
41 - ['stratum', None, 'absolute', 1, 1]
42 - ]
43 - },
44 - 'root': {
45 - 'options': [None, 'Chrony Root Delays', 'milliseconds', 'root', 'chrony.root', 'line'],
46 - 'lines': [
47 - ['rootdelay', 'delay', 'absolute', 1, 1000000],
48 - ['rootdispersion', 'dispersion', 'absolute', 1, 1000000]
49 - ]
50 - },
51 - 'frequency': {
52 - 'options': [None, 'Chrony Frequency', 'ppm', 'frequencies', 'chrony.frequency', 'area'],
53 - 'lines': [
54 - ['frequency', None, 'absolute', 1, 1000]
55 - ]
56 - },
57 - 'residualfreq': {
58 - 'options': [None, 'Chrony Residual frequency', 'ppm', 'frequencies', 'chrony.residualfreq', 'area'],
59 - 'lines': [
60 - ['residualfreq', 'residual frequency', 'absolute', 1, 1000]
61 - ]
62 - },
63 - 'skew': {
64 - 'options': [None, 'Chrony Skew, error bound on frequency', 'ppm', 'frequencies', 'chrony.skew', 'area'],
65 - 'lines': [
66 - ['skew', None, 'absolute', 1, 1000]
67 - ]
68 - }
69 -}
70 -
71 -CHRONY = [
72 - ('Frequency', 'frequency', 1e3),
73 - ('Last offset', 'lastoffset', 1e9),
74 - ('RMS offset', 'rmsoffset', 1e9),
75 - ('Residual freq', 'residualfreq', 1e3),
76 - ('Root delay', 'rootdelay', 1e9),
77 - ('Root dispersion', 'rootdispersion', 1e9),
78 - ('Skew', 'skew', 1e3),
79 - ('Stratum', 'stratum', 1),
80 - ('System time', 'timediff', 1e9)
81 -]
82 -
83 -
84 -class Service(ExecutableService):
85 - def __init__(self, configuration=None, name=None):
86 - ExecutableService.__init__(
87 - self, configuration=configuration, name=name)
88 - self.order = ORDER
89 - self.definitions = CHARTS
90 - self.command = CHRONY_COMMAND
91 -
92 - def _get_data(self):
93 - """
94 - Format data received from shell command
95 - :return: dict
96 - """
97 - raw_data = self._get_raw_data()
98 - if not raw_data:
99 - return None
100 -
101 - raw_data = (line.split(':', 1) for line in raw_data)
102 - parsed, data = dict(), dict()
103 -
104 - for line in raw_data:
105 - try:
106 - key, value = (l.strip() for l in line)
107 - except ValueError:
108 - continue
109 - if value:
110 - parsed[key] = value.split()[0]
111 -
112 - for key, dim_id, multiplier in CHRONY:
113 - try:
114 - data[dim_id] = int(float(parsed[key]) * multiplier)
115 - except (KeyError, ValueError):
116 - continue
117 -
118 - return data or None
collectors/python.d.plugin/chrony/chrony.conf deleted
-77
@@ -1,77 +0,0 @@
1 -# netdata python.d.plugin configuration for chrony
2 -#
3 -# This file is in YaML format. Generally the format is:
4 -#
5 -# name: value
6 -#
7 -# There are 2 sections:
8 -# - global variables
9 -# - one or more JOBS
10 -#
11 -# JOBS allow you to collect values from multiple sources.
12 -# Each source will have its own set of charts.
13 -#
14 -# JOB parameters have to be indented (using spaces only, example below).
15 -
16 -# ----------------------------------------------------------------------
17 -# Global Variables
18 -# These variables set the defaults for all JOBs, however each JOB
19 -# may define its own, overriding the defaults.
20 -
21 -# update_every sets the default data collection frequency.
22 -# If unset, the python.d.plugin default is used.
23 -update_every: 5
24 -
25 -# priority controls the order of charts at the netdata dashboard.
26 -# Lower numbers move the charts towards the top of the page.
27 -# If unset, the default for python.d.plugin is used.
28 -# priority: 60000
29 -
30 -# penalty indicates whether to apply penalty to update_every in case of failures.
31 -# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
32 -# penalty: yes
33 -
34 -# autodetection_retry sets the job re-check interval in seconds.
35 -# The job is not deleted if check fails.
36 -# Attempts to start the job are made once every autodetection_retry.
37 -# This feature is disabled by default.
38 -# autodetection_retry: 0
39 -
40 -# ----------------------------------------------------------------------
41 -# JOBS (data collection sources)
42 -#
43 -# The default JOBS share the same *name*. JOBS with the same name
44 -# are mutually exclusive. Only one of them will be allowed running at
45 -# any time. This allows autodetection to try several alternatives and
46 -# pick the one that works.
47 -#
48 -# Any number of jobs is supported.
49 -#
50 -# All python.d.plugin JOBS (for all its modules) support a set of
51 -# predefined parameters. These are:
52 -#
53 -# job_name:
54 -# name: myname # the JOB's name as it will appear at the
55 -# # dashboard (by default is the job_name)
56 -# # JOBs sharing a name are mutually exclusive
57 -# update_every: 1 # the JOB's data collection frequency
58 -# priority: 60000 # the JOB's order on the dashboard
59 -# penalty: yes # the JOB's penalty
60 -# autodetection_retry: 0 # the JOB's re-check interval in seconds
61 -#
62 -# Additionally to the above, chrony also supports the following:
63 -#
64 -# command: 'chrony tracking' # the command to run
65 -#
66 -
67 -# ----------------------------------------------------------------------
68 -# REQUIRED chrony CONFIGURATION
69 -#
70 -# netdata will query chrony as user netdata.
71 -# verify that user netdata is allowed to call 'chronyc tracking'
72 -# Check cmdallow in chrony.conf
73 -# ----------------------------------------------------------------------
74 -# AUTO-DETECTION JOBS
75 -
76 -local:
77 - command: 'chronyc -n tracking'
collectors/python.d.plugin/ovpn_status_log/Makefile.inc deleted
-13
@@ -1,13 +0,0 @@
1 -# SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -# THIS IS NOT A COMPLETE Makefile
4 -# IT IS INCLUDED BY ITS PARENT'S Makefile.am
5 -# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
6 -
7 -# install these files
8 -dist_python_DATA += ovpn_status_log/ovpn_status_log.chart.py
9 -dist_pythonconfig_DATA += ovpn_status_log/ovpn_status_log.conf
10 -
11 -# do not install these files, but include them in the distribution
12 -dist_noinst_DATA += ovpn_status_log/README.md ovpn_status_log/Makefile.inc
13 -
collectors/python.d.plugin/ovpn_status_log/README.md deleted
-50
@@ -1,50 +0,0 @@
1 -<!--
2 -title: "OpenVPN monitoring with Netdata"
3 -custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/ovpn_status_log/README.md
4 -sidebar_label: "OpenVPN"
5 --->
6 -
7 -# OpenVPN monitoring with Netdata
8 -
9 -Parses server log files and provides summary (client, traffic) metrics.
10 -
11 -## Requirements
12 -
13 -- If you are running multiple OpenVPN instances out of the same directory, MAKE SURE TO EDIT DIRECTIVES which create output files
14 - so that multiple instances do not overwrite each other's output files.
15 -
16 -- Make sure NETDATA USER CAN READ openvpn-status.log
17 -
18 -- Update_every interval MUST MATCH interval on which OpenVPN writes operational status to log file.
19 -
20 -It produces:
21 -
22 -1. **Users** OpenVPN active users
23 -
24 - - users
25 -
26 -2. **Traffic** OpenVPN overall bandwidth usage in kilobit/s
27 -
28 - - in
29 - - out
30 -
31 -## Configuration
32 -
33 -Edit the `python.d/ovpn_status_log.conf` configuration file using `edit-config` from the Netdata [config
34 -directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
35 -
36 -```bash
37 -cd /etc/netdata # Replace this path with your Netdata config directory, if different
38 -sudo ./edit-config python.d/ovpn_status_log.conf
39 -```
40 -
41 -Sample:
42 -
43 -```yaml
44 -default
45 - log_path : '/var/log/openvpn-status.log'
46 -```
47 -
48 ----
49 -
50 -
collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.chart.py deleted
-136
@@ -1,136 +0,0 @@
1 -# -*- coding: utf-8 -*-
2 -# Description: openvpn status log netdata python.d module
3 -# Author: ilyam8
4 -# SPDX-License-Identifier: GPL-3.0-or-later
5 -
6 -import re
7 -
8 -from bases.FrameworkServices.SimpleService import SimpleService
9 -
10 -update_every = 10
11 -
12 -ORDER = [
13 - 'users',
14 - 'traffic',
15 -]
16 -
17 -CHARTS = {
18 - 'users': {
19 - 'options': [None, 'OpenVPN Active Users', 'active users', 'users', 'openvpn_status.users', 'line'],
20 - 'lines': [
21 - ['users', None, 'absolute'],
22 - ]
23 - },
24 - 'traffic': {
25 - 'options': [None, 'OpenVPN Traffic', 'KiB/s', 'traffic', 'openvpn_status.traffic', 'area'],
26 - 'lines': [
27 - ['bytes_in', 'in', 'incremental', 1, 1 << 10],
28 - ['bytes_out', 'out', 'incremental', -1, 1 << 10]
29 - ]
30 - }
31 -}
32 -
33 -TLS_REGEX = re.compile(
34 - r'(?:[0-9a-f]+:[0-9a-f:]+|(?:\d{1,3}(?:\.\d{1,3}){3}(?::\d+)?)) (?P<bytes_in>\d+) (?P<bytes_out>\d+)'
35 -)
36 -STATIC_KEY_REGEX = re.compile(
37 - r'TCP/[A-Z]+ (?P<direction>(?:read|write)) bytes,(?P<bytes>\d+)'
38 -)
39 -
40 -
41 -class Service(SimpleService):
42 - def __init__(self, configuration=None, name=None):
43 - SimpleService.__init__(self, configuration=configuration, name=name)
44 - self.order = ORDER
45 - self.definitions = CHARTS
46 - self.log_path = self.configuration.get('log_path')
47 - self.regex = {
48 - 'tls': TLS_REGEX,
49 - 'static_key': STATIC_KEY_REGEX
50 - }
51 -
52 - def check(self):
53 - if not (self.log_path and isinstance(self.log_path, str)):
54 - self.error("'log_path' is not defined")
55 - return False
56 -
57 - data = self._get_raw_data()
58 - if not data:
59 - self.error('Make sure that the openvpn status log file exists and netdata has permission to read it')
60 - return None
61 -
62 - found = None
63 - for row in data:
64 - if 'ROUTING' in row:
65 - self.get_data = self.get_data_tls
66 - found = True
67 - break
68 - elif 'STATISTICS' in row:
69 - self.get_data = self.get_data_static_key
70 - found = True
71 - break
72 - if found:
73 - return True
74 - self.error('Failed to parse openvpn log file')
75 - return False
76 -
77 - def _get_raw_data(self):
78 - """
79 - Open log file
80 - :return: str
81 - """
82 -
83 - try:
84 - with open(self.log_path) as log:
85 - raw_data = log.readlines() or None
86 - except OSError:
87 - return None
88 - else:
89 - return raw_data
90 -
91 - def get_data_static_key(self):
92 - """
93 - Parse openvpn-status log file.
94 - """
95 -
96 - raw_data = self._get_raw_data()
97 - if not raw_data:
98 - return None
99 -
100 - data = dict(bytes_in=0, bytes_out=0)
101 -
102 - for row in raw_data:
103 - match = self.regex['static_key'].search(row)
104 - if match:
105 - match = match.groupdict()
106 - if match['direction'] == 'read':
107 - data['bytes_in'] += int(match['bytes'])
108 - else:
109 - data['bytes_out'] += int(match['bytes'])
110 -
111 - return data or None
112 -
113 - def get_data_tls(self):
114 - """
115 - Parse openvpn-status log file.
116 - """
117 -
118 - raw_data = self._get_raw_data()
119 - if not raw_data:
120 - return None
121 -
122 - data = dict(users=0, bytes_in=0, bytes_out=0)
123 - for row in raw_data:
124 - columns = row.split(',') if ',' in row else row.split()
125 - if 'UNDEF' in columns:
126 - # see https://openvpn.net/archive/openvpn-users/2004-08/msg00116.html
127 - continue
128 -
129 - match = self.regex['tls'].search(' '.join(columns))
130 - if match:
131 - match = match.groupdict()
132 - data['users'] += 1
133 - data['bytes_in'] += int(match['bytes_in'])
134 - data['bytes_out'] += int(match['bytes_out'])
135 -
136 - return data or None
collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.conf deleted
-97
@@ -1,97 +0,0 @@
1 -# netdata python.d.plugin configuration for openvpn status log
2 -#
3 -# This file is in YaML format. Generally the format is:
4 -#
5 -# name: value
6 -#
7 -# There are 2 sections:
8 -# - global variables
9 -# - one or more JOBS
10 -#
11 -# JOBS allow you to collect values from multiple sources.
12 -# Each source will have its own set of charts.
13 -#
14 -# JOB parameters have to be indented (using spaces only, example below).
15 -
16 -# ----------------------------------------------------------------------
17 -# Global Variables
18 -# These variables set the defaults for all JOBs, however each JOB
19 -# may define its own, overriding the defaults.
20 -
21 -# update_every sets the default data collection frequency.
22 -# If unset, the python.d.plugin default is used.
23 -# update_every: 1
24 -
25 -# priority controls the order of charts at the netdata dashboard.
26 -# Lower numbers move the charts towards the top of the page.
27 -# If unset, the default for python.d.plugin is used.
28 -# priority: 60000
29 -
30 -# penalty indicates whether to apply penalty to update_every in case of failures.
31 -# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
32 -# penalty: yes
33 -
34 -# autodetection_retry sets the job re-check interval in seconds.
35 -# The job is not deleted if check fails.
36 -# Attempts to start the job are made once every autodetection_retry.
37 -# This feature is disabled by default.
38 -# autodetection_retry: 0
39 -
40 -# ----------------------------------------------------------------------
41 -# JOBS (data collection sources)
42 -#
43 -# The default JOBS share the same *name*. JOBS with the same name
44 -# are mutually exclusive. Only one of them will be allowed running at
45 -# any time. This allows autodetection to try several alternatives and
46 -# pick the one that works.
47 -#
48 -# Any number of jobs is supported.
49 -#
50 -# All python.d.plugin JOBS (for all its modules) support a set of
51 -# predefined parameters. These are:
52 -#
53 -# job_name:
54 -# name: myname # the JOB's name as it will appear at the
55 -# # dashboard (by default is the job_name)
56 -# # JOBs sharing a name are mutually exclusive
57 -# update_every: 1 # the JOB's data collection frequency
58 -# priority: 60000 # the JOB's order on the dashboard
59 -# penalty: yes # the JOB's penalty
60 -# autodetection_retry: 0 # the JOB's re-check interval in seconds
61 -#
62 -# Additionally to the above, openvpn status log also supports the following:
63 -#
64 -# log_path: 'PATH' # the path to openvpn status log file
65 -#
66 -# ----------------------------------------------------------------------
67 -# AUTO-DETECTION JOBS
68 -# only one of them will run (they have the same name)
69 -#
70 -# IMPORTANT information
71 -#
72 -# 1. If you are running multiple OpenVPN instances out of the same directory, MAKE SURE TO EDIT DIRECTIVES which create output files
73 -# so that multiple instances do not overwrite each other's output files.
74 -# 2. Make sure NETDATA USER CAN READ openvpn-status.log
75 -#
76 -# * cd into directory with openvpn-status.log and run the following commands as root
77 -# * #chown :netdata openvpn-status.log && chmod 640 openvpn-status.log
78 -# * To check permission and group membership run
79 -# * #ls -l openvpn-status.log
80 -# -rw-r----- 1 root netdata 359 dec 21 21:22 openvpn-status.log
81 -#
82 -# 3. Update_every interval MUST MATCH interval on which OpenVPN writes operational status to log file.
83 -# If its not true traffic chart WILL DISPLAY WRONG values
84 -#
85 -# Default OpenVPN update interval is 10 second on Debian 8
86 -# # ps -C openvpn -o command=
87 -# /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --config /etc/openvpn/server.conf
88 -#
89 -# 4. Confirm status is configured in your OpenVPN configuration.
90 -# * Open OpenVPN config in an editor (e.g. sudo nano /etc/openvpn/default.conf)
91 -# * Confirm status is enabled with below:
92 -# status /var/log/openvpn-status.log
93 -#
94 -#default:
95 -# log_path: '/var/log/openvpn-status.log'
96 -#
97 -# ----------------------------------------------------------------------
collectors/python.d.plugin/python.d.conf
-2
@@ -33,7 +33,6 @@ gc_interval: 300
33 # bind_rndc: yes
34 # boinc: yes
35 # ceph: yes
36 -chrony: no
36 # changefinder: no
37 # dockerd: yes
38 # dovecot: yes
@@ -63,7 +62,6 @@ logind: no
62 # ntpd: yes
63 # openldap: yes
64 # oracledb: yes
66 -# ovpn_status_log: yes
65 # postfix: yes
66 # postgres: yes
67 # proxysql: yes
packaging/installer/install-required-packages.sh
-7
@@ -712,13 +712,6 @@ declare -A pkg_bridge_utils=(
712 ['default']="bridge-utils"
713 )
714
715 -declare -A pkg_chrony=(
716 - ['gentoo']="net-misc/chrony"
717 - ['clearlinux']="time-server-basic"
718 - ['macos']="WARNING|"
719 - ['default']="chrony"
720 -)
721 -
715 declare -A pkg_curl=(
716 ['gentoo']="net-misc/curl"
717 ['sabayon']="net-misc/curl"