remove python.d/megacli (#17417)
see you space python megacli
Ilya Mashchenko committed
Apr 16, 2024 at 19:31 UTC
6c7235372051e481f4f36115b633da9b1b6f3ea6
8 files changed
-831
CMakeLists.txt
-2
@@ -2527,7 +2527,6 @@ install(FILES
2527
src/collectors/python.d.plugin/icecast/icecast.conf
2528
src/collectors/python.d.plugin/ipfs/ipfs.conf
2529
src/collectors/python.d.plugin/litespeed/litespeed.conf
2530
- src/collectors/python.d.plugin/megacli/megacli.conf
2530
src/collectors/python.d.plugin/memcached/memcached.conf
2531
src/collectors/python.d.plugin/monit/monit.conf
2532
src/collectors/python.d.plugin/nsd/nsd.conf
@@ -2578,7 +2577,6 @@ install(FILES
2577
src/collectors/python.d.plugin/icecast/icecast.chart.py
2578
src/collectors/python.d.plugin/ipfs/ipfs.chart.py
2579
src/collectors/python.d.plugin/litespeed/litespeed.chart.py
2581
- src/collectors/python.d.plugin/megacli/megacli.chart.py
2580
src/collectors/python.d.plugin/memcached/memcached.chart.py
2581
src/collectors/python.d.plugin/monit/monit.chart.py
2582
src/collectors/python.d.plugin/nsd/nsd.chart.py
src/collectors/python.d.plugin/megacli/README.md
deleted
-1
@@ -1 +0,0 @@
1
-integrations/megacli.md
\ No newline at end of file
src/collectors/python.d.plugin/megacli/integrations/megacli.md
deleted
-220
@@ -1,220 +0,0 @@
1
-<!--startmeta
2
-custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/megacli/README.md"
3
-meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/python.d.plugin/megacli/metadata.yaml"
4
-sidebar_label: "MegaCLI"
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
-# MegaCLI
12
-
13
-
14
-<img src="https://netdata.cloud/img/hard-drive.svg" width="150"/>
15
-
16
-
17
-Plugin: python.d.plugin
18
-Module: megacli
19
-
20
-<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21
-
22
-## Overview
23
-
24
-Examine MegaCLI metrics with Netdata for insights into RAID controller performance. Improve your RAID controller efficiency with real-time MegaCLI metrics.
25
-
26
-Collects adapter, physical drives and battery stats using megacli command-line tool
27
-
28
-Executed commands:
29
-
30
- - `sudo -n megacli -LDPDInfo -aAll`
31
- - `sudo -n megacli -AdpBbuCmd -a0`
32
-
33
-
34
-This collector is supported on all platforms.
35
-
36
-This collector only supports collecting metrics from a single instance of this integration.
37
-
38
-The module uses megacli, which can only be executed by root. It uses sudo and assumes that it is configured such that the netdata user can execute megacli as root without a password.
39
-
40
-### Default Behavior
41
-
42
-#### Auto-Detection
43
-
44
-After all the permissions are satisfied, netdata should be to execute commands via the megacli command line utility
45
-
46
-#### Limits
47
-
48
-The default configuration for this integration does not impose any limits on data collection.
49
-
50
-#### Performance Impact
51
-
52
-The default configuration for this integration is not expected to impose a significant performance impact on the system.
53
-
54
-
55
-## Metrics
56
-
57
-Metrics grouped by *scope*.
58
-
59
-The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
60
-
61
-
62
-
63
-### Per MegaCLI instance
64
-
65
-These metrics refer to the entire monitored application.
66
-
67
-This scope has no labels.
68
-
69
-Metrics:
70
-
71
-| Metric | Dimensions | Unit |
72
-|:------|:----------|:----|
73
-| megacli.adapter_degraded | a dimension per adapter | is degraded |
74
-| megacli.pd_media_error | a dimension per physical drive | errors/s |
75
-| megacli.pd_predictive_failure | a dimension per physical drive | failures/s |
76
-
77
-### Per battery
78
-
79
-Metrics related to Battery Backup Units, each BBU provides its own set of the following metrics.
80
-
81
-This scope has no labels.
82
-
83
-Metrics:
84
-
85
-| Metric | Dimensions | Unit |
86
-|:------|:----------|:----|
87
-| megacli.bbu_relative_charge | adapter {battery id} | percentage |
88
-| megacli.bbu_cycle_count | adapter {battery id} | cycle count |
89
-
90
-
91
-
92
-## Alerts
93
-
94
-
95
-The following alerts are available:
96
-
97
-| Alert name | On metric | Description |
98
-|:------------|:----------|:------------|
99
-| [ megacli_adapter_state ](https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf) | megacli.adapter_degraded | adapter is in the degraded state (0: false, 1: true) |
100
-| [ megacli_pd_media_errors ](https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf) | megacli.pd_media_error | number of physical drive media errors |
101
-| [ megacli_pd_predictive_failures ](https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf) | megacli.pd_predictive_failure | number of physical drive predictive failures |
102
-| [ megacli_bbu_relative_charge ](https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf) | megacli.bbu_relative_charge | average battery backup unit (BBU) relative state of charge over the last 10 seconds |
103
-| [ megacli_bbu_cycle_count ](https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf) | megacli.bbu_cycle_count | average battery backup unit (BBU) charge cycles count over the last 10 seconds |
104
-
105
-
106
-## Setup
107
-
108
-### Prerequisites
109
-
110
-#### Grant permissions for netdata, to run megacli as sudoer
111
-
112
-The module uses megacli, which can only be executed by root. It uses sudo and assumes that it is configured such that the netdata user can execute megacli as root without a password.
113
-
114
-Add to your /etc/sudoers file:
115
-which megacli shows the full path to the binary.
116
-
117
-```bash
118
-netdata ALL=(root) NOPASSWD: /path/to/megacli
119
-```
120
-
121
-
122
-#### Reset Netdata's systemd unit CapabilityBoundingSet (Linux distributions with systemd)
123
-
124
-The default CapabilityBoundingSet doesn't allow using sudo, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute arcconf using sudo.
125
-
126
-As root user, do the following:
127
-
128
-```bash
129
-mkdir /etc/systemd/system/netdata.service.d
130
-echo -e '[Service]\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf
131
-systemctl daemon-reload
132
-systemctl restart netdata.service
133
-```
134
-
135
-
136
-
137
-### Configuration
138
-
139
-#### File
140
-
141
-The configuration file name for this integration is `python.d/megacli.conf`.
142
-
143
-
144
-You can edit the configuration file using the `edit-config` script from the
145
-Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration.md#the-netdata-config-directory).
146
-
147
-```bash
148
-cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
149
-sudo ./edit-config python.d/megacli.conf
150
-```
151
-#### Options
152
-
153
-There are 2 sections:
154
-
155
-* Global variables
156
-* One or more JOBS that can define multiple different instances to monitor.
157
-
158
-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.
159
-
160
-Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
161
-
162
-Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
163
-
164
-
165
-<details><summary>Config options</summary>
166
-
167
-| Name | Description | Default | Required |
168
-|:----|:-----------|:-------|:--------:|
169
-| update_every | Sets the default data collection frequency. | 5 | no |
170
-| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |
171
-| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |
172
-| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |
173
-| do_battery | default is no. Battery stats (adds additional call to megacli `megacli -AdpBbuCmd -a0`). | no | no |
174
-
175
-</details>
176
-
177
-#### Examples
178
-
179
-##### Basic
180
-
181
-A basic example configuration per job
182
-
183
-```yaml
184
-job_name:
185
- name: myname
186
- update_every: 1
187
- priority: 60000
188
- penalty: yes
189
- autodetection_retry: 0
190
-
191
-```
192
-
193
-
194
-## Troubleshooting
195
-
196
-### Debug Mode
197
-
198
-To troubleshoot issues with the `megacli` collector, run the `python.d.plugin` with the debug option enabled. The output
199
-should give you clues as to why the collector isn't working.
200
-
201
-- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
202
- your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
203
-
204
- ```bash
205
- cd /usr/libexec/netdata/plugins.d/
206
- ```
207
-
208
-- Switch to the `netdata` user.
209
-
210
- ```bash
211
- sudo -u netdata -s
212
- ```
213
-
214
-- Run the `python.d.plugin` to debug the collector:
215
-
216
- ```bash
217
- ./python.d.plugin megacli debug trace
218
- ```
219
-
220
-
src/collectors/python.d.plugin/megacli/megacli.chart.py
deleted
-278
@@ -1,278 +0,0 @@
1
-# -*- coding: utf-8 -*-
2
-# Description: megacli netdata python.d module
3
-# Author: Ilya Mashchenko (ilyam8)
4
-# SPDX-License-Identifier: GPL-3.0-or-later
5
-
6
-
7
-import re
8
-
9
-from bases.FrameworkServices.ExecutableService import ExecutableService
10
-from bases.collection import find_binary
11
-
12
-disabled_by_default = True
13
-
14
-update_every = 5
15
-
16
-
17
-def adapter_charts(ads):
18
- order = [
19
- 'adapter_degraded',
20
- ]
21
-
22
- def dims(ad):
23
- return [['adapter_{0}_degraded'.format(a.id), 'adapter {0}'.format(a.id)] for a in ad]
24
-
25
- charts = {
26
- 'adapter_degraded': {
27
- 'options': [None, 'Adapter State', 'is degraded', 'adapter', 'megacli.adapter_degraded', 'line'],
28
- 'lines': dims(ads)
29
- },
30
- }
31
-
32
- return order, charts
33
-
34
-
35
-def pd_charts(pds):
36
- order = [
37
- 'pd_media_error',
38
- 'pd_predictive_failure',
39
- ]
40
-
41
- def dims(k, pd):
42
- return [['slot_{0}_{1}'.format(p.id, k), 'slot {0}'.format(p.id), 'incremental'] for p in pd]
43
-
44
- charts = {
45
- 'pd_media_error': {
46
- 'options': [None, 'Physical Drives Media Errors', 'errors/s', 'pd', 'megacli.pd_media_error', 'line'],
47
- 'lines': dims('media_error', pds)
48
- },
49
- 'pd_predictive_failure': {
50
- 'options': [None, 'Physical Drives Predictive Failures', 'failures/s', 'pd',
51
- 'megacli.pd_predictive_failure', 'line'],
52
- 'lines': dims('predictive_failure', pds)
53
- }
54
- }
55
-
56
- return order, charts
57
-
58
-
59
-def battery_charts(bats):
60
- order = list()
61
- charts = dict()
62
-
63
- for b in bats:
64
- order.append('bbu_{0}_relative_charge'.format(b.id))
65
- charts.update(
66
- {
67
- 'bbu_{0}_relative_charge'.format(b.id): {
68
- 'options': [None, 'Relative State of Charge', 'percentage', 'battery',
69
- 'megacli.bbu_relative_charge', 'line'],
70
- 'lines': [
71
- ['bbu_{0}_relative_charge'.format(b.id), 'adapter {0}'.format(b.id)],
72
- ]
73
- }
74
- }
75
- )
76
-
77
- for b in bats:
78
- order.append('bbu_{0}_cycle_count'.format(b.id))
79
- charts.update(
80
- {
81
- 'bbu_{0}_cycle_count'.format(b.id): {
82
- 'options': [None, 'Cycle Count', 'cycle count', 'battery', 'megacli.bbu_cycle_count', 'line'],
83
- 'lines': [
84
- ['bbu_{0}_cycle_count'.format(b.id), 'adapter {0}'.format(b.id)],
85
- ]
86
- }
87
- }
88
- )
89
-
90
- return order, charts
91
-
92
-
93
-RE_ADAPTER = re.compile(
94
- r'Adapter #([0-9]+) State(?:\s+)?: ([a-zA-Z ]+)'
95
-)
96
-
97
-RE_VD = re.compile(
98
- r'Slot Number: ([0-9]+) Media Error Count: ([0-9]+) Predictive Failure Count: ([0-9]+)'
99
-)
100
-
101
-RE_BATTERY = re.compile(
102
- r'BBU Capacity Info for Adapter: ([0-9]+) Relative State of Charge: ([0-9]+) % Cycle Count: ([0-9]+)'
103
-)
104
-
105
-
106
-def find_adapters(d):
107
- keys = ('Adapter #', 'State')
108
- d = ' '.join(v.strip() for v in d if v.startswith(keys))
109
- return [Adapter(*v) for v in RE_ADAPTER.findall(d)]
110
-
111
-
112
-def find_pds(d):
113
- keys = ('Slot Number', 'Media Error Count', 'Predictive Failure Count')
114
- d = ' '.join(v.strip() for v in d if v.startswith(keys))
115
- return [PD(*v) for v in RE_VD.findall(d)]
116
-
117
-
118
-def find_batteries(d):
119
- keys = ('BBU Capacity Info for Adapter', 'Relative State of Charge', 'Cycle Count')
120
- d = ' '.join(v.strip() for v in d if v.strip().startswith(keys))
121
- return [Battery(*v) for v in RE_BATTERY.findall(d)]
122
-
123
-
124
-class Adapter:
125
- def __init__(self, n, state):
126
- self.id = n
127
- # TODO: Rewrite all of this
128
- self.state = int(state in ("Partially Degraded", "Degraded", "Failed"))
129
-
130
- def data(self):
131
- return {
132
- 'adapter_{0}_degraded'.format(self.id): self.state,
133
- }
134
-
135
-class PD:
136
- def __init__(self, n, media_err, predict_fail):
137
- self.id = n
138
- self.media_err = media_err
139
- self.predict_fail = predict_fail
140
-
141
- def data(self):
142
- return {
143
- 'slot_{0}_media_error'.format(self.id): self.media_err,
144
- 'slot_{0}_predictive_failure'.format(self.id): self.predict_fail,
145
- }
146
-
147
-
148
-class Battery:
149
- def __init__(self, adapt_id, rel_charge, cycle_count):
150
- self.id = adapt_id
151
- self.rel_charge = rel_charge
152
- self.cycle_count = cycle_count
153
-
154
- def data(self):
155
- return {
156
- 'bbu_{0}_relative_charge'.format(self.id): self.rel_charge,
157
- 'bbu_{0}_cycle_count'.format(self.id): self.cycle_count,
158
- }
159
-
160
-
161
-# TODO: hardcoded sudo...
162
-class Megacli:
163
- def __init__(self):
164
- self.s = find_binary('sudo')
165
- self.m = find_binary('megacli') or find_binary('MegaCli') # Binary on FreeBSD is MegaCli
166
- self.sudo_check = [self.s, '-n', '-l']
167
- self.disk_info = [self.s, '-n', self.m, '-LDPDInfo', '-aAll', '-NoLog']
168
- self.battery_info = [self.s, '-n', self.m, '-AdpBbuCmd', '-a0', '-NoLog']
169
-
170
- def __bool__(self):
171
- return bool(self.s and self.m)
172
-
173
- def __nonzero__(self):
174
- return self.__bool__()
175
-
176
-
177
-class Service(ExecutableService):
178
- def __init__(self, configuration=None, name=None):
179
- ExecutableService.__init__(self, configuration=configuration, name=name)
180
- self.order = list()
181
- self.definitions = dict()
182
- self.do_battery = self.configuration.get('do_battery')
183
- self.megacli = Megacli()
184
-
185
- def check_sudo(self):
186
- err = self._get_raw_data(command=self.megacli.sudo_check, stderr=True)
187
- if err:
188
- self.error(''.join(err))
189
- return False
190
- return True
191
-
192
- def check_disk_info(self):
193
- d = self._get_raw_data(command=self.megacli.disk_info)
194
- if not d:
195
- return False
196
-
197
- ads = find_adapters(d)
198
- pds = find_pds(d)
199
-
200
- if not (ads and pds):
201
- self.error('failed to parse "{0}" output'.format(' '.join(self.megacli.disk_info)))
202
- return False
203
-
204
- o, c = adapter_charts(ads)
205
- self.order.extend(o)
206
- self.definitions.update(c)
207
-
208
- o, c = pd_charts(pds)
209
- self.order.extend(o)
210
- self.definitions.update(c)
211
-
212
- return True
213
-
214
- def check_battery(self):
215
- d = self._get_raw_data(command=self.megacli.battery_info)
216
- if not d:
217
- return False
218
-
219
- bats = find_batteries(d)
220
-
221
- if not bats:
222
- self.error('failed to parse "{0}" output'.format(' '.join(self.megacli.battery_info)))
223
- return False
224
-
225
- o, c = battery_charts(bats)
226
- self.order.extend(o)
227
- self.definitions.update(c)
228
- return True
229
-
230
- def check(self):
231
- if not self.megacli:
232
- self.error('can\'t locate "sudo" or "megacli" binary')
233
- return None
234
-
235
- if not (self.check_sudo() and self.check_disk_info()):
236
- return False
237
-
238
- if self.do_battery:
239
- self.do_battery = self.check_battery()
240
-
241
- return True
242
-
243
- def get_data(self):
244
- data = dict()
245
-
246
- data.update(self.get_adapter_pd_data())
247
-
248
- if self.do_battery:
249
- data.update(self.get_battery_data())
250
-
251
- return data or None
252
-
253
- def get_adapter_pd_data(self):
254
- raw = self._get_raw_data(command=self.megacli.disk_info)
255
- data = dict()
256
-
257
- if not raw:
258
- return data
259
-
260
- for a in find_adapters(raw):
261
- data.update(a.data())
262
-
263
- for p in find_pds(raw):
264
- data.update(p.data())
265
-
266
- return data
267
-
268
- def get_battery_data(self):
269
- raw = self._get_raw_data(command=self.megacli.battery_info)
270
- data = dict()
271
-
272
- if not raw:
273
- return data
274
-
275
- for b in find_batteries(raw):
276
- data.update(b.data())
277
-
278
- return data
src/collectors/python.d.plugin/megacli/megacli.conf
deleted
-60
@@ -1,60 +0,0 @@
1
-# netdata python.d.plugin configuration for megacli
2
-#
3
-# This file is in YaML format. Generally the format is:
4
-#
5
-# name: value
6
-#
7
-
8
-# ----------------------------------------------------------------------
9
-# Global Variables
10
-# These variables set the defaults for all JOBs, however each JOB
11
-# may define its own, overriding the defaults.
12
-
13
-# update_every sets the default data collection frequency.
14
-# If unset, the python.d.plugin default is used.
15
-# update_every: 1
16
-
17
-# priority controls the order of charts at the netdata dashboard.
18
-# Lower numbers move the charts towards the top of the page.
19
-# If unset, the default for python.d.plugin is used.
20
-# priority: 60000
21
-
22
-# penalty indicates whether to apply penalty to update_every in case of failures.
23
-# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
24
-# penalty: yes
25
-
26
-# autodetection_retry sets the job re-check interval in seconds.
27
-# The job is not deleted if check fails.
28
-# Attempts to start the job are made once every autodetection_retry.
29
-# This feature is disabled by default.
30
-# autodetection_retry: 0
31
-
32
-# ----------------------------------------------------------------------
33
-# JOBS (data collection sources)
34
-#
35
-# The default JOBS share the same *name*. JOBS with the same name
36
-# are mutually exclusive. Only one of them will be allowed running at
37
-# any time. This allows autodetection to try several alternatives and
38
-# pick the one that works.
39
-#
40
-# Any number of jobs is supported.
41
-#
42
-# All python.d.plugin JOBS (for all its modules) support a set of
43
-# predefined parameters. These are:
44
-#
45
-# job_name:
46
-# name: myname # the JOB's name as it will appear at the
47
-# # dashboard (by default is the job_name)
48
-# # JOBs sharing a name are mutually exclusive
49
-# update_every: 1 # the JOB's data collection frequency
50
-# priority: 60000 # the JOB's order on the dashboard
51
-# penalty: yes # the JOB's penalty
52
-# autodetection_retry: 0 # the JOB's re-check interval in seconds
53
-#
54
-# Additionally to the above, megacli also supports the following:
55
-#
56
-# do_battery: yes/no # default is no. Battery stats (adds additional call to megacli `megacli -AdpBbuCmd -a0`).
57
-#
58
-# ----------------------------------------------------------------------
59
-# uncomment the line below to collect battery statistics
60
-# do_battery: yes
src/collectors/python.d.plugin/megacli/metadata.yaml
deleted
-193
@@ -1,193 +0,0 @@
1
-plugin_name: python.d.plugin
2
-modules:
3
- - meta:
4
- plugin_name: python.d.plugin
5
- module_name: megacli
6
- monitored_instance:
7
- name: MegaCLI
8
- link: "https://wikitech.wikimedia.org/wiki/MegaCli"
9
- categories:
10
- - data-collection.storage-mount-points-and-filesystems
11
- icon_filename: "hard-drive.svg"
12
- related_resources:
13
- integrations:
14
- list: []
15
- info_provided_to_referring_integrations:
16
- description: ""
17
- keywords:
18
- - storage
19
- - raid-controller
20
- - manage-disks
21
- most_popular: false
22
- overview:
23
- data_collection:
24
- metrics_description: "Examine MegaCLI metrics with Netdata for insights into RAID controller performance. Improve your RAID controller efficiency with real-time MegaCLI metrics."
25
- method_description: |
26
- Collects adapter, physical drives and battery stats using megacli command-line tool
27
-
28
- Executed commands:
29
-
30
- - `sudo -n megacli -LDPDInfo -aAll`
31
- - `sudo -n megacli -AdpBbuCmd -a0`
32
- supported_platforms:
33
- include: []
34
- exclude: []
35
- multi_instance: false
36
- additional_permissions:
37
- description: "The module uses megacli, which can only be executed by root. It uses sudo and assumes that it is configured such that the netdata user can execute megacli as root without a password."
38
- default_behavior:
39
- auto_detection:
40
- description: "After all the permissions are satisfied, netdata should be to execute commands via the megacli command line utility"
41
- limits:
42
- description: ""
43
- performance_impact:
44
- description: ""
45
- setup:
46
- prerequisites:
47
- list:
48
- - title: Grant permissions for netdata, to run megacli as sudoer
49
- description: |
50
- The module uses megacli, which can only be executed by root. It uses sudo and assumes that it is configured such that the netdata user can execute megacli as root without a password.
51
-
52
- Add to your /etc/sudoers file:
53
- which megacli shows the full path to the binary.
54
-
55
- ```bash
56
- netdata ALL=(root) NOPASSWD: /path/to/megacli
57
- ```
58
- - title: "Reset Netdata's systemd unit CapabilityBoundingSet (Linux distributions with systemd)"
59
- description: |
60
- The default CapabilityBoundingSet doesn't allow using sudo, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute arcconf using sudo.
61
-
62
- As root user, do the following:
63
-
64
- ```bash
65
- mkdir /etc/systemd/system/netdata.service.d
66
- echo -e '[Service]\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf
67
- systemctl daemon-reload
68
- systemctl restart netdata.service
69
- ```
70
- configuration:
71
- file:
72
- name: "python.d/megacli.conf"
73
- options:
74
- description: |
75
- There are 2 sections:
76
-
77
- * Global variables
78
- * One or more JOBS that can define multiple different instances to monitor.
79
-
80
- 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.
81
-
82
- Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
83
-
84
- Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
85
- folding:
86
- title: "Config options"
87
- enabled: true
88
- list:
89
- - name: update_every
90
- description: Sets the default data collection frequency.
91
- default_value: 5
92
- required: false
93
- - name: priority
94
- description: Controls the order of charts at the netdata dashboard.
95
- default_value: 60000
96
- required: false
97
- - name: autodetection_retry
98
- description: Sets the job re-check interval in seconds.
99
- default_value: 0
100
- required: false
101
- - name: penalty
102
- description: Indicates whether to apply penalty to update_every in case of failures.
103
- default_value: yes
104
- required: false
105
- - name: do_battery
106
- description: default is no. Battery stats (adds additional call to megacli `megacli -AdpBbuCmd -a0`).
107
- default_value: no
108
- required: false
109
- examples:
110
- folding:
111
- enabled: true
112
- title: "Config"
113
- list:
114
- - name: Basic
115
- folding:
116
- enabled: false
117
- description: A basic example configuration per job
118
- config: |
119
- job_name:
120
- name: myname
121
- update_every: 1
122
- priority: 60000
123
- penalty: yes
124
- autodetection_retry: 0
125
- troubleshooting:
126
- problems:
127
- list: []
128
- alerts:
129
- - name: megacli_adapter_state
130
- link: https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf
131
- metric: megacli.adapter_degraded
132
- info: "adapter is in the degraded state (0: false, 1: true)"
133
- - name: megacli_pd_media_errors
134
- link: https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf
135
- metric: megacli.pd_media_error
136
- info: number of physical drive media errors
137
- - name: megacli_pd_predictive_failures
138
- link: https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf
139
- metric: megacli.pd_predictive_failure
140
- info: number of physical drive predictive failures
141
- - name: megacli_bbu_relative_charge
142
- link: https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf
143
- metric: megacli.bbu_relative_charge
144
- info: average battery backup unit (BBU) relative state of charge over the last 10 seconds
145
- - name: megacli_bbu_cycle_count
146
- link: https://github.com/netdata/netdata/blob/master/src/health/health.d/megacli.conf
147
- metric: megacli.bbu_cycle_count
148
- info: average battery backup unit (BBU) charge cycles count over the last 10 seconds
149
- metrics:
150
- folding:
151
- title: Metrics
152
- enabled: false
153
- description: ""
154
- availability: []
155
- scopes:
156
- - name: global
157
- description: "These metrics refer to the entire monitored application."
158
- labels: []
159
- metrics:
160
- - name: megacli.adapter_degraded
161
- description: Adapter State
162
- unit: "is degraded"
163
- chart_type: line
164
- dimensions:
165
- - name: a dimension per adapter
166
- - name: megacli.pd_media_error
167
- description: Physical Drives Media Errors
168
- unit: "errors/s"
169
- chart_type: line
170
- dimensions:
171
- - name: a dimension per physical drive
172
- - name: megacli.pd_predictive_failure
173
- description: Physical Drives Predictive Failures
174
- unit: "failures/s"
175
- chart_type: line
176
- dimensions:
177
- - name: a dimension per physical drive
178
- - name: battery
179
- description: "Metrics related to Battery Backup Units, each BBU provides its own set of the following metrics."
180
- labels: []
181
- metrics:
182
- - name: megacli.bbu_relative_charge
183
- description: Relative State of Charge
184
- unit: "percentage"
185
- chart_type: line
186
- dimensions:
187
- - name: adapter {battery id}
188
- - name: megacli.bbu_cycle_count
189
- description: Cycle Count
190
- unit: "cycle count"
191
- chart_type: line
192
- dimensions:
193
- - name: adapter {battery id}
src/collectors/python.d.plugin/python.d.conf
-1
@@ -50,7 +50,6 @@ hpssa: no
50
# icecast: yes
51
# ipfs: yes
52
# litespeed: yes
53
-# megacli: yes
53
# memcached: yes
54
# mongodb: yes
55
# monit: yes
src/health/health.d/megacli.conf
-76
@@ -1,7 +1,5 @@
1
# you can disable an alarm notification by setting the 'to' line to: silent
2
3
-# go.d/megacli
4
-
3
# Adapters (controllers)
4
5
template: megacli_adapter_health_state
@@ -77,77 +75,3 @@ component: RAID
75
summary: MegaCLI BBU recharge cycles
76
info: MegaCLI Backup Battery Unit (adapter ${label:adapter_number}) recharge cycles
77
to: sysadmin
80
-
81
-# --------------------------------------------------------------------------------------------------------------------
82
-
83
-# python.d/megacli
84
-
85
- template: megacli_adapter_state
86
- on: megacli.adapter_degraded
87
- class: Errors
88
- type: System
89
-component: RAID
90
- lookup: max -10s
91
- units: boolean
92
- every: 10s
93
- crit: $this > 0
94
- delay: down 5m multiplier 2 max 10m
95
- summary: MegaCLI adapter state
96
- info: Adapter is in the degraded state (0: false, 1: true)
97
- to: sysadmin
98
-
99
- template: megacli_pd_predictive_failures
100
- on: megacli.pd_predictive_failure
101
- class: Errors
102
- type: System
103
-component: RAID
104
- lookup: sum -10s
105
- units: predictive failures
106
- every: 10s
107
- warn: $this > 0
108
- delay: up 1m down 5m multiplier 2 max 10m
109
- summary: MegaCLI physical drive predictive failures
110
- info: Number of physical drive predictive failures
111
- to: sysadmin
112
-
113
- template: megacli_pd_media_errors
114
- on: megacli.pd_media_error
115
- class: Errors
116
- type: System
117
-component: RAID
118
- lookup: sum -10s
119
- units: media errors
120
- every: 10s
121
- warn: $this > 0
122
- delay: up 1m down 5m multiplier 2 max 10m
123
- summary: MegaCLI physical drive errors
124
- info: Number of physical drive media errors
125
- to: sysadmin
126
-
127
- template: megacli_bbu_relative_charge
128
- on: megacli.bbu_relative_charge
129
- class: Workload
130
- type: System
131
-component: RAID
132
- lookup: average -10s
133
- units: percent
134
- every: 10s
135
- warn: $this <= (($status >= $WARNING) ? (85) : (80))
136
- crit: $this <= (($status == $CRITICAL) ? (50) : (40))
137
- summary: MegaCLI BBU charge state
138
- info: Average battery backup unit (BBU) relative state of charge over the last 10 seconds
139
- to: sysadmin
140
-
141
- template: megacli_bbu_cycle_count
142
- on: megacli.bbu_cycle_count
143
- class: Workload
144
- type: System
145
-component: RAID
146
- lookup: average -10s
147
- units: cycles
148
- every: 10s
149
- warn: $this >= 100
150
- crit: $this >= 500
151
- summary: MegaCLI BBU cycles count
152
- info: Average battery backup unit (BBU) charge cycles count over the last 10 seconds
153
- to: sysadmin