|
|
@ -46,9 +46,9 @@ class SNMPMonitorType extends MonitorType {
|
|
|
|
|
|
|
|
|
|
|
|
if (status) {
|
|
|
|
if (status) {
|
|
|
|
heartbeat.status = UP;
|
|
|
|
heartbeat.status = UP;
|
|
|
|
heartbeat.msg = `JSON query passes (comparing ${response} ${this.jsonPathOperator} ${this.expectedValue})`;
|
|
|
|
heartbeat.msg = `JSON query passes (comparing ${response} ${monitor.jsonPathOperator} ${monitor.expectedValue})`;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
throw new Error(`JSON query does not pass (comparing ${response} ${this.jsonPathOperator} ${this.expectedValue})`);
|
|
|
|
throw new Error(`JSON query does not pass (comparing ${response} ${monitor.jsonPathOperator} ${monitor.expectedValue})`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
if (session) {
|
|
|
|
if (session) {
|
|
|
|