"Usage: %s [ -v|--verbose ] [-H ] [-t ] [ -u|--user= ] [ -p|--password= ] [ -e|--skipsyntaxerrors=1 ] [ -f|--inputfile= ] [ -a|--fanredundancy=1 ] [ -o|--powerredundancy=1 ] [ -n|--notemperatures=1 ] [ -c|--checkdrives=1 ] [ -d|--perfdata=1 ] [ -3|--ilo3=1 ] ", 'version' => 1.94, 'blurb' => 'This plugin checks the health status on a remote iLO2|3 device and will return OK, WARNING or CRITICAL. iLO (integrated Lights-Out) can be found on HP Proliant servers.')); # add all arguments $np->add_arg('user|u=s','Specify the username on the command line.',1); $np->add_arg('password|p=s', 'Specify the password on the command line.',1); $np->add_arg('host|H=s','Specify the host on the command line.',1); $np->add_arg('skipsyntaxerrors|e=i','Setting to 1 skips syntax errrors on older firmwares. Default off.'); $np->add_arg('fanredundancy|a=i','Setting to 1 checks fan redundancy. Default off.'); $np->add_arg('powerredundancy|o=i','Setting to 1 checks power redundancy. Default off.'); $np->add_arg('notemperatures|n=i','Setting to 1 gives output without temperature listing. Default off.'); $np->add_arg('checkdrives|c=i','Setting to 1 tries to check drive bays. Default off.'); $np->add_arg('perfdata|d=i','Setting to 1 adds perfdata to the output. Default off.'); $np->add_arg('inputfile|f=s','Do not query the BMC. Read input from file.'); $np->add_arg('ilo3|3=i','Setting to 1 for iLO3 device. Default off.'); $np->add_arg('threshold|t=s','Threshold.'); $np->add_arg('val=s','Value.'); $np->add_arg('c=s','Value.'); $np->add_arg('w=s','Value.'); $np->getopts(); //print_r($np); $t = new Nagios_Plugin_Threshold($np->w,$np->c); $np->add_message($t->get_status($np->val), 'Value = '.$np->val); $np->add_perfdata('value',6,'',$t); $np->add_perfdata('temp',60,'C'); $np->add_perfdata('disk-/',65684486465,'o'); list($code, $message) = $np->check_messages(); $np->nagios_exit($code, $message); ?>