summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/megacli/megacli.chart.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:22 +0000
commitc21c3b0befeb46a51b6bf3758ffa30813bea0ff0 (patch)
tree9754ff1ca740f6346cf8483ec915d4054bc5da2d /collectors/python.d.plugin/megacli/megacli.chart.py
parentAdding upstream version 1.43.2. (diff)
downloadnetdata-0d980fd06561f4670f5d8170c5aedd74023e3702.tar.xz
netdata-0d980fd06561f4670f5d8170c5aedd74023e3702.zip
Adding upstream version 1.44.3.upstream/1.44.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/python.d.plugin/megacli/megacli.chart.py')
-rw-r--r--collectors/python.d.plugin/megacli/megacli.chart.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/collectors/python.d.plugin/megacli/megacli.chart.py b/collectors/python.d.plugin/megacli/megacli.chart.py
index ef35ff63f..8222092a8 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