summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/megacli
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:45:55 +0000
commita8220ab2d293bb7f4b014b79d16b2fb05090fa93 (patch)
tree77f0a30f016c0925cf7ee9292e644bba183c2774 /collectors/python.d.plugin/megacli
parentAdding upstream version 1.19.0. (diff)
downloadnetdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.tar.xz
netdata-a8220ab2d293bb7f4b014b79d16b2fb05090fa93.zip
Adding upstream version 1.29.0.upstream/1.29.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/megacli')
-rw-r--r--collectors/python.d.plugin/megacli/README.md47
-rw-r--r--collectors/python.d.plugin/megacli/megacli.chart.py5
2 files changed, 31 insertions, 21 deletions
diff --git a/collectors/python.d.plugin/megacli/README.md b/collectors/python.d.plugin/megacli/README.md
index afc8cbda6..400a45973 100644
--- a/collectors/python.d.plugin/megacli/README.md
+++ b/collectors/python.d.plugin/megacli/README.md
@@ -1,12 +1,25 @@
-# megacli
+<!--
+title: "MegaRAID controller monitoring with Netdata"
+custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/megacli/README.md
+sidebar_label: "MegaRAID controllers"
+-->
-Module collects adapter, physical drives and battery stats.
+# MegaRAID controller monitoring with Netdata
-**Requirements:**
+Collects adapter, physical drives and battery stats.
+
+## Requirements
+
+Uses the `megacli` program, 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 password.
+
+Add to `sudoers`:
+
+```
+netdata ALL=(root) NOPASSWD: /path/to/megacli
+```
-- `megacli` program
-- `sudo` program
-- `netdata` user needs to be able to be able to sudo the `megacli` program without password
To grab stats it executes:
@@ -25,19 +38,9 @@ It produces:
5. **Battery Cycle Count**
-## prerequisite
-This 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 password.
-
-Add to `sudoers`:
-
-```
-netdata ALL=(root) NOPASSWD: /path/to/megacli
-```
-### configuration
+## Configuration
**megacli** is disabled by default. Should be explicitly enabled in `python.d.conf`.
@@ -45,7 +48,15 @@ netdata ALL=(root) NOPASSWD: /path/to/megacli
megacli: yes
```
-Battery stats disabled by default. To enable them modify `megacli.conf`.
+Edit the `python.d/megacli.conf` configuration file using `edit-config` from the Netdata [config
+directory](/docs/configure/nodes.md), which is typically at `/etc/netdata`.
+
+```bash
+cd /etc/netdata # Replace this path with your Netdata config directory, if different
+sudo ./edit-config python.d/megacli.conf
+```
+
+Battery stats disabled by default. To enable them, modify `megacli.conf`.
```yaml
do_battery: yes
diff --git a/collectors/python.d.plugin/megacli/megacli.chart.py b/collectors/python.d.plugin/megacli/megacli.chart.py
index 4872eab80..ef35ff63f 100644
--- a/collectors/python.d.plugin/megacli/megacli.chart.py
+++ b/collectors/python.d.plugin/megacli/megacli.chart.py
@@ -9,7 +9,6 @@ import re
from bases.FrameworkServices.ExecutableService import ExecutableService
from bases.collection import find_binary
-
disabled_by_default = True
update_every = 5
@@ -27,7 +26,7 @@ def adapter_charts(ads):
'adapter_degraded': {
'options': [None, 'Adapter State', 'is degraded', 'adapter', 'megacli.adapter_degraded', 'line'],
'lines': dims(ads)
- },
+ },
}
return order, charts
@@ -111,7 +110,7 @@ def find_adapters(d):
def find_pds(d):
- keys = ('Slot Number', 'Media Error Count', 'Predictive Failure Count')
+ keys = ('Slot Number', 'Media Error Count', 'Predictive Failure Count')
d = ' '.join(v.strip() for v in d if v.startswith(keys))
return [PD(*v) for v in RE_VD.findall(d)]