remove deprecated python.d collectors announced in v1.37.0 deprecation notice (#14072)
Ilya Mashchenko committed
Dec 9, 2022 at 17:33 UTC
ab28a99a4837b6a5de4073a6200cdb098a3c0920
12 files changed
+3
-473
collectors/COLLECTORS.md
+2
-2
@@ -96,7 +96,7 @@ configure any of these collectors according to your setup and infrastructure.
96
97
- [Docker containers](/collectors/cgroups.plugin/README.md): Monitor the health and performance of individual Docker
98
containers using the cgroups collector plugin.
99
-- [DockerD](/collectors/python.d.plugin/dockerd/README.md): Collect container health statistics.
99
+- [DockerD](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/docker/): Collect container health statistics.
100
- [Docker Engine](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/docker_engine/): Collect
101
runtime statistics from the `docker` daemon using the `metrics-address` feature.
102
- [Docker Hub](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/dockerhub/): Collect statistics
@@ -460,7 +460,7 @@ The Netdata Agent can collect these system- and hardware-level metrics using a v
460
461
### Users
462
463
-- [systemd-logind](/collectors/python.d.plugin/logind/README.md): Monitor active sessions, users, and seats tracked
463
+- [systemd-logind](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/logind/): Monitor active sessions, users, and seats tracked
464
by `systemd-logind` or `elogind`.
465
- [User/group usage](/collectors/apps.plugin/README.md): Gather CPU, disk, memory, network, and other metrics per user
466
and user group using the `apps.plugin` collector.
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 dockerd/Makefile.inc
51
include dovecot/Makefile.inc
52
include example/Makefile.inc
53
include exim/Makefile.inc
@@ -61,7 +60,6 @@ include hpssa/Makefile.inc
60
include icecast/Makefile.inc
61
include ipfs/Makefile.inc
62
include litespeed/Makefile.inc
64
-include logind/Makefile.inc
63
include megacli/Makefile.inc
64
include memcached/Makefile.inc
65
include mongodb/Makefile.inc
collectors/python.d.plugin/dockerd/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 += dockerd/dockerd.chart.py
9
-dist_pythonconfig_DATA += dockerd/dockerd.conf
10
-
11
-# do not install these files, but include them in the distribution
12
-dist_noinst_DATA += dockerd/README.md dockerd/Makefile.inc
13
-
collectors/python.d.plugin/dockerd/README.md
deleted
-46
@@ -1,46 +0,0 @@
1
-<!--
2
-title: "Docker Engine monitoring with Netdata"
3
-custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/dockerd/README.md
4
-sidebar_label: "Docker Engine"
5
--->
6
-
7
-# Docker Engine monitoring with Netdata
8
-
9
-Collects docker container health metrics.
10
-
11
-**Requirement:**
12
-
13
-- `docker` package, required version 3.2.0+
14
-
15
-Following charts are drawn:
16
-
17
-1. **running containers**
18
-
19
- - count
20
-
21
-2. **healthy containers**
22
-
23
- - count
24
-
25
-3. **unhealthy containers**
26
-
27
- - count
28
-
29
-## Configuration
30
-
31
-Edit the `python.d/dockerd.conf` configuration file using `edit-config` from the Netdata [config
32
-directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
33
-
34
-```bash
35
-cd /etc/netdata # Replace this path with your Netdata config directory, if different
36
-sudo ./edit-config python.d/dockerd.conf
37
-```
38
-
39
-```yaml
40
- update_every : 1
41
- priority : 60000
42
-```
43
-
44
----
45
-
46
-
collectors/python.d.plugin/dockerd/dockerd.chart.py
deleted
-86
@@ -1,86 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-# Description: docker netdata python.d module
3
-# Author: Kévin Darcel (@tuxity)
4
-
5
-try:
6
- import docker
7
-
8
- HAS_DOCKER = True
9
-except ImportError:
10
- HAS_DOCKER = False
11
-
12
-from distutils.version import StrictVersion
13
-
14
-from bases.FrameworkServices.SimpleService import SimpleService
15
-
16
-# charts order (can be overridden if you want less charts, or different order)
17
-ORDER = [
18
- 'running_containers',
19
- 'healthy_containers',
20
- 'unhealthy_containers'
21
-]
22
-
23
-CHARTS = {
24
- 'running_containers': {
25
- 'options': [None, 'Number of running containers', 'containers', 'running containers',
26
- 'docker.running_containers', 'line'],
27
- 'lines': [
28
- ['running_containers', 'running']
29
- ]
30
- },
31
- 'healthy_containers': {
32
- 'options': [None, 'Number of healthy containers', 'containers', 'healthy containers',
33
- 'docker.healthy_containers', 'line'],
34
- 'lines': [
35
- ['healthy_containers', 'healthy']
36
- ]
37
- },
38
- 'unhealthy_containers': {
39
- 'options': [None, 'Number of unhealthy containers', 'containers', 'unhealthy containers',
40
- 'docker.unhealthy_containers', 'line'],
41
- 'lines': [
42
- ['unhealthy_containers', 'unhealthy']
43
- ]
44
- }
45
-}
46
-
47
-MIN_REQUIRED_VERSION = '3.2.0'
48
-
49
-
50
-class Service(SimpleService):
51
- def __init__(self, configuration=None, name=None):
52
- SimpleService.__init__(self, configuration=configuration, name=name)
53
- self.order = ORDER
54
- self.definitions = CHARTS
55
- self.client = None
56
-
57
- def check(self):
58
- if not HAS_DOCKER:
59
- self.error("'docker' package is needed to use dockerd module")
60
- return False
61
-
62
- if StrictVersion(docker.__version__) < StrictVersion(MIN_REQUIRED_VERSION):
63
- self.error("installed 'docker' package version {0}, minimum required version {1}, please upgrade".format(
64
- docker.__version__,
65
- MIN_REQUIRED_VERSION,
66
- ))
67
- return False
68
-
69
- self.client = docker.DockerClient(base_url=self.configuration.get('url', 'unix://var/run/docker.sock'))
70
-
71
- try:
72
- self.client.ping()
73
- except docker.errors.APIError as error:
74
- self.error(error)
75
- return False
76
-
77
- return True
78
-
79
- def get_data(self):
80
- data = dict()
81
-
82
- data['running_containers'] = len(self.client.containers.list(sparse=True))
83
- data['healthy_containers'] = len(self.client.containers.list(filters={'health': 'healthy'}, sparse=True))
84
- data['unhealthy_containers'] = len(self.client.containers.list(filters={'health': 'unhealthy'}, sparse=True))
85
-
86
- return data or None
collectors/python.d.plugin/dockerd/dockerd.conf
deleted
-77
@@ -1,77 +0,0 @@
1
-# netdata python.d.plugin configuration for dockerd health data API
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, dockerd plugin also supports the following:
63
-#
64
-# url: '<scheme>://<host>:<port>/<health_page_api>'
65
-# # http://localhost:8080/health
66
-#
67
-# if the URL is password protected, the following are supported:
68
-#
69
-# user: 'username'
70
-# pass: 'password'
71
-#
72
-# ----------------------------------------------------------------------
73
-# AUTO-DETECTION JOBS
74
-# only one of them will run (they have the same name)
75
-#
76
-local:
77
- url: 'unix://var/run/docker.sock'
collectors/python.d.plugin/logind/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 += logind/logind.chart.py
9
-dist_pythonconfig_DATA += logind/logind.conf
10
-
11
-# do not install these files, but include them in the distribution
12
-dist_noinst_DATA += logind/README.md logind/Makefile.inc
13
-
collectors/python.d.plugin/logind/README.md
deleted
-86
@@ -1,86 +0,0 @@
1
-<!--
2
-title: "systemd-logind monitoring with Netdata"
3
-custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/logind/README.md
4
-sidebar_label: "systemd-logind"
5
--->
6
-
7
-# Systemd-Logind monitoring with Netdata
8
-
9
-Monitors active sessions, users, and seats tracked by `systemd-logind` or `elogind`.
10
-
11
-It provides the following charts:
12
-
13
-1. **Sessions** Tracks the total number of sessions.
14
-
15
- - Graphical: Local graphical sessions (running X11, or Wayland, or something else).
16
- - Console: Local console sessions.
17
- - Remote: Remote sessions.
18
-
19
-2. **Users** Tracks total number of unique user logins of each type.
20
-
21
- - Graphical
22
- - Console
23
- - Remote
24
-
25
-3. **Seats** Total number of seats in use.
26
-
27
- - Seats
28
-
29
-## Enable the collector
30
-
31
-The `logind` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config
32
-directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.
33
-
34
-```bash
35
-cd /etc/netdata # Replace this path with your Netdata config directory, if different
36
-sudo ./edit-config python.d.conf
37
-```
38
-
39
-Change the value of the `logind` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl
40
-restart netdata`, or the appropriate method for your system, to finish enabling the `logind` collector.
41
-
42
-## Configuration
43
-
44
-This module needs no configuration. Just make sure the `netdata` user
45
-can run the `loginctl` command and get a session list without having to
46
-specify a path.
47
-
48
-This will work with any command that can output data in the _exact_
49
-same format as `loginctl list-sessions --no-legend`. If you have some
50
-other command you want to use that outputs data in this format, you can
51
-specify it using the `command` key like so:
52
-
53
-```yaml
54
-command: '/path/to/other/command'
55
-```
56
-
57
-Edit the `python.d/logind.conf` configuration file using `edit-config` from the Netdata [config
58
-directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
59
-
60
-```bash
61
-cd /etc/netdata # Replace this path with your Netdata config directory, if different
62
-sudo ./edit-config python.d/logind.conf
63
-```
64
-
65
-## Notes
66
-
67
-- This module's ability to track logins is dependent on what PAM services
68
- are configured to register sessions with logind. In particular, for
69
- most systems, it will only track TTY logins, local desktop logins,
70
- and logins through remote shell connections.
71
-
72
-- The users chart counts _usernames_ not UID's. This is potentially
73
- important in configurations where multiple users have the same UID.
74
-
75
-- The users chart counts any given user name up to once for _each_ type
76
- of login. So if the same user has a graphical and a console login on a
77
- system, they will show up once in the graphical count, and once in the
78
- console count.
79
-
80
-- Because the data collection process is rather expensive, this plugin
81
- is currently disabled by default, and needs to be explicitly enabled in
82
- `/etc/netdata/python.d.conf` before it will run.
83
-
84
----
85
-
86
-
collectors/python.d.plugin/logind/logind.chart.py
deleted
-85
@@ -1,85 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-# Description: logind netdata python.d module
3
-# Author: Austin S. Hemmelgarn (Ferroin)
4
-# SPDX-License-Identifier: GPL-3.0-or-later
5
-
6
-from bases.FrameworkServices.ExecutableService import ExecutableService
7
-
8
-priority = 59999
9
-disabled_by_default = True
10
-
11
-LOGINCTL_COMMAND = 'loginctl list-sessions --no-legend'
12
-
13
-ORDER = [
14
- 'sessions',
15
- 'users',
16
- 'seats',
17
-]
18
-
19
-CHARTS = {
20
- 'sessions': {
21
- 'options': [None, 'Logind Sessions', 'sessions', 'sessions', 'logind.sessions', 'stacked'],
22
- 'lines': [
23
- ['sessions_graphical', 'Graphical', 'absolute', 1, 1],
24
- ['sessions_console', 'Console', 'absolute', 1, 1],
25
- ['sessions_remote', 'Remote', 'absolute', 1, 1]
26
- ]
27
- },
28
- 'users': {
29
- 'options': [None, 'Logind Users', 'users', 'users', 'logind.users', 'stacked'],
30
- 'lines': [
31
- ['users_graphical', 'Graphical', 'absolute', 1, 1],
32
- ['users_console', 'Console', 'absolute', 1, 1],
33
- ['users_remote', 'Remote', 'absolute', 1, 1]
34
- ]
35
- },
36
- 'seats': {
37
- 'options': [None, 'Logind Seats', 'seats', 'seats', 'logind.seats', 'line'],
38
- 'lines': [
39
- ['seats', 'Active Seats', 'absolute', 1, 1]
40
- ]
41
- }
42
-}
43
-
44
-
45
-class Service(ExecutableService):
46
- def __init__(self, configuration=None, name=None):
47
- ExecutableService.__init__(self, configuration=configuration, name=name)
48
- self.order = ORDER
49
- self.definitions = CHARTS
50
- self.command = LOGINCTL_COMMAND
51
-
52
- def _get_data(self):
53
- ret = {
54
- 'sessions_graphical': 0,
55
- 'sessions_console': 0,
56
- 'sessions_remote': 0,
57
- }
58
- users = {
59
- 'graphical': list(),
60
- 'console': list(),
61
- 'remote': list()
62
- }
63
- seats = list()
64
- data = self._get_raw_data()
65
-
66
- for item in data:
67
- fields = item.split()
68
- if len(fields) == 3:
69
- users['remote'].append(fields[2])
70
- ret['sessions_remote'] += 1
71
- elif len(fields) == 4:
72
- users['graphical'].append(fields[2])
73
- ret['sessions_graphical'] += 1
74
- seats.append(fields[3])
75
- elif len(fields) == 5:
76
- users['console'].append(fields[2])
77
- ret['sessions_console'] += 1
78
- seats.append(fields[3])
79
-
80
- ret['users_graphical'] = len(set(users['graphical']))
81
- ret['users_console'] = len(set(users['console']))
82
- ret['users_remote'] = len(set(users['remote']))
83
- ret['seats'] = len(set(seats))
84
-
85
- return ret
collectors/python.d.plugin/logind/logind.conf
deleted
-60
@@ -1,60 +0,0 @@
1
-# netdata python.d.plugin configuration for logind
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
collectors/python.d.plugin/python.d.conf
-2
@@ -34,7 +34,6 @@ gc_interval: 300
34
# boinc: yes
35
# ceph: yes
36
# changefinder: no
37
-# dockerd: yes
37
# dovecot: yes
38
39
# this is just an example
@@ -51,7 +50,6 @@ hpssa: no
50
# icecast: yes
51
# ipfs: yes
52
# litespeed: yes
54
-logind: no
53
# megacli: yes
54
# memcached: yes
55
# mongodb: yes
docs/collect/container-metrics.md
+1
-1
@@ -22,7 +22,7 @@ services running inside of pods in your k8s cluster. Read more about [Kubernetes
22
monitoring](#collect-kubernetes-metrics) below.
23
24
A handful of additional collectors gather metrics from container-related services, such as
25
-[dockerd](/collectors/python.d.plugin/dockerd/README.md) or [Docker
25
+[dockerd](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/docker/) or [Docker
26
Engine](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/docker_engine/). You can find all
27
container collectors in our supported collectors list under the
28
[containers/VMs](/collectors/COLLECTORS.md#containers-and-vms) and