remove python.d/exim (#18305)
Ilya Mashchenko committed
Aug 11, 2024 at 21:23 UTC
7317cf4537aaade461ac3247c136c826940b6a4e
6 files changed
-479
CMakeLists.txt
-2
@@ -2782,7 +2782,6 @@ install(FILES
2782
src/collectors/python.d.plugin/changefinder/changefinder.conf
2783
src/collectors/python.d.plugin/dovecot/dovecot.conf
2784
src/collectors/python.d.plugin/example/example.conf
2785
- src/collectors/python.d.plugin/exim/exim.conf
2785
src/collectors/python.d.plugin/go_expvar/go_expvar.conf
2786
src/collectors/python.d.plugin/haproxy/haproxy.conf
2787
src/collectors/python.d.plugin/monit/monit.conf
@@ -2811,7 +2810,6 @@ install(FILES
2810
src/collectors/python.d.plugin/changefinder/changefinder.chart.py
2811
src/collectors/python.d.plugin/dovecot/dovecot.chart.py
2812
src/collectors/python.d.plugin/example/example.chart.py
2814
- src/collectors/python.d.plugin/exim/exim.chart.py
2813
src/collectors/python.d.plugin/go_expvar/go_expvar.chart.py
2814
src/collectors/python.d.plugin/haproxy/haproxy.chart.py
2815
src/collectors/python.d.plugin/monit/monit.chart.py
src/collectors/python.d.plugin/exim/README.md
deleted
-1
@@ -1 +0,0 @@
1
-integrations/exim.md
\ No newline at end of file
src/collectors/python.d.plugin/exim/exim.chart.py
deleted
-39
@@ -1,39 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-# Description: exim netdata python.d module
3
-# Author: Pawel Krupa (paulfantom)
4
-# SPDX-License-Identifier: GPL-3.0-or-later
5
-
6
-from bases.FrameworkServices.ExecutableService import ExecutableService
7
-
8
-EXIM_COMMAND = 'exim -bpc'
9
-
10
-ORDER = [
11
- 'qemails',
12
-]
13
-
14
-CHARTS = {
15
- 'qemails': {
16
- 'options': [None, 'Exim Queue Emails', 'emails', 'queue', 'exim.qemails', 'line'],
17
- 'lines': [
18
- ['emails', None, 'absolute']
19
- ]
20
- }
21
-}
22
-
23
-
24
-class Service(ExecutableService):
25
- def __init__(self, configuration=None, name=None):
26
- ExecutableService.__init__(self, configuration=configuration, name=name)
27
- self.order = ORDER
28
- self.definitions = CHARTS
29
- self.command = EXIM_COMMAND
30
-
31
- def _get_data(self):
32
- """
33
- Format data received from shell command
34
- :return: dict
35
- """
36
- try:
37
- return {'emails': int(self._get_raw_data()[0])}
38
- except (ValueError, AttributeError):
39
- return None
src/collectors/python.d.plugin/exim/exim.conf
deleted
-91
@@ -1,91 +0,0 @@
1
-# netdata python.d.plugin configuration for exim
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
-# exim is slow, so once every 10 seconds
24
-update_every: 10
25
-
26
-# priority controls the order of charts at the netdata dashboard.
27
-# Lower numbers move the charts towards the top of the page.
28
-# If unset, the default for python.d.plugin is used.
29
-# priority: 60000
30
-
31
-# penalty indicates whether to apply penalty to update_every in case of failures.
32
-# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
33
-# penalty: yes
34
-
35
-# autodetection_retry sets the job re-check interval in seconds.
36
-# The job is not deleted if check fails.
37
-# Attempts to start the job are made once every autodetection_retry.
38
-# This feature is disabled by default.
39
-# autodetection_retry: 0
40
-
41
-# ----------------------------------------------------------------------
42
-# JOBS (data collection sources)
43
-#
44
-# The default JOBS share the same *name*. JOBS with the same name
45
-# are mutually exclusive. Only one of them will be allowed running at
46
-# any time. This allows autodetection to try several alternatives and
47
-# pick the one that works.
48
-#
49
-# Any number of jobs is supported.
50
-#
51
-# All python.d.plugin JOBS (for all its modules) support a set of
52
-# predefined parameters. These are:
53
-#
54
-# job_name:
55
-# name: myname # the JOB's name as it will appear at the
56
-# # dashboard (by default is the job_name)
57
-# # JOBs sharing a name are mutually exclusive
58
-# update_every: 1 # the JOB's data collection frequency
59
-# priority: 60000 # the JOB's order on the dashboard
60
-# penalty: yes # the JOB's penalty
61
-# autodetection_retry: 0 # the JOB's re-check interval in seconds
62
-#
63
-# Additionally to the above, exim also supports the following:
64
-#
65
-# command: 'exim -bpc' # the command to run
66
-#
67
-
68
-# ----------------------------------------------------------------------
69
-# REQUIRED exim CONFIGURATION
70
-#
71
-# netdata will query exim as user netdata.
72
-# By default exim will refuse to respond.
73
-#
74
-# To allow querying exim as non-admin user, please set the following
75
-# to your exim configuration:
76
-#
77
-# queue_list_requires_admin = false
78
-#
79
-# Your exim configuration should be in
80
-#
81
-# /etc/exim/exim4.conf
82
-# or
83
-# /etc/exim4/conf.d/main/000_local_options
84
-#
85
-# Please consult your distribution information to find the exact file.
86
-
87
-# ----------------------------------------------------------------------
88
-# AUTO-DETECTION JOBS
89
-
90
-local:
91
- command: 'exim -bpc'
src/collectors/python.d.plugin/exim/integrations/exim.md
deleted
-214
@@ -1,214 +0,0 @@
1
-<!--startmeta
2
-custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/exim/README.md"
3
-meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/exim/metadata.yaml"
4
-sidebar_label: "Exim"
5
-learn_status: "Published"
6
-learn_rel_path: "Collecting Metrics/Mail Servers"
7
-most_popular: False
8
-message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
9
-endmeta-->
10
-
11
-# Exim
12
-
13
-
14
-<img src="https://netdata.cloud/img/exim.jpg" width="150"/>
15
-
16
-
17
-Plugin: python.d.plugin
18
-Module: exim
19
-
20
-<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21
-
22
-## Overview
23
-
24
-This collector monitors Exim mail queue.
25
-
26
-It uses the `exim` command line binary to get the statistics.
27
-
28
-This collector is supported on all platforms.
29
-
30
-This collector only supports collecting metrics from a single instance of this integration.
31
-
32
-
33
-### Default Behavior
34
-
35
-#### Auto-Detection
36
-
37
-Assuming setup prerequisites are met, the collector will try to gather statistics using the method described above, even without any configuration.
38
-
39
-#### Limits
40
-
41
-The default configuration for this integration does not impose any limits on data collection.
42
-
43
-#### Performance Impact
44
-
45
-The default configuration for this integration is not expected to impose a significant performance impact on the system.
46
-
47
-
48
-## Metrics
49
-
50
-Metrics grouped by *scope*.
51
-
52
-The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
53
-
54
-
55
-
56
-### Per Exim instance
57
-
58
-These metrics refer to the entire monitored application.
59
-
60
-This scope has no labels.
61
-
62
-Metrics:
63
-
64
-| Metric | Dimensions | Unit |
65
-|:------|:----------|:----|
66
-| exim.qemails | emails | emails |
67
-
68
-
69
-
70
-## Alerts
71
-
72
-There are no alerts configured by default for this integration.
73
-
74
-
75
-## Setup
76
-
77
-### Prerequisites
78
-
79
-#### Exim configuration - local installation
80
-
81
-The module uses the `exim` binary, which can only be executed as root by default. We need to allow other users to `exim` binary. We solve that adding `queue_list_requires_admin` statement in exim configuration and set to `false`, because it is `true` by default. On many Linux distributions, the default location of `exim` configuration is in `/etc/exim.conf`.
82
-
83
-1. Edit the `exim` configuration with your preferred editor and add:
84
-`queue_list_requires_admin = false`
85
-2. Restart `exim` and Netdata
86
-
87
-
88
-#### Exim configuration - WHM (CPanel) server
89
-
90
-On a WHM server, you can reconfigure `exim` over the WHM interface with the following steps.
91
-
92
-1. Login to WHM
93
-2. Navigate to Service Configuration --> Exim Configuration Manager --> tab Advanced Editor
94
-3. Scroll down to the button **Add additional configuration setting** and click on it.
95
-4. In the new dropdown which will appear above we need to find and choose:
96
-`queue_list_requires_admin` and set to `false`
97
-5. Scroll to the end and click the **Save** button.
98
-
99
-
100
-
101
-### Configuration
102
-
103
-#### File
104
-
105
-The configuration file name for this integration is `python.d/exim.conf`.
106
-
107
-
108
-You can edit the configuration file using the `edit-config` script from the
109
-Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).
110
-
111
-```bash
112
-cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
113
-sudo ./edit-config python.d/exim.conf
114
-```
115
-#### Options
116
-
117
-There are 2 sections:
118
-
119
-* Global variables
120
-* One or more JOBS that can define multiple different instances to monitor.
121
-
122
-The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
123
-
124
-Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
125
-
126
-Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
127
-
128
-
129
-<details open><summary>Config options</summary>
130
-
131
-| Name | Description | Default | Required |
132
-|:----|:-----------|:-------|:--------:|
133
-| update_every | Sets the default data collection frequency. | 5 | no |
134
-| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |
135
-| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |
136
-| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |
137
-| name | Job name. This value will overwrite the `job_name` value. 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. | | no |
138
-| command | Path and command to the `exim` binary | exim -bpc | no |
139
-
140
-</details>
141
-
142
-#### Examples
143
-
144
-##### Local exim install
145
-
146
-A basic local exim install
147
-
148
-```yaml
149
-local:
150
- command: 'exim -bpc'
151
-
152
-```
153
-
154
-
155
-## Troubleshooting
156
-
157
-### Debug Mode
158
-
159
-To troubleshoot issues with the `exim` collector, run the `python.d.plugin` with the debug option enabled. The output
160
-should give you clues as to why the collector isn't working.
161
-
162
-- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
163
- your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
164
-
165
- ```bash
166
- cd /usr/libexec/netdata/plugins.d/
167
- ```
168
-
169
-- Switch to the `netdata` user.
170
-
171
- ```bash
172
- sudo -u netdata -s
173
- ```
174
-
175
-- Run the `python.d.plugin` to debug the collector:
176
-
177
- ```bash
178
- ./python.d.plugin exim debug trace
179
- ```
180
-
181
-### Getting Logs
182
-
183
-If you're encountering problems with the `exim` collector, follow these steps to retrieve logs and identify potential issues:
184
-
185
-- **Run the command** specific to your system (systemd, non-systemd, or Docker container).
186
-- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.
187
-
188
-#### System with systemd
189
-
190
-Use the following command to view logs generated since the last Netdata service restart:
191
-
192
-```bash
193
-journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep exim
194
-```
195
-
196
-#### System without systemd
197
-
198
-Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:
199
-
200
-```bash
201
-grep exim /var/log/netdata/collector.log
202
-```
203
-
204
-**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.
205
-
206
-#### Docker Container
207
-
208
-If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:
209
-
210
-```bash
211
-docker logs netdata 2>&1 | grep exim
212
-```
213
-
214
-
src/collectors/python.d.plugin/exim/metadata.yaml
deleted
-132
@@ -1,132 +0,0 @@
1
-plugin_name: python.d.plugin
2
-modules:
3
- - meta:
4
- plugin_name: python.d.plugin
5
- module_name: exim
6
- monitored_instance:
7
- name: Exim
8
- link: "https://www.exim.org/"
9
- categories:
10
- - data-collection.mail-servers
11
- icon_filename: "exim.jpg"
12
- related_resources:
13
- integrations:
14
- list: []
15
- info_provided_to_referring_integrations:
16
- description: ""
17
- keywords:
18
- - exim
19
- - mail
20
- - server
21
- most_popular: false
22
- overview:
23
- data_collection:
24
- metrics_description: "This collector monitors Exim mail queue."
25
- method_description: "It uses the `exim` command line binary to get the statistics."
26
- supported_platforms:
27
- include: []
28
- exclude: []
29
- multi_instance: false
30
- additional_permissions:
31
- description: ""
32
- default_behavior:
33
- auto_detection:
34
- description: "Assuming setup prerequisites are met, the collector will try to gather statistics using the method described above, even without any configuration."
35
- limits:
36
- description: ""
37
- performance_impact:
38
- description: ""
39
- setup:
40
- prerequisites:
41
- list:
42
- - title: "Exim configuration - local installation"
43
- description: |
44
- The module uses the `exim` binary, which can only be executed as root by default. We need to allow other users to `exim` binary. We solve that adding `queue_list_requires_admin` statement in exim configuration and set to `false`, because it is `true` by default. On many Linux distributions, the default location of `exim` configuration is in `/etc/exim.conf`.
45
-
46
- 1. Edit the `exim` configuration with your preferred editor and add:
47
- `queue_list_requires_admin = false`
48
- 2. Restart `exim` and Netdata
49
- - title: "Exim configuration - WHM (CPanel) server"
50
- description: |
51
- On a WHM server, you can reconfigure `exim` over the WHM interface with the following steps.
52
-
53
- 1. Login to WHM
54
- 2. Navigate to Service Configuration --> Exim Configuration Manager --> tab Advanced Editor
55
- 3. Scroll down to the button **Add additional configuration setting** and click on it.
56
- 4. In the new dropdown which will appear above we need to find and choose:
57
- `queue_list_requires_admin` and set to `false`
58
- 5. Scroll to the end and click the **Save** button.
59
- configuration:
60
- file:
61
- name: python.d/exim.conf
62
- options:
63
- description: |
64
- There are 2 sections:
65
-
66
- * Global variables
67
- * One or more JOBS that can define multiple different instances to monitor.
68
-
69
- The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
70
-
71
- Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
72
-
73
- Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
74
- folding:
75
- title: "Config options"
76
- enabled: true
77
- list:
78
- - name: update_every
79
- description: Sets the default data collection frequency.
80
- default_value: 5
81
- required: false
82
- - name: priority
83
- description: Controls the order of charts at the netdata dashboard.
84
- default_value: 60000
85
- required: false
86
- - name: autodetection_retry
87
- description: Sets the job re-check interval in seconds.
88
- default_value: 0
89
- required: false
90
- - name: penalty
91
- description: Indicates whether to apply penalty to update_every in case of failures.
92
- default_value: yes
93
- required: false
94
- - name: name
95
- description: Job name. This value will overwrite the `job_name` value. 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.
96
- default_value: ""
97
- required: false
98
- - name: command
99
- description: Path and command to the `exim` binary
100
- default_value: "exim -bpc"
101
- required: false
102
- examples:
103
- folding:
104
- enabled: false
105
- title: "Config"
106
- list:
107
- - name: Local exim install
108
- description: A basic local exim install
109
- config: |
110
- local:
111
- command: 'exim -bpc'
112
- troubleshooting:
113
- problems:
114
- list: []
115
- alerts: []
116
- metrics:
117
- folding:
118
- title: Metrics
119
- enabled: false
120
- description: ""
121
- availability: []
122
- scopes:
123
- - name: global
124
- description: "These metrics refer to the entire monitored application."
125
- labels: []
126
- metrics:
127
- - name: exim.qemails
128
- description: Exim Queue Emails
129
- unit: "emails"
130
- chart_type: line
131
- dimensions:
132
- - name: emails