Snmpv3 for Juniper Logical System using context

LibreNMS currently doesn’t provide option to add a particular logical system (Juniper) using snmpv3 with context defination.
In the Juniper snmpv3 config, there is context definition and only the default system can be added using the default context. Logical systems can’t be add simple because there is no option to configure the context on the LibreNMS (Add Device)

when we use snmpwalk without the context:
snmpwalk -v3 -l authPriv -u tashicell -a SHA -A -x AES -X .1.3.6.1.2.1
Error in packet.
Reason: authorizationError (access denied to that object)

When we use snmpwalk with context:
snmpwalk -v3 -l authPriv -n cr1-thimphu/default -u tashicell -a SHA -A -x AES -X .1.3.6.1.2.1
iso.3.6.1.2.1.1.1.0 = STRING: “snmp for ar1.thimphu”
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.2636.1.1.1.2.29
an so on…

FYI: Juniper snmp config
v3 {
usm {
local-engine {
user tashicell {
authentication-sha {
authentication-key
}
privacy-aes128 {
privacy-key
}
}
}
}
vacm {
security-to-group {
security-model usm {
security-name tashicell {
group mysnmpv3;
}
}
}
access {
group mysnmpv3 {
default-context-prefix { - default chassis
security-model usm {
security-level authentication {
read-view mysnmpv3view;
}
security-level privacy {
read-view mysnmpv3view;
}
}
}
context-prefix ar1-thimphu/default { - logical system
security-model usm {
security-level privacy {
read-view mysnmpv3view;
}
}
}
context-prefix cr1-thimphu/default { - logical system
security-model usm {
security-level privacy {
read-view mysnmpv3view;
}
}
}
}
}
}

2 Likes

Nobody did something in this? It prevents to add many devices to LibreNMS