summaryrefslogtreecommitdiffstats
path: root/collectors
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2022-07-13 11:33:49 +0300
committerGitHub <noreply@github.com>2022-07-13 11:33:49 +0300
commitdfbc3bfb034be1aa452cae5a2d932e4a0cc3a845 (patch)
treefd2791cf3028f5c123be32f18452e5b72685c1c8 /collectors
parent712681fa52524c381923149c661f3b38c6a7d80a (diff)
chore(python.d): remove python.d/* announced in v1.35.0 deprecation notice (#13370)
Diffstat (limited to 'collectors')
-rw-r--r--collectors/COLLECTORS.md49
-rw-r--r--collectors/python.d.plugin/Makefile.am2
-rw-r--r--collectors/python.d.plugin/chrony/Makefile.inc13
-rw-r--r--collectors/python.d.plugin/chrony/README.md61
-rw-r--r--collectors/python.d.plugin/chrony/chrony.chart.py118
-rw-r--r--collectors/python.d.plugin/chrony/chrony.conf77
-rw-r--r--collectors/python.d.plugin/ovpn_status_log/Makefile.inc13
-rw-r--r--collectors/python.d.plugin/ovpn_status_log/README.md50
-rw-r--r--collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.chart.py136
-rw-r--r--collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.conf97
-rw-r--r--collectors/python.d.plugin/python.d.conf2
11 files changed, 27 insertions, 591 deletions
diff --git a/collectors/COLLECTORS.md b/collectors/COLLECTORS.md
index 13c757d96e..01faec95b1 100644
--- a/collectors/COLLECTORS.md
+++ b/collectors/COLLECTORS.md
@@ -22,13 +22,18 @@ version](/docs/collect/enable-configure.md), and enable the Python version. Netd
attempts to load the Python version and its accompanying configuration file.
If you don't see the app/service you'd like to monitor in this list:
-- Check out our [GitHub issues](https://github.com/netdata/netdata/issues). Use the search bar to look for previous discussions about that
-collector—we may be looking for assistance from users such as yourself!
-- If you don't see the collector there, you can make a [feature request](https://github.com/netdata/netdata/issues/new/choose) on GitHub.
-- 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)
+
+- Check out our [GitHub issues](https://github.com/netdata/netdata/issues). Use the search bar to look for previous
+ discussions about that collector—we may be looking for assistance from users such as yourself!
+- If you don't see the collector there, you can make
+ a [feature request](https://github.com/netdata/netdata/issues/new/choose) on GitHub.
+- 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)
Supported Collectors List:
- - [Service and application collectors](#service-and-application-collectors)
+
+- [Service and application collectors](#service-and-application-collectors)
- [Generic](#generic)
- [APM (application performance monitoring)](#apm-application-performance-monitoring)
- [Containers and VMs](#containers-and-vms)
@@ -44,7 +49,7 @@ Supported Collectors List:
- [Search](#search)
- [Storage](#storage)
- [Web](#web)
- - [System collectors](#system-collectors)
+- [System collectors](#system-collectors)
- [Applications](#applications)
- [Disks and filesystems](#disks-and-filesystems)
- [eBPF](#ebpf)
@@ -55,10 +60,10 @@ Supported Collectors List:
- [Processes](#processes)
- [Resources](#resources)
- [Users](#users)
- - [Netdata collectors](#netdata-collectors)
- - [Orchestrators](#orchestrators)
- - [Third-party collectors](#third-party-collectors)
- - [Etc](#etc)
+- [Netdata collectors](#netdata-collectors)
+- [Orchestrators](#orchestrators)
+- [Third-party collectors](#third-party-collectors)
+- [Etc](#etc)
## Service and application collectors
@@ -169,9 +174,8 @@ configure any of these collectors according to your setup and infrastructure.
plugins metrics from an endpoint provided by `in_monitor plugin`.
- [Logstash](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/logstash/): Monitor JVM threads,
memory usage, garbage collection statistics, and more.
-- [OpenVPN status logs](/collectors/python.d.plugin/ovpn_status_log/README.md): Parse server log files and provide
- summary
- (client, traffic) metrics.
+- [OpenVPN status logs](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/openvpn_status_log): Parse
+ server log files and provide summary (client, traffic) metrics.
- [Squid web server logs](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/squidlog/): Tail Squid
access logs to return the volume of requests, types of requests, bandwidth, and much more.
- [Web server logs (Go version for Apache,
@@ -200,8 +204,8 @@ configure any of these collectors according to your setup and infrastructure.
- [Bind 9](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/bind/): Collect nameserver summary
performance statistics via a web interface (`statistics-channels` feature).
-- [Chrony](/collectors/python.d.plugin/chrony/README.md): Monitor the precision and statistics of a local `chronyd`
- server.
+- [Chrony](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/chrony): Monitor the precision and
+ statistics of a local `chronyd` server.
- [CoreDNS](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/coredns/): Measure DNS query round
trip time.
- [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.
- [AM2320](/collectors/python.d.plugin/am2320/README.md): Monitor sensor temperature and humidity.
- [Access point](/collectors/charts.d.plugin/ap/README.md): Monitor client, traffic and signal metrics using the `aw`
- tool.
+ tool.
- [APC UPS](/collectors/charts.d.plugin/apcupsd/README.md): Capture status information using the `apcaccess` tool.
- [Energi Core](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/energid): Monitor
- blockchain indexes, memory usage, network usage, and transactions of wallet instances.
+ blockchain indexes, memory usage, network usage, and transactions of wallet instances.
- [UPS/PDU](/collectors/charts.d.plugin/nut/README.md): Read the status of UPS/PDU devices using the `upsc` tool.
-- [SNMP devices](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/snmp): Gather data using the SNMP protocol.
-- [1-Wire sensors](/collectors/python.d.plugin/w1sensor/README.md): Monitor sensor temperature.
+- [SNMP devices](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/snmp): Gather data using the SNMP
+ protocol.
+- [1-Wire sensors](/collectors/python.d.plugin/w1sensor/README.md): Monitor sensor temperature.
### Search
@@ -482,9 +487,9 @@ Plugin orchestrators organize and run many of the above collectors.
If you're interested in developing a new collector that you'd like to contribute to Netdata, we highly recommend using
the `go.d.plugin`.
-- [go.d.plugin](https://github.com/netdata/go.d.plugin): An orchestrator for data collection modules written in `go`.
-- [python.d.plugin](python.d.plugin/README.md): An orchestrator for data collection modules written in `python` v2/v3.
-- [charts.d.plugin](charts.d.plugin/README.md): An orchestrator for data collection modules written in `bash` v4+.
+- [go.d.plugin](https://github.com/netdata/go.d.plugin): An orchestrator for data collection modules written in `go`.
+- [python.d.plugin](python.d.plugin/README.md): An orchestrator for data collection modules written in `python` v2/v3.
+- [charts.d.plugin](charts.d.plugin/README.md): An orchestrator for data collection modules written in `bash` v4+.
## Third-party collectors
diff --git a/collectors/python.d.plugin/Makefile.am b/collectors/python.d.plugin/Makefile.am
index 667f1627cc..9377ebe8d6 100644
--- a/collectors/python.d.plugin/Makefile.am
+++ b/collectors/python.d.plugin/Makefile.am
@@ -48,7 +48,6 @@ include bind_rndc/Makefile.inc
include boinc/Makefile.inc
include ceph/Makefile.inc
include changefinder/Makefile.inc
-include chrony/Makefile.inc
include dockerd/Makefile.inc
include dovecot/Makefile.inc
include example/Makefile.inc
@@ -71,7 +70,6 @@ include nginx_plus/Makefile.inc
include nvidia_smi/Makefile.inc
include nsd/Makefile.inc
include ntpd/Makefile.inc
-include ovpn_status_log/Makefile.inc
include openldap/Makefile.inc
include oracledb/Makefile.inc
include postfix/Makefile.inc
diff --git a/collectors/python.d.plugin/chrony/Makefile.inc b/collectors/python.d.plugin/chrony/Makefile.inc
deleted file mode 100644
index 18a805b12e..0000000000
--- a/collectors/python.d.plugin/chrony/Makefile.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-# THIS IS NOT A COMPLETE Makefile
-# IT IS INCLUDED BY ITS PARENT'S Makefile.am
-# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
-
-# install these files
-dist_python_DATA += chrony/chrony.chart.py
-dist_pythonconfig_DATA += chrony/chrony.conf
-
-# do not install these files, but include them in the distribution
-dist_noinst_DATA += chrony/README.md chrony/Makefile.inc
-
diff --git a/collectors/python.d.plugin/chrony/README.md b/collectors/python.d.plugin/chrony/README.md
deleted file mode 100644
index 3093ec3f92..0000000000
--- a/collectors/python.d.plugin/chrony/README.md
+++ /dev/null
@@ -1,61 +0,0 @@
-<!--
-title: "Chrony monitoring with Netdata"
-custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/chrony/README.md
-sidebar_label: "Chrony"
--->
-
-# Chrony monitoring with Netdata
-
-Monitors the precision and statistics of a local chronyd server, and produces:
-
-- frequency
-- last offset
-- RMS offset
-- residual freq
-- root delay
-- root dispersion
-- skew
-- system time
-
-## Requirements
-
-Verify that user Netdata can execute `chronyc tracking`. If necessary, update `/etc/chrony.conf`, `cmdallow`.
-
-## Enable the collector
-
-The `chrony` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config
-directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.
-
-```bash
-cd /etc/netdata # Replace this path with your Netdata config directory, if different
-sudo ./edit-config python.d.conf
-```
-
-Change the value of the `chrony` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl
-restart netdata`, or the appropriate method for your system, to finish enabling the `chrony` collector.
-
-## Configuration
-
-Edit the `python.d/chrony.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/chrony.conf
-```
-
-Sample:
-
-```yaml
-# data collection frequency:
-update_every: 1
-
-# chrony query command:
-local:
- command: 'chronyc -n tracking'
-```
-
-Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate
-method](/docs/configure/start-stop-restart.md) for your system, to finish configuring the `chrony` collector.
-
-
diff --git a/collectors/python.d.plugin/chrony/chrony.chart.py b/collectors/python.d.plugin/chrony/chrony.chart.py
deleted file mode 100644
index 91f7250011..0000000000
--- a/collectors/python.d.plugin/chrony/chrony.chart.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# -*- coding: utf-8 -*-
-# Description: chrony netdata python.d module
-# Author: Dominik Schloesser (domschl)
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-from bases.FrameworkServices.ExecutableService import ExecutableService
-
-# default module values (can be overridden per job in `config`)
-update_every = 5
-
-CHRONY_COMMAND = 'chronyc -n tracking'
-
-# charts order (can be overridden if you want less charts, or different order)
-ORDER = [
- 'system',
- 'offsets',
- 'stratum',
- 'root',
- 'frequency',
- 'residualfreq',
- 'skew',
-]
-
-CHARTS = {
- 'system': {
- 'options': [None, 'Chrony System Time Deltas', 'microseconds', 'system', 'chrony.system', 'area'],
- 'lines': [
- ['timediff', 'system time', 'absolute', 1, 1000]
- ]
- },
- 'offsets': {
- 'options': [None, 'Chrony System Time Offsets', 'microseconds', 'system', 'chrony.offsets', 'area'],
- 'lines': [
- ['lastoffset', 'last offset', 'absolute', 1, 1000],
- ['rmsoffset', 'RMS offset', 'absolute', 1, 1000]
- ]
- },
- 'stratum': {
- 'options': [None, 'Chrony Stratum', 'stratum', 'root', 'chrony.stratum', 'line'],
- 'lines': [
- ['stratum', None, 'absolute', 1, 1]
- ]
- },
- 'root': {
- 'options': [None, 'Chrony Root Delays', 'milliseconds', 'root', 'chrony.root', 'line'],
- 'lines': [
- ['rootdelay', 'delay', 'absolute', 1, 1000000],
- ['rootdispersion', 'dispersion', 'absolute', 1, 1000000]
- ]
- },
- 'frequency': {
- 'options': [None, 'Chrony Frequency', 'ppm', 'frequencies', 'chrony.frequency', 'area'],
- 'lines': [
- ['frequency', None, 'absolute', 1, 1000]
- ]
- },
- 'residualfreq': {
- 'options': [None, 'Chrony Residual frequency', 'ppm', 'frequencies', 'chrony.residualfreq', 'area'],
- 'lines': [
- ['residualfreq', 'residual frequency', 'absolute', 1, 1000]
- ]
- },
- 'skew': {
- 'options': [None, 'Chrony Skew, error bound on frequency', 'ppm', 'frequencies', 'chrony.skew', 'area'],
- 'lines': [
- ['skew', None, 'absolute', 1, 1000]
- ]
- }
-}
-
-CHRONY = [
- ('Frequency', 'frequency', 1e3),
- ('Last offset', 'lastoffset', 1e9),
- ('RMS offset', 'rmsoffset', 1e9),
- ('Residual freq', 'residualfreq', 1e3),
- ('Root delay', 'rootdelay', 1e9),
- ('Root dispersion', 'rootdispersion', 1e9),
- ('Skew', 'skew', 1e3),
- ('Stratum', 'stratum', 1),
- ('System time', 'timediff', 1e9)
-]
-
-
-class Service(ExecutableService):
- def __init__(self, configuration=None, name=None):
- ExecutableService.__init__(
- self, configuration=configuration, name=name)
- self.order = ORDER
- self.definitions = CHARTS
- self.command = CHRONY_COMMAND
-
- def _get_data(self):
- """
- Format data received from shell command
- :return: dict
- """
- raw_data = self._get_raw_data()
- if not raw_data:
- return None
-
- raw_data = (line.split(':', 1) for line in raw_data)
- parsed, data = dict(), dict()
-
- for line in raw_data:
- try:
- key, value = (l.strip() for l in line)
- except ValueError:
- continue
- if value:
- parsed[key] = value.split()[0]
-
- for key, dim_id, multiplier in CHRONY:
- try:
- data[dim_id] = int(float(parsed[key]) * multiplier)
- except (KeyError, ValueError):
- continue
-
- return data or None
diff --git a/collectors/python.d.plugin/chrony/chrony.conf b/collectors/python.d.plugin/chrony/chrony.conf
deleted file mode 100644
index fd95519b5f..0000000000
--- a/collectors/python.d.plugin/chrony/chrony.conf
+++ /dev/null
@@ -1,77 +0,0 @@
-# netdata python.d.plugin configuration for chrony
-#
-# This file is in YaML format. Generally the format is:
-#
-# name: value
-#
-# There are 2 sections:
-# - global variables
-# - one or more JOBS
-#
-# JOBS allow you to collect values from multiple sources.
-# Each source will have its own set of charts.
-#
-# JOB parameters have to be indented (using spaces only, example below).
-
-# ----------------------------------------------------------------------
-# Global Variables
-# These variables set the defaults for all JOBs, however each JOB
-# may define its own, overriding the defaults.
-
-# update_every sets the default data collection frequency.
-# If unset, the python.d.plugin default is used.
-update_every: 5
-
-# priority controls the order of charts at the netdata dashboard.
-# Lower numbers move the charts towards the top of the page.
-# If unset, the default for python.d.plugin is used.
-# priority: 60000
-
-# penalty indicates whether to apply penalty to update_every in case of failures.
-# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
-# penalty: yes
-
-# autodetection_retry sets the job re-check interval in seconds.
-# The job is not deleted if check fails.
-# Attempts to start the job are made once every autodetection_retry.
-# This feature is disabled by default.
-# autodetection_retry: 0
-
-# ----------------------------------------------------------------------
-# JOBS (data collection sources)
-#
-# The default JOBS share the same *name*. JOBS with the same name
-# are mutually exclusive. Only one of them will be allowed running at
-# any time. This allows autodetection to try several alternatives and
-# pick the one that works.
-#
-# Any number of jobs is supported.
-#
-# All python.d.plugin JOBS (for all its modules) support a set of
-# predefined parameters. These are:
-#
-# job_name:
-# name: myname # the JOB's name as it will appear at the
-# # dashboard (by default is the job_name)
-# # JOBs sharing a name are mutually exclusive
-# update_every: 1 # the JOB's data collection frequency
-# priority: 60000 # the JOB's order on the dashboard
-# penalty: yes # the JOB's penalty
-# autodetection_retry: 0 # the JOB's re-check interval in seconds
-#
-# Additionally to the above, chrony also supports the following:
-#
-# command: 'chrony tracking' # the command to run
-#
-
-# ----------------------------------------------------------------------
-# REQUIRED chrony CONFIGURATION
-#
-# netdata will query chrony as user netdata.
-# verify that user netdata is allowed to call 'chronyc tracking'
-# Check cmdallow in chrony.conf
-# ----------------------------------------------------------------------
-# AUTO-DETECTION JOBS
-
-local:
- command: 'chronyc -n tracking'
diff --git a/collectors/python.d.plugin/ovpn_status_log/Makefile.inc b/collectors/python.d.plugin/ovpn_status_log/Makefile.inc
deleted file mode 100644
index 1fbc506d6e..0000000000
--- a/collectors/python.d.plugin/ovpn_status_log/Makefile.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-# THIS IS NOT A COMPLETE Makefile
-# IT IS INCLUDED BY ITS PARENT'S Makefile.am
-# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
-
-# install these files
-dist_python_DATA += ovpn_status_log/ovpn_status_log.chart.py
-dist_pythonconfig_DATA += ovpn_status_log/ovpn_status_log.conf
-
-# do not install these files, but include them in the distribution
-dist_noinst_DATA += ovpn_status_log/README.md ovpn_status_log/Makefile.inc
-
diff --git a/collectors/python.d.plugin/ovpn_status_log/README.md b/collectors/python.d.plugin/ovpn_status_log/README.md
deleted file mode 100644
index 374d1910e2..0000000000
--- a/collectors/python.d.plugin/ovpn_status_log/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
-title: "OpenVPN monitoring with Netdata"
-custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/ovpn_status_log/README.md
-sidebar_label: "OpenVPN"
--->
-
-# OpenVPN monitoring with Netdata
-
-Parses server log files and provides summary (client, traffic) metrics.
-
-## Requirements
-
-- If you are running multiple OpenVPN instances out of the same directory, MAKE SURE TO EDIT DIRECTIVES which create output files
- so that multiple instances do not overwrite each other's output files.
-
-- Make sure NETDATA USER CAN READ openvpn-status.log
-
-- Update_every interval MUST MATCH interval on which OpenVPN writes operational status to log file.
-
-It produces:
-
-1. **Users** OpenVPN active users
-
- - users
-
-2. **Traffic** OpenVPN overall bandwidth usage in kilobit/s
-
- - in
- - out
-
-## Configuration
-
-Edit the `python.d/ovpn_status_log.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/ovpn_status_log.conf
-```
-
-Sample:
-
-```yaml
-default
- log_path : '/var/log/openvpn-status.log'
-```
-
----
-
-
diff --git a/collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.chart.py b/collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.chart.py
deleted file mode 100644
index cfc87be363..0000000000
--- a/collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.chart.py
+++ /dev/null
@@ -1,136 +0,0 @@
-# -*- coding: utf-8 -*-
-# Description: openvpn status log netdata python.d module
-# Author: ilyam8
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-import re
-
-from bases.FrameworkServices.SimpleService import SimpleService
-
-update_every = 10
-
-ORDER = [
- 'users',
- 'traffic',
-]
-
-CHARTS = {
- 'users': {
- 'options': [None, 'OpenVPN Active Users', 'active users', 'users', 'openvpn_status.users', 'line'],
- 'lines': [
- ['users', None, 'absolute'],
- ]
- },
- 'traffic': {
- 'options': [None, 'OpenVPN Traffic', 'KiB/s', 'traffic', 'openvpn_status.traffic', 'area'],
- 'lines': [
- ['bytes_in', 'in', 'incremental', 1, 1 << 10],
- ['bytes_out', 'out', 'incremental', -1, 1 << 10]
- ]
- }
-}
-
-TLS_REGEX = re.compile(
- r'(?:[0-9a-f]+:[0-9a-f:]+|(?:\d{1,3}(?:\.\d{1,3}){3}(?::\d+)?)) (?P<bytes_in>\d+) (?P<bytes_out>\d+)'
-)
-STATIC_KEY_REGEX = re.compile(
- r'TCP/[A-Z]+ (?P<direction>(?:read|write)) bytes,(?P<bytes>\d+)'
-)
-
-
-class Service(SimpleService):
- def __init__(self, configuration=None, name=None):
- SimpleService.__init__(self, configuration=configuration, name=name)
- self.order = ORDER
- self.definitions = CHARTS
- self.log_path = self.configuration.get('log_path')
- self.regex = {
- 'tls': TLS_REGEX,
- 'static_key': STATIC_KEY_REGEX
- }
-
- def check(self):
- if not (self.log_path and isinstance(self.log_path, str)):
- self.error("'log_path' is not defined")
- return False
-
- data = self._get_raw_data()
- if not data:
- self.error('Make sure that the openvpn status log file exists and netdata has permission to read it')
- return None
-
- found = None
- for row in data:
- if 'ROUTING' in row:
- self.get_data = self.get_data_tls
- found = True
- break
- elif 'STATISTICS' in row:
- self.get_data = self.get_data_static_key
- found = True
- break
- if found:
- return True
- self.error('Failed to parse openvpn log file')
- return False
-
- def _get_raw_data(self):
- """
- Open log file
- :return: str
- """
-
- try:
- with open(self.log_path) as log:
- raw_data = log.readlines() or None
- except OSError:
- return None
- else:
- return raw_data
-
- def get_data_static_key(self):
- """
- Parse openvpn-status log file.
- """
-
- raw_data = self._get_raw_data()
- if not raw_data:
- return None
-
- data = dict(bytes_in=0, bytes_out=0)
-
- for row in raw_data:
- match = self.regex['static_key'].search(row)
- if match:
- match = match.groupdict()
- if match['direction'] == 'read':
- data['bytes_in'] += int(match['bytes'])
- else:
- data['bytes_out'] += int(match['bytes'])
-
- return data or None
-
- def get_data_tls(self):
- """
- Parse openvpn-status log file.
- """
-
- raw_data = self._get_raw_data()
- if not raw_data:
- return None
-
- data = dict(users=0, bytes_in=0, bytes_out=0)
- for row in raw_data:
- columns = row.split(',') if ',' in row else row.split()
- if 'UNDEF' in columns:
- # see https://openvpn.net/archive/openvpn-users/2004-08/msg00116.html
- continue
-
- match = self.regex['tls'].search(' '.join(columns))
- if match:
- match = match.groupdict()
- data['users'] += 1
- data['bytes_in'] += int(match['bytes_in'])
- data['bytes_out'] += int(match['bytes_out'])
-
- return data or None
diff --git a/collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.conf b/collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.conf
deleted file mode 100644
index 1d71f6b8e2..0000000000
--- a/collectors/python.d.plugin/ovpn_status_log/ovpn_status_log.conf
+++ /dev/null
@@ -1,97 +0,0 @@
-# netdata python.d.plugin configuration for openvpn status log
-#
-# This file is in YaML format. Generally the format is:
-#
-# name: value
-#
-# There are 2 sections:
-# - global variables
-# - one or more JOBS
-#
-# JOBS allow you to collect values from multiple sources.
-# Each source will have its own set of charts.
-#
-# JOB parameters have to be indented (using spaces only, example below).
-
-# ----------------------------------------------------------------------
-# Global Variables
-# These variables set the defaults for all JOBs, however each JOB
-# may define its own, overriding the defaults.
-
-# update_every sets the default data collection frequency.
-# If unset, the python.d.plugin default is used.
-# update_every: 1
-
-# priority controls the order of charts at the netdata dashboard.
-# Lower numbers move the charts towards the top of the page.
-# If unset, the default for python.d.plugin is used.
-# priority: 60000
-
-# penalty indicates whether to apply penalty to update_every in case of failures.
-# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
-# penalty: yes
-
-# autodetection_retry sets the job re-check interval in seconds.
-# The job is not deleted if check fails.
-# Attempts to start the job are made once every autodetection_retry.
-# This feature is disabled by default.
-# autodetection_retry: 0
-
-# ----------------------------------------------------------------------
-# JOBS (data collection sources)
-#
-# The default JOBS share the same *name*. JOBS with the same name
-# are mutually exclusive. Only one of them will be allowed running at
-# any time. This allows autodetection to try several alternatives and
-# pick the one that works.
-#
-# Any number of jobs is supported.
-#
-# All python.d.plugin JOBS (for all its modules) support a set of
-# predefined parameters. These are:
-#
-# job_name:
-# name: myname # the JOB's name as it will appear at the
-# # dashboard (by default is the job_name)
-# # JOBs sharing a name are mutually exclusive
-# update_every: 1 # the JOB's data collection frequency
-# priority: 60000 # the JOB's order on the dashboard
-# penalty: yes # the JOB's penalty
-# autodetection_retry: 0 # the JOB's re-check interval in seconds
-#
-# Additionally to the above, openvpn status log also supports the following:
-#
-# log_path: 'PATH' # the path to openvpn status log file
-#
-# ----------------------------------------------------------------------
-# AUTO-DETECTION JOBS
-# only one of them will run (they have the same name)
-#
-# IMPORTANT information
-#
-# 1. If you are running multiple OpenVPN instances out of the same directory, MAKE SURE TO EDIT DIRECTIVES which create output files
-# so that multiple instances do not overwrite each other's output files.
-# 2. Make sure NETDATA USER CAN READ openvpn-status.log
-#
-# * cd into directory with openvpn-status.log and run the following commands as root
-# * #chown :netdata openvpn-status.log && chmod 640 openvpn-status.log
-# * To check permission and group membership run
-# * #ls -l openvpn-status.log
-# -rw-r----- 1 root netdata 359 dec 21 21:22 openvpn-status.log
-#
-# 3. Update_every interval MUST MATCH interval on which OpenVPN writes operational status to log file.
-# If its not true traffic chart WILL DISPLAY WRONG values
-#
-# Default OpenVPN update interval is 10 second on Debian 8
-# # ps -C openvpn -o command=
-# /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --config /etc/openvpn/server.conf
-#
-# 4. Confirm status is configured in your OpenVPN configuration.
-# * Open OpenVPN config in an editor (e.g. sudo nano /etc/openvpn/default.conf)
-# * Confirm status is enabled with below:
-# status /var/log/openvpn-status.log
-#
-#default:
-# log_path: '/var/log/openvpn-status.log'
-#
-# ----------------------------------------------------------------------
diff --git a/collectors/python.d.plugin/python.d.conf b/collectors/python.d.plugin/python.d.conf
index a6d34fa78a..72e20fcd32 100644
--- a/collectors/python.d.plugin/python.d.conf
+++ b/collectors/python.d.plugin/python.d.conf
@@ -33,7 +33,6 @@ gc_interval: 300
# bind_rndc: yes
# boinc: yes
# ceph: yes
-chrony: no
# changefinder: no
# dockerd: yes
# dovecot: yes
@@ -63,7 +62,6 @@ logind: no
# ntpd: yes
# openldap: yes
# oracledb: yes
-# ovpn_status_log: yes
# postfix: yes
# postgres: yes
# proxysql: yes