diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:20:02 +0000 |
commit | 58daab21cd043e1dc37024a7f99b396788372918 (patch) | |
tree | 96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /collectors/python.d.plugin/megacli/megacli.chart.py | |
parent | Releasing debian version 1.43.2-1. (diff) | |
download | netdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz netdata-58daab21cd043e1dc37024a7f99b396788372918.zip |
Merging upstream version 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.py | 6 |
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 |