Remove python ceph collector implementation (#18584)
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Fotis Voutsas committed
Sep 27, 2024 at 14:12 UTC
64ec6c141f43b5b6e477b8ac222c9ce193cd952a
7 files changed
+1
-904
CMakeLists.txt
-2
@@ -2937,7 +2937,6 @@ if(ENABLE_PLUGIN_PYTHON)
2937
2938
install(FILES
2939
src/collectors/python.d.plugin/am2320/am2320.conf
2940
- src/collectors/python.d.plugin/ceph/ceph.conf
2940
src/collectors/python.d.plugin/go_expvar/go_expvar.conf
2941
src/collectors/python.d.plugin/haproxy/haproxy.conf
2942
src/collectors/python.d.plugin/openldap/openldap.conf
@@ -2951,7 +2950,6 @@ if(ENABLE_PLUGIN_PYTHON)
2950
2951
install(FILES
2952
src/collectors/python.d.plugin/am2320/am2320.chart.py
2954
- src/collectors/python.d.plugin/ceph/ceph.chart.py
2953
src/collectors/python.d.plugin/go_expvar/go_expvar.chart.py
2954
src/collectors/python.d.plugin/haproxy/haproxy.chart.py
2955
src/collectors/python.d.plugin/openldap/openldap.chart.py
src/collectors/python.d.plugin/ceph/README.md
deleted
-1
@@ -1 +0,0 @@
1
-integrations/ceph.md
\ No newline at end of file
src/collectors/python.d.plugin/ceph/ceph.chart.py
deleted
-374
@@ -1,374 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-# Description: ceph netdata python.d module
3
-# Author: Luis Eduardo (lets00)
4
-# SPDX-License-Identifier: GPL-3.0-or-later
5
-
6
-try:
7
- import rados
8
-
9
- CEPH = True
10
-except ImportError:
11
- CEPH = False
12
-
13
-import json
14
-import os
15
-
16
-from bases.FrameworkServices.SimpleService import SimpleService
17
-
18
-# default module values (can be overridden per job in `config`)
19
-update_every = 10
20
-
21
-ORDER = [
22
- 'general_usage',
23
- 'general_objects',
24
- 'general_bytes',
25
- 'general_operations',
26
- 'general_latency',
27
- 'pool_usage',
28
- 'pool_objects',
29
- 'pool_read_bytes',
30
- 'pool_write_bytes',
31
- 'pool_read_operations',
32
- 'pool_write_operations',
33
- 'osd_usage',
34
- 'osd_size',
35
- 'osd_apply_latency',
36
- 'osd_commit_latency'
37
-]
38
-
39
-CHARTS = {
40
- 'general_usage': {
41
- 'options': [None, 'Ceph General Space', 'KiB', 'general', 'ceph.general_usage', 'stacked'],
42
- 'lines': [
43
- ['general_available', 'avail', 'absolute'],
44
- ['general_usage', 'used', 'absolute']
45
- ]
46
- },
47
- 'general_objects': {
48
- 'options': [None, 'Ceph General Objects', 'objects', 'general', 'ceph.general_objects', 'area'],
49
- 'lines': [
50
- ['general_objects', 'cluster', 'absolute']
51
- ]
52
- },
53
- 'general_bytes': {
54
- 'options': [None, 'Ceph General Read/Write Data/s', 'KiB/s', 'general', 'ceph.general_bytes',
55
- 'area'],
56
- 'lines': [
57
- ['general_read_bytes', 'read', 'absolute', 1, 1024],
58
- ['general_write_bytes', 'write', 'absolute', -1, 1024]
59
- ]
60
- },
61
- 'general_operations': {
62
- 'options': [None, 'Ceph General Read/Write Operations/s', 'operations', 'general', 'ceph.general_operations',
63
- 'area'],
64
- 'lines': [
65
- ['general_read_operations', 'read', 'absolute', 1],
66
- ['general_write_operations', 'write', 'absolute', -1]
67
- ]
68
- },
69
- 'general_latency': {
70
- 'options': [None, 'Ceph General Apply/Commit latency', 'milliseconds', 'general', 'ceph.general_latency',
71
- 'area'],
72
- 'lines': [
73
- ['general_apply_latency', 'apply', 'absolute'],
74
- ['general_commit_latency', 'commit', 'absolute']
75
- ]
76
- },
77
- 'pool_usage': {
78
- 'options': [None, 'Ceph Pools', 'KiB', 'pool', 'ceph.pool_usage', 'line'],
79
- 'lines': []
80
- },
81
- 'pool_objects': {
82
- 'options': [None, 'Ceph Pools', 'objects', 'pool', 'ceph.pool_objects', 'line'],
83
- 'lines': []
84
- },
85
- 'pool_read_bytes': {
86
- 'options': [None, 'Ceph Read Pool Data/s', 'KiB/s', 'pool', 'ceph.pool_read_bytes', 'area'],
87
- 'lines': []
88
- },
89
- 'pool_write_bytes': {
90
- 'options': [None, 'Ceph Write Pool Data/s', 'KiB/s', 'pool', 'ceph.pool_write_bytes', 'area'],
91
- 'lines': []
92
- },
93
- 'pool_read_operations': {
94
- 'options': [None, 'Ceph Read Pool Operations/s', 'operations', 'pool', 'ceph.pool_read_operations', 'area'],
95
- 'lines': []
96
- },
97
- 'pool_write_operations': {
98
- 'options': [None, 'Ceph Write Pool Operations/s', 'operations', 'pool', 'ceph.pool_write_operations', 'area'],
99
- 'lines': []
100
- },
101
- 'osd_usage': {
102
- 'options': [None, 'Ceph OSDs', 'KiB', 'osd', 'ceph.osd_usage', 'line'],
103
- 'lines': []
104
- },
105
- 'osd_size': {
106
- 'options': [None, 'Ceph OSDs size', 'KiB', 'osd', 'ceph.osd_size', 'line'],
107
- 'lines': []
108
- },
109
- 'osd_apply_latency': {
110
- 'options': [None, 'Ceph OSDs apply latency', 'milliseconds', 'osd', 'ceph.apply_latency', 'line'],
111
- 'lines': []
112
- },
113
- 'osd_commit_latency': {
114
- 'options': [None, 'Ceph OSDs commit latency', 'milliseconds', 'osd', 'ceph.commit_latency', 'line'],
115
- 'lines': []
116
- }
117
-
118
-}
119
-
120
-
121
-class Service(SimpleService):
122
- def __init__(self, configuration=None, name=None):
123
- SimpleService.__init__(self, configuration=configuration, name=name)
124
- self.order = ORDER
125
- self.definitions = CHARTS
126
- self.config_file = self.configuration.get('config_file')
127
- self.keyring_file = self.configuration.get('keyring_file')
128
- self.rados_id = self.configuration.get('rados_id', 'admin')
129
-
130
- def check(self):
131
- """
132
- Checks module
133
- :return:
134
- """
135
- if not CEPH:
136
- self.error('rados module is needed to use ceph.chart.py')
137
- return False
138
- if not (self.config_file and self.keyring_file):
139
- self.error('config_file and/or keyring_file is not defined')
140
- return False
141
-
142
- # Verify files and permissions
143
- if not (os.access(self.config_file, os.F_OK)):
144
- self.error('{0} does not exist'.format(self.config_file))
145
- return False
146
- if not (os.access(self.keyring_file, os.F_OK)):
147
- self.error('{0} does not exist'.format(self.keyring_file))
148
- return False
149
- if not (os.access(self.config_file, os.R_OK)):
150
- self.error('Ceph plugin does not read {0}, define read permission.'.format(self.config_file))
151
- return False
152
- if not (os.access(self.keyring_file, os.R_OK)):
153
- self.error('Ceph plugin does not read {0}, define read permission.'.format(self.keyring_file))
154
- return False
155
- try:
156
- self.cluster = rados.Rados(conffile=self.config_file,
157
- conf=dict(keyring=self.keyring_file),
158
- rados_id=self.rados_id)
159
- self.cluster.connect()
160
- except rados.Error as error:
161
- self.error(error)
162
- return False
163
- self.create_definitions()
164
- return True
165
-
166
- def create_definitions(self):
167
- """
168
- Create dynamically charts options
169
- :return: None
170
- """
171
- # Pool lines
172
- for pool in sorted(self._get_df()['pools'], key=lambda x: sorted(x.keys())):
173
- self.definitions['pool_usage']['lines'].append([pool['name'],
174
- pool['name'],
175
- 'absolute'])
176
- self.definitions['pool_objects']['lines'].append(["obj_{0}".format(pool['name']),
177
- pool['name'],
178
- 'absolute'])
179
- self.definitions['pool_read_bytes']['lines'].append(['read_{0}'.format(pool['name']),
180
- pool['name'],
181
- 'absolute', 1, 1024])
182
- self.definitions['pool_write_bytes']['lines'].append(['write_{0}'.format(pool['name']),
183
- pool['name'],
184
- 'absolute', 1, 1024])
185
- self.definitions['pool_read_operations']['lines'].append(['read_operations_{0}'.format(pool['name']),
186
- pool['name'],
187
- 'absolute'])
188
- self.definitions['pool_write_operations']['lines'].append(['write_operations_{0}'.format(pool['name']),
189
- pool['name'],
190
- 'absolute'])
191
-
192
- # OSD lines
193
- for osd in sorted(self._get_osd_df()['nodes'], key=lambda x: sorted(x.keys())):
194
- self.definitions['osd_usage']['lines'].append([osd['name'],
195
- osd['name'],
196
- 'absolute'])
197
- self.definitions['osd_size']['lines'].append(['size_{0}'.format(osd['name']),
198
- osd['name'],
199
- 'absolute'])
200
- self.definitions['osd_apply_latency']['lines'].append(['apply_latency_{0}'.format(osd['name']),
201
- osd['name'],
202
- 'absolute'])
203
- self.definitions['osd_commit_latency']['lines'].append(['commit_latency_{0}'.format(osd['name']),
204
- osd['name'],
205
- 'absolute'])
206
-
207
- def get_data(self):
208
- """
209
- Catch all ceph data
210
- :return: dict
211
- """
212
- try:
213
- data = {}
214
- df = self._get_df()
215
- osd_df = self._get_osd_df()
216
- osd_perf = self._get_osd_perf()
217
- osd_perf_infos = get_osd_perf_infos(osd_perf)
218
- pool_stats = self._get_osd_pool_stats()
219
-
220
- data.update(self._get_general(osd_perf_infos, pool_stats))
221
- for pool in df['pools']:
222
- data.update(self._get_pool_usage(pool))
223
- data.update(self._get_pool_objects(pool))
224
- for pool_io in pool_stats:
225
- data.update(self._get_pool_rw(pool_io))
226
- for osd in osd_df['nodes']:
227
- data.update(self._get_osd_usage(osd))
228
- data.update(self._get_osd_size(osd))
229
- for osd_apply_commit in osd_perf_infos:
230
- data.update(self._get_osd_latency(osd_apply_commit))
231
- return data
232
- except (ValueError, AttributeError) as error:
233
- self.error(error)
234
- return None
235
-
236
- def _get_general(self, osd_perf_infos, pool_stats):
237
- """
238
- Get ceph's general usage
239
- :return: dict
240
- """
241
- status = self.cluster.get_cluster_stats()
242
- read_bytes_sec = 0
243
- write_bytes_sec = 0
244
- read_op_per_sec = 0
245
- write_op_per_sec = 0
246
- apply_latency = 0
247
- commit_latency = 0
248
-
249
- for pool_rw_io_b in pool_stats:
250
- read_bytes_sec += pool_rw_io_b['client_io_rate'].get('read_bytes_sec', 0)
251
- write_bytes_sec += pool_rw_io_b['client_io_rate'].get('write_bytes_sec', 0)
252
- read_op_per_sec += pool_rw_io_b['client_io_rate'].get('read_op_per_sec', 0)
253
- write_op_per_sec += pool_rw_io_b['client_io_rate'].get('write_op_per_sec', 0)
254
- for perf in osd_perf_infos:
255
- apply_latency += perf['perf_stats']['apply_latency_ms']
256
- commit_latency += perf['perf_stats']['commit_latency_ms']
257
-
258
- return {
259
- 'general_usage': int(status['kb_used']),
260
- 'general_available': int(status['kb_avail']),
261
- 'general_objects': int(status['num_objects']),
262
- 'general_read_bytes': read_bytes_sec,
263
- 'general_write_bytes': write_bytes_sec,
264
- 'general_read_operations': read_op_per_sec,
265
- 'general_write_operations': write_op_per_sec,
266
- 'general_apply_latency': apply_latency,
267
- 'general_commit_latency': commit_latency
268
- }
269
-
270
- @staticmethod
271
- def _get_pool_usage(pool):
272
- """
273
- Process raw data into pool usage dict information
274
- :return: A pool dict with pool name's key and usage bytes' value
275
- """
276
- return {pool['name']: pool['stats']['kb_used']}
277
-
278
- @staticmethod
279
- def _get_pool_objects(pool):
280
- """
281
- Process raw data into pool usage dict information
282
- :return: A pool dict with pool name's key and object numbers
283
- """
284
- return {'obj_{0}'.format(pool['name']): pool['stats']['objects']}
285
-
286
- @staticmethod
287
- def _get_pool_rw(pool):
288
- """
289
- Get read/write kb and operations in a pool
290
- :return: A pool dict with both read/write bytes and operations.
291
- """
292
- return {
293
- 'read_{0}'.format(pool['pool_name']): int(pool['client_io_rate'].get('read_bytes_sec', 0)),
294
- 'write_{0}'.format(pool['pool_name']): int(pool['client_io_rate'].get('write_bytes_sec', 0)),
295
- 'read_operations_{0}'.format(pool['pool_name']): int(pool['client_io_rate'].get('read_op_per_sec', 0)),
296
- 'write_operations_{0}'.format(pool['pool_name']): int(pool['client_io_rate'].get('write_op_per_sec', 0))
297
- }
298
-
299
- @staticmethod
300
- def _get_osd_usage(osd):
301
- """
302
- Process raw data into osd dict information to get osd usage
303
- :return: A osd dict with osd name's key and usage bytes' value
304
- """
305
- return {osd['name']: float(osd['kb_used'])}
306
-
307
- @staticmethod
308
- def _get_osd_size(osd):
309
- """
310
- Process raw data into osd dict information to get osd size (kb)
311
- :return: A osd dict with osd name's key and size bytes' value
312
- """
313
- return {'size_{0}'.format(osd['name']): float(osd['kb'])}
314
-
315
- @staticmethod
316
- def _get_osd_latency(osd):
317
- """
318
- Get ceph osd apply and commit latency
319
- :return: A osd dict with osd name's key with both apply and commit latency values
320
- """
321
- return {
322
- 'apply_latency_osd.{0}'.format(osd['id']): osd['perf_stats']['apply_latency_ms'],
323
- 'commit_latency_osd.{0}'.format(osd['id']): osd['perf_stats']['commit_latency_ms']
324
- }
325
-
326
- def _get_df(self):
327
- """
328
- Get ceph df output
329
- :return: ceph df --format json
330
- """
331
- return json.loads(self.cluster.mon_command(json.dumps({
332
- 'prefix': 'df',
333
- 'format': 'json'
334
- }), b'')[1].decode('utf-8'))
335
-
336
- def _get_osd_df(self):
337
- """
338
- Get ceph osd df output
339
- :return: ceph osd df --format json
340
- """
341
- return json.loads(self.cluster.mon_command(json.dumps({
342
- 'prefix': 'osd df',
343
- 'format': 'json'
344
- }), b'')[1].decode('utf-8').replace('-nan', '"-nan"'))
345
-
346
- def _get_osd_perf(self):
347
- """
348
- Get ceph osd performance
349
- :return: ceph osd perf --format json
350
- """
351
- return json.loads(self.cluster.mon_command(json.dumps({
352
- 'prefix': 'osd perf',
353
- 'format': 'json'
354
- }), b'')[1].decode('utf-8'))
355
-
356
- def _get_osd_pool_stats(self):
357
- """
358
- Get ceph osd pool status.
359
- This command is used to get information about both
360
- read/write operation and bytes per second on each pool
361
- :return: ceph osd pool stats --format json
362
- """
363
- return json.loads(self.cluster.mon_command(json.dumps({
364
- 'prefix': 'osd pool stats',
365
- 'format': 'json'
366
- }), b'')[1].decode('utf-8'))
367
-
368
-
369
-def get_osd_perf_infos(osd_perf):
370
- # https://github.com/netdata/netdata/issues/8247
371
- # module uses 'osd_perf_infos' data, its been moved under 'osdstats` since Ceph v14.2
372
- if 'osd_perf_infos' in osd_perf:
373
- return osd_perf['osd_perf_infos']
374
- return osd_perf['osdstats']['osd_perf_infos']
src/collectors/python.d.plugin/ceph/ceph.conf
deleted
-75
@@ -1,75 +0,0 @@
1
-# netdata python.d.plugin configuration for ceph stats
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: 10
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: 10 # 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, ceph plugin also supports the following:
63
-#
64
-# config_file: 'config_file' # Ceph config file.
65
-# keyring_file: 'keyring_file' # Ceph keyring file. netdata user must be added into ceph group
66
-# # and keyring file must be read group permission.
67
-# rados_id: 'rados username' # ID used to connect to ceph cluster. Allows
68
-# # creating a read only key for pulling data v.s. admin
69
-# ----------------------------------------------------------------------
70
-# AUTO-DETECTION JOBS
71
-# only one of them will run (they have the same name)
72
-#
73
-config_file: '/etc/ceph/ceph.conf'
74
-keyring_file: '/etc/ceph/ceph.client.admin.keyring'
75
-rados_id: 'admin'
src/collectors/python.d.plugin/ceph/integrations/ceph.md
deleted
-228
@@ -1,228 +0,0 @@
1
-<!--startmeta
2
-custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/ceph/README.md"
3
-meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/ceph/metadata.yaml"
4
-sidebar_label: "Ceph"
5
-learn_status: "Published"
6
-learn_rel_path: "Collecting Metrics/Storage, Mount Points and Filesystems"
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
-# Ceph
12
-
13
-
14
-<img src="https://netdata.cloud/img/ceph.svg" width="150"/>
15
-
16
-
17
-Plugin: python.d.plugin
18
-Module: ceph
19
-
20
-<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21
-
22
-## Overview
23
-
24
-This collector monitors Ceph metrics about Cluster statistics, OSD usage, latency and Pool statistics.
25
-
26
-Uses the `rados` python module to connect to a Ceph cluster.
27
-
28
-This collector is supported on all platforms.
29
-
30
-This collector supports collecting metrics from multiple instances of this integration, including remote instances.
31
-
32
-
33
-### Default Behavior
34
-
35
-#### Auto-Detection
36
-
37
-This integration doesn't support auto-detection.
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 Ceph 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
-| ceph.general_usage | avail, used | KiB |
67
-| ceph.general_objects | cluster | objects |
68
-| ceph.general_bytes | read, write | KiB/s |
69
-| ceph.general_operations | read, write | operations |
70
-| ceph.general_latency | apply, commit | milliseconds |
71
-| ceph.pool_usage | a dimension per Ceph Pool | KiB |
72
-| ceph.pool_objects | a dimension per Ceph Pool | objects |
73
-| ceph.pool_read_bytes | a dimension per Ceph Pool | KiB/s |
74
-| ceph.pool_write_bytes | a dimension per Ceph Pool | KiB/s |
75
-| ceph.pool_read_operations | a dimension per Ceph Pool | operations |
76
-| ceph.pool_write_operations | a dimension per Ceph Pool | operations |
77
-| ceph.osd_usage | a dimension per Ceph OSD | KiB |
78
-| ceph.osd_size | a dimension per Ceph OSD | KiB |
79
-| ceph.apply_latency | a dimension per Ceph OSD | milliseconds |
80
-| ceph.commit_latency | a dimension per Ceph OSD | milliseconds |
81
-
82
-
83
-
84
-## Alerts
85
-
86
-
87
-The following alerts are available:
88
-
89
-| Alert name | On metric | Description |
90
-|:------------|:----------|:------------|
91
-| [ ceph_cluster_space_usage ](https://github.com/netdata/netdata/blob/master/src/health/health.d/ceph.conf) | ceph.general_usage | cluster disk space utilization |
92
-
93
-
94
-## Setup
95
-
96
-### Prerequisites
97
-
98
-#### `rados` python module
99
-
100
-Make sure the `rados` python module is installed
101
-
102
-#### Granting read permissions to ceph group from keyring file
103
-
104
-Execute: `chmod 640 /etc/ceph/ceph.client.admin.keyring`
105
-
106
-#### Create a specific rados_id
107
-
108
-You can optionally create a rados_id to use instead of admin
109
-
110
-
111
-### Configuration
112
-
113
-#### File
114
-
115
-The configuration file name for this integration is `python.d/ceph.conf`.
116
-
117
-
118
-You can edit the configuration file using the `edit-config` script from the
119
-Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).
120
-
121
-```bash
122
-cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
123
-sudo ./edit-config python.d/ceph.conf
124
-```
125
-#### Options
126
-
127
-There are 2 sections:
128
-
129
-* Global variables
130
-* One or more JOBS that can define multiple different instances to monitor.
131
-
132
-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.
133
-
134
-Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
135
-
136
-Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
137
-
138
-
139
-<details open><summary>Config options</summary>
140
-
141
-| Name | Description | Default | Required |
142
-|:----|:-----------|:-------|:--------:|
143
-| update_every | Sets the default data collection frequency. | 5 | no |
144
-| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |
145
-| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |
146
-| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |
147
-| 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 |
148
-| config_file | Ceph config file | | yes |
149
-| keyring_file | Ceph keyring file. netdata user must be added into ceph group and keyring file must be read group permission. | | yes |
150
-| rados_id | A rados user id to use for connecting to the Ceph cluster. | admin | no |
151
-
152
-</details>
153
-
154
-#### Examples
155
-
156
-##### Basic local Ceph cluster
157
-
158
-A basic configuration to connect to a local Ceph cluster.
159
-
160
-```yaml
161
-local:
162
- config_file: '/etc/ceph/ceph.conf'
163
- keyring_file: '/etc/ceph/ceph.client.admin.keyring'
164
-
165
-```
166
-
167
-
168
-## Troubleshooting
169
-
170
-### Debug Mode
171
-
172
-
173
-To troubleshoot issues with the `ceph` collector, run the `python.d.plugin` with the debug option enabled. The output
174
-should give you clues as to why the collector isn't working.
175
-
176
-- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
177
- your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
178
-
179
- ```bash
180
- cd /usr/libexec/netdata/plugins.d/
181
- ```
182
-
183
-- Switch to the `netdata` user.
184
-
185
- ```bash
186
- sudo -u netdata -s
187
- ```
188
-
189
-- Run the `python.d.plugin` to debug the collector:
190
-
191
- ```bash
192
- ./python.d.plugin ceph debug trace
193
- ```
194
-
195
-### Getting Logs
196
-
197
-If you're encountering problems with the `ceph` collector, follow these steps to retrieve logs and identify potential issues:
198
-
199
-- **Run the command** specific to your system (systemd, non-systemd, or Docker container).
200
-- **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.
201
-
202
-#### System with systemd
203
-
204
-Use the following command to view logs generated since the last Netdata service restart:
205
-
206
-```bash
207
-journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep ceph
208
-```
209
-
210
-#### System without systemd
211
-
212
-Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:
213
-
214
-```bash
215
-grep ceph /var/log/netdata/collector.log
216
-```
217
-
218
-**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.
219
-
220
-#### Docker Container
221
-
222
-If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:
223
-
224
-```bash
225
-docker logs netdata 2>&1 | grep ceph
226
-```
227
-
228
-
src/collectors/python.d.plugin/ceph/metadata.yaml
deleted
-223
@@ -1,223 +0,0 @@
1
-plugin_name: python.d.plugin
2
-modules:
3
- - meta:
4
- plugin_name: python.d.plugin
5
- module_name: ceph
6
- monitored_instance:
7
- name: Ceph
8
- link: 'https://ceph.io/'
9
- categories:
10
- - data-collection.storage-mount-points-and-filesystems
11
- icon_filename: 'ceph.svg'
12
- related_resources:
13
- integrations:
14
- list: []
15
- info_provided_to_referring_integrations:
16
- description: ''
17
- keywords:
18
- - ceph
19
- - storage
20
- most_popular: false
21
- overview:
22
- data_collection:
23
- metrics_description: 'This collector monitors Ceph metrics about Cluster statistics, OSD usage, latency and Pool statistics.'
24
- method_description: 'Uses the `rados` python module to connect to a Ceph cluster.'
25
- supported_platforms:
26
- include: []
27
- exclude: []
28
- multi_instance: true
29
- additional_permissions:
30
- description: ''
31
- default_behavior:
32
- auto_detection:
33
- description: ''
34
- limits:
35
- description: ''
36
- performance_impact:
37
- description: ''
38
- setup:
39
- prerequisites:
40
- list:
41
- - title: '`rados` python module'
42
- description: 'Make sure the `rados` python module is installed'
43
- - title: 'Granting read permissions to ceph group from keyring file'
44
- description: 'Execute: `chmod 640 /etc/ceph/ceph.client.admin.keyring`'
45
- - title: 'Create a specific rados_id'
46
- description: 'You can optionally create a rados_id to use instead of admin'
47
- configuration:
48
- file:
49
- name: python.d/ceph.conf
50
- options:
51
- description: |
52
- There are 2 sections:
53
-
54
- * Global variables
55
- * One or more JOBS that can define multiple different instances to monitor.
56
-
57
- 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.
58
-
59
- Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
60
-
61
- Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
62
- folding:
63
- title: "Config options"
64
- enabled: true
65
- list:
66
- - name: update_every
67
- description: Sets the default data collection frequency.
68
- default_value: 5
69
- required: false
70
- - name: priority
71
- description: Controls the order of charts at the netdata dashboard.
72
- default_value: 60000
73
- required: false
74
- - name: autodetection_retry
75
- description: Sets the job re-check interval in seconds.
76
- default_value: 0
77
- required: false
78
- - name: penalty
79
- description: Indicates whether to apply penalty to update_every in case of failures.
80
- default_value: yes
81
- required: false
82
- - name: name
83
- 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.
84
- default_value: ''
85
- required: false
86
- - name: config_file
87
- description: Ceph config file
88
- default_value: ''
89
- required: true
90
- - name: keyring_file
91
- description: Ceph keyring file. netdata user must be added into ceph group and keyring file must be read group permission.
92
- default_value: ''
93
- required: true
94
- - name: rados_id
95
- description: A rados user id to use for connecting to the Ceph cluster.
96
- default_value: 'admin'
97
- required: false
98
- examples:
99
- folding:
100
- enabled: true
101
- title: "Config"
102
- list:
103
- - name: Basic local Ceph cluster
104
- description: A basic configuration to connect to a local Ceph cluster.
105
- folding:
106
- enabled: false
107
- config: |
108
- local:
109
- config_file: '/etc/ceph/ceph.conf'
110
- keyring_file: '/etc/ceph/ceph.client.admin.keyring'
111
- troubleshooting:
112
- problems:
113
- list: []
114
- alerts:
115
- - name: ceph_cluster_space_usage
116
- link: https://github.com/netdata/netdata/blob/master/src/health/health.d/ceph.conf
117
- metric: ceph.general_usage
118
- info: cluster disk space utilization
119
- metrics:
120
- folding:
121
- title: Metrics
122
- enabled: false
123
- description: ""
124
- availability: []
125
- scopes:
126
- - name: global
127
- description: "These metrics refer to the entire monitored application."
128
- labels: []
129
- metrics:
130
- - name: ceph.general_usage
131
- description: Ceph General Space
132
- unit: "KiB"
133
- chart_type: stacked
134
- dimensions:
135
- - name: avail
136
- - name: used
137
- - name: ceph.general_objects
138
- description: Ceph General Objects
139
- unit: "objects"
140
- chart_type: area
141
- dimensions:
142
- - name: cluster
143
- - name: ceph.general_bytes
144
- description: Ceph General Read/Write Data/s
145
- unit: "KiB/s"
146
- chart_type: area
147
- dimensions:
148
- - name: read
149
- - name: write
150
- - name: ceph.general_operations
151
- description: Ceph General Read/Write Operations/s
152
- unit: "operations"
153
- chart_type: area
154
- dimensions:
155
- - name: read
156
- - name: write
157
- - name: ceph.general_latency
158
- description: Ceph General Apply/Commit latency
159
- unit: "milliseconds"
160
- chart_type: area
161
- dimensions:
162
- - name: apply
163
- - name: commit
164
- - name: ceph.pool_usage
165
- description: Ceph Pools
166
- unit: "KiB"
167
- chart_type: line
168
- dimensions:
169
- - name: a dimension per Ceph Pool
170
- - name: ceph.pool_objects
171
- description: Ceph Pools
172
- unit: "objects"
173
- chart_type: line
174
- dimensions:
175
- - name: a dimension per Ceph Pool
176
- - name: ceph.pool_read_bytes
177
- description: Ceph Read Pool Data/s
178
- unit: "KiB/s"
179
- chart_type: area
180
- dimensions:
181
- - name: a dimension per Ceph Pool
182
- - name: ceph.pool_write_bytes
183
- description: Ceph Write Pool Data/s
184
- unit: "KiB/s"
185
- chart_type: area
186
- dimensions:
187
- - name: a dimension per Ceph Pool
188
- - name: ceph.pool_read_operations
189
- description: Ceph Read Pool Operations/s
190
- unit: "operations"
191
- chart_type: area
192
- dimensions:
193
- - name: a dimension per Ceph Pool
194
- - name: ceph.pool_write_operations
195
- description: Ceph Write Pool Operations/s
196
- unit: "operations"
197
- chart_type: area
198
- dimensions:
199
- - name: a dimension per Ceph Pool
200
- - name: ceph.osd_usage
201
- description: Ceph OSDs
202
- unit: "KiB"
203
- chart_type: line
204
- dimensions:
205
- - name: a dimension per Ceph OSD
206
- - name: ceph.osd_size
207
- description: Ceph OSDs size
208
- unit: "KiB"
209
- chart_type: line
210
- dimensions:
211
- - name: a dimension per Ceph OSD
212
- - name: ceph.apply_latency
213
- description: Ceph OSDs apply latency
214
- unit: "milliseconds"
215
- chart_type: line
216
- dimensions:
217
- - name: a dimension per Ceph OSD
218
- - name: ceph.commit_latency
219
- description: Ceph OSDs commit latency
220
- unit: "milliseconds"
221
- chart_type: line
222
- dimensions:
223
- - name: a dimension per Ceph OSD
src/collectors/python.d.plugin/python.d.conf
+1
-1
@@ -26,7 +26,6 @@ gc_run: yes
26
gc_interval: 300
27
28
# am2320: yes
29
-# ceph: yes
29
# this is just an example
30
go_expvar: no
31
# haproxy: yes
@@ -47,6 +46,7 @@ apache: no # Removed (replaced with go.d/apache).
46
beanstalk: no # Removed (replaced with go.d/beanstalk).
47
boinc: no # Removed (replaced with go.d/boinc).
48
dovecot: no # Removed (replaced with go.d/dovecot).
49
+ceph: no # Removed (replaced with go.d/ceph).
50
elasticsearch: no # Removed (replaced with go.d/elasticsearch).
51
exim: no # Removed (replaced with go.d/exim).
52
fail2ban: no # Removed (replaced with go.d/fail2ban).