Skip to content
Snippets Groups Projects
Commit 14335ee6 authored by Tibo's avatar Tibo
Browse files

return correct status

parent c92bfcfb
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,19 @@ class Ssacli extends \App\AbstractSensor {
}
public function status() {
return \App\AbstractSensor::STATUS_OK;
$record = $this->getLastRecord("ssacli");
if ($record == null) {
self::STATUS_UNKNOWN;
}
$disks = $this->parse($record->ssacli);
foreach ($disks as $disk) {
if ($disk->status != "OK") {
return self::STATUS_WARNING;
}
}
return self::STATUS_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment