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/integrations/megacli.md11
-rw-r--r--collectors/python.d.plugin/megacli/megacli.chart.py6
2 files changed, 9 insertions, 8 deletions
diff --git a/collectors/python.d.plugin/megacli/integrations/megacli.md b/collectors/python.d.plugin/megacli/integrations/megacli.md
index bb3bdf6f..0c4af78a 100644
--- a/collectors/python.d.plugin/megacli/integrations/megacli.md
+++ b/collectors/python.d.plugin/megacli/integrations/megacli.md
@@ -4,6 +4,7 @@ meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/python.d.p
sidebar_label: "MegaCLI"
learn_status: "Published"
learn_rel_path: "Data Collection/Storage, Mount Points and Filesystems"
+most_popular: False
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->
@@ -165,11 +166,11 @@ Every configuration JOB starts with a `job_name` value which will appear in the
| Name | Description | Default | Required |
|:----|:-----------|:-------|:--------:|
-| update_every | Sets the default data collection frequency. | 5 | False |
-| priority | Controls the order of charts at the netdata dashboard. | 60000 | False |
-| autodetection_retry | Sets the job re-check interval in seconds. | 0 | False |
-| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | False |
-| do_battery | default is no. Battery stats (adds additional call to megacli `megacli -AdpBbuCmd -a0`). | no | False |
+| update_every | Sets the default data collection frequency. | 5 | no |
+| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |
+| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |
+| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |
+| do_battery | default is no. Battery stats (adds additional call to megacli `megacli -AdpBbuCmd -a0`). | no | no |
</details>
diff --git a/collectors/python.d.plugin/megacli/megacli.chart.py b/collectors/python.d.plugin/megacli/megacli.chart.py
index ef35ff63..8222092a 100644
--- a/collectors/python.d.plugin/megacli/megacli.chart.py
+++ b/collectors/python.d.plugin/megacli/megacli.chart.py
@@ -91,7 +91,7 @@ def battery_charts(bats):
RE_ADAPTER = re.compile(
- r'Adapter #([0-9]+) State(?:\s+)?: ([a-zA-Z]+)'
+ r'Adapter #([0-9]+) State(?:\s+)?: ([a-zA-Z ]+)'
)
RE_VD = re.compile(
@@ -124,14 +124,14 @@ def find_batteries(d):
class Adapter:
def __init__(self, n, state):
self.id = n
- self.state = int(state == 'Degraded')
+ # TODO: Rewrite all of this
+ self.state = int(state in ("Partially Degraded", "Degraded", "Failed"))
def data(self):
return {
'adapter_{0}_degraded'.format(self.id): self.state,
}
-
class PD:
def __init__(self, n, media_err, predict_fail):
self.id = n