louislam/uptime-kuma · warning · Error
The SNMP query returned that no instance exists for OID ${mo
Error message
The SNMP query returned that no instance exists for OID ${monitor.snmpOid} What it means
Thrown when varbinds[0].type equals snmp.ObjectType.NoSuchInstance. NoSuchInstance is a per-object error indicator defined by RFC 3416: the agent understood the GetRequest and the variable binding syntax, but no managed object instance exists at the requested OID. It is distinct from a transport error or a noSuchObject (wrong type/leaf) response.
Source
Thrown at server/monitor-types/snmp.js:57
throw new Error(`Error creating SNMP session: ${error.message}`);
});
const varbinds = await new Promise((resolve, reject) => {
session.get([monitor.snmpOid], (error, varbinds) => {
error ? reject(error) : resolve(varbinds);
});
});
log.debug(
this.name,
`SNMP: Received varbinds (Type: ${snmp.ObjectType[varbinds[0].type]} Value: ${varbinds[0].value})`
);
if (varbinds.length === 0) {
throw new Error(`No varbinds returned from SNMP session (OID: ${monitor.snmpOid})`);
}
if (varbinds[0].type === snmp.ObjectType.NoSuchInstance) {
throw new Error(`The SNMP query returned that no instance exists for OID ${monitor.snmpOid}`);
}
// 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;
const { status, response } = await evaluateJsonQuery(
value,
monitor.jsonPath,
monitor.jsonPathOperator,
monitor.expectedValue
);
if (status) {
heartbeat.status = UP;
heartbeat.msg = `JSON query passes (comparing ${response} ${monitor.jsonPathOperator} ${monitor.expectedValue})`;
} else {
throw new Error(
`JSON query does not pass (comparing ${response} ${monitor.jsonPathOperator} ${monitor.expectedValue})`View on GitHub (pinned to 6b5ea01557)
Solutions
- Use snmpwalk/snmpget externally to find a concrete instance OID for this device, then paste the full leaf-with-index OID into monitor.snmpOid.
- If the OID is a table column, append the relevant row index (e.g. interface index) to select a real instance.
- Confirm the device model/firmware actually implements the MIB at that OID.
- Switch to a known-good scalar OID (e.g. sysUpTime.0 = 1.3.6.1.2.1.1.3.0) to verify the path before reintroducing the target OID.
Defensive patterns
Strategy: validation
Validate before calling
const snmp = require("net-snmp");
function assertInstancePresent(varbind, oid) {
if (varbind.type === snmp.ObjectType.NoSuchInstance) {
throw new Error(`No instance for OID ${oid}`);
}
return varbind;
} Type guard
function isInstancePresent(varbind) {
return varbind && varbind.type !== snmp.ObjectType.NoSuchInstance && varbind.type !== snmp.ObjectType.NoSuchObject;
} Try / catch
if (!isInstancePresent(varbinds[0])) { heartbeat.status = DOWN; heartbeat.msg = `No instance for ${monitor.snmpOid}`; return; } Prevention
- Always query a concrete leaf OID with its index suffix.
- Walk the MIB once to confirm the instance exists before pinning the monitor OID.
- Prefer scalar OIDs ending in .0 for simple health checks.
When it happens
Trigger: Triggered by session.get() when the OID names a scalar/column that the agent implements but has no instance for, or when querying a table column OID without a row index suffix. Also occurs when the instance has been deleted or is not yet populated on the device.
Common situations: Querying a table column OID directly (e.g. 1.3.6.1.2.1.2.2.1.10) without appending .ifIndex; querying an interface counter OID for an interface that no longer exists; pointing at an OID from a different device model where that MIB subtree is absent; stale documentation referencing an OID that the firmware revision no longer exposes.
Related errors
- No varbinds returned from SNMP session (OID: ${monitor.snmpO
- Error creating SNMP session: ${error.message}
- SNMPv3 username is required
- JSON query does not pass (comparing ${response} ${monitor.js
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/3a55f6bc8bf35db5.
Report an issue: GitHub.