Skip to content

Commit 5e205c4

Browse files
author
Florian Schaal
committed
FS#3837 - Adaptec-RAID in ISPConfig-Monitor (code) (wemaflo)
1 parent d7f1c84 commit 5e205c4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

server/lib/classes/cron.d/100-monitor_raid.inc.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,25 @@ public function onRunJob() {
295295
}
296296
}
297297

298+
/*
299+
* Adaptec-RAID
300+
*/
301+
system('which arcconf', $retval);
302+
if($retval === 0) {
303+
$state = 'ok';
304+
$data['output'] = shell_exec('arcconf GETCONFIG 1 LD');
305+
if(is_array($data['output'])) {
306+
foreach ($data['output'] as $item) {
307+
if (strpos($item, 'Logical device name : RAID') !== false) {
308+
if (strpos($item, 'Optimal') !== false) {
309+
$this->_tools->_setState($state, 'ok');
310+
} else {
311+
$this->_tools->_setState($state, 'critical');
312+
}
313+
}
314+
}
315+
}
316+
}
298317

299318
$res = array();
300319
$res['server_id'] = $server_id;

0 commit comments

Comments
 (0)