Hi I wrote small PHP code for ISPConfig 3 to check and show status RAID on Smart Array 6i using hpacucli and added to file /usr/local/ispconfig/server/lib/classes/monitor_tools.inc.php in line 1208. PHP: /* * For HP raid with /usr/sbin/hpacucli */ if (file_exists('/usr/sbin/hpacucli')) { /* * Fetch the output */ $data['output'] = shell_exec('hpacucli controller all show config'); /* * Then calc the state. */ $tmp = explode("\n", $data['output']); $state = 'ok'; for ($i = 0; $i < sizeof($tmp); $i++) { /* fetch the next line */ $line = $tmp[$i]; if ((strpos($line, 'logicaldrive') == true) && (strpos($line, 'OK') == false)) { // $debug = 'Error logical drive '."\n"; $state = $this->_setState($state, 'critical'); } if ((strpos($line, 'physicaldrive') == true) && (strpos($line, 'OK') == false)) { // $debug .= 'Error physilca drive '."\n"; $state = $this->_setState($state, 'critical'); } } } Maybe some needed something like this or add more options to this script. Thanks
Thank you for the code. I've added it a feature request to the ISPConfig bugtracker: http://bugtracker.ispconfig.org/index.php?do=details&task_id=3817
hi , i have ISPC 3.0.5.3 , hpacucli installed and working but the code hasno effect .Please specify the line after we have to insert the code . thank you