@@ -22,7 +22,6 @@
define('UNKNOWN',3);
define('DEPENDENT',4);
-define_syslog_variables();
openlog(MYNAME,LOG_PID | LOG_ODELAY,LOG_MAIL);
if ( ! extension_loaded("snmp") ) {
@@ -65,6 +64,7 @@
switch ($swType) {
case "\"SilkWorm200E\"":
case "\"SW4424\"":
+ case "\"Brocade300\"":
$sensorIDX = ".1.3.6.1.3.94.1.8.1.2";
$sensorName = ".1.3.6.1.3.94.1.8.1.3";
$sensorStatus = ".1.3.6.1.3.94.1.8.1.4";
@@ -99,19 +99,19 @@
}
}
print $output . "\n";
- if ( ereg('STATUS_FAIL',$output) ) {
+ if ( preg_match('/STATUS_FAIL/',$output) ) {
exit(CRITICAL);
}
- if ( ereg('STATUS_WARN',$output) ) {
+ if ( preg_match('/STATUS_WARN/',$output) ) {
exit(WARNGING);
}
- if ( ereg('STATUS_UNKOWN',$output) ) {
+ if ( preg_match('/STATUS_UNKOWN/',$output) ) {
exit(UNKNOWN);
}
- if ( ereg('STATUS_OTHER',$output) ) {
+ if ( preg_match('/STATUS_OTHER/',$output) ) {
exit(UNKNOWN);
}
- if ( ereg('STATUS_OK',$output) ) {
+ if ( preg_match('/STATUS_OK/',$output) ) {
exit(OK);
}
|