summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/megacli
diff options
context:
space:
mode:
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)]