From 0280b2ad3f2d0842aa3483f35d110d2acaeb31a2 Mon Sep 17 00:00:00 2001 From: Matt Visnovsky Date: Mon, 6 May 2024 09:21:49 -0600 Subject: [PATCH] A comment about varbinds[0] for clarification Addresses https://github.com/louislam/uptime-kuma/pull/4717#discussion_r1589855126 --- server/monitor-types/snmp.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/monitor-types/snmp.js b/server/monitor-types/snmp.js index 24537fce3..047ece1c4 100644 --- a/server/monitor-types/snmp.js +++ b/server/monitor-types/snmp.js @@ -47,6 +47,7 @@ class SNMPMonitorType extends MonitorType { // Varbinds succesfully returned } else { + // We restrict querying to one OID per monitor, therefore `varbinds[0]` will always contain the value we're interested in. const value = varbinds[0].value; // Check if inputs are numeric. If not, re-parse as strings. This ensures comparisons are handled correctly.