|
|
@ -70,9 +70,7 @@ class SNMPMonitorType extends MonitorType {
|
|
|
|
heartbeat.status = snmpValue.toString().includes(snmpControlValue.toString()) ? UP : DOWN;
|
|
|
|
heartbeat.status = snmpValue.toString().includes(snmpControlValue.toString()) ? UP : DOWN;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
heartbeat.status = DOWN;
|
|
|
|
throw new Error(`Invalid condition ${monitor.snmpCondition}`);
|
|
|
|
heartbeat.msg = `Invalid condition: ${monitor.snmpCondition}`;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
heartbeat.msg = "SNMP value " + (heartbeat.status ? "passes" : "does not pass") + ` comparison: ${value.toString()} ${monitor.snmpCondition} ${snmpControlValue}`;
|
|
|
|
heartbeat.msg = "SNMP value " + (heartbeat.status ? "passes" : "does not pass") + ` comparison: ${value.toString()} ${monitor.snmpCondition} ${snmpControlValue}`;
|
|
|
|
|
|
|
|
|
|
|
|