snmp location field
We use snmp location field on cisco devices. it is like this:
“snmp-server location B23 Floor1”
How can we make that show up in logicmonitor in a easy to find place?
While it is a bit disappointing this is not something LM has support for out of the box, using that string is actually one of the least good ways to accomplish the goal. Going “the LM way” we, we’ve developed a method using a per-client property source module to scan each device IP address looking for matches within known per-site networks, then we assign auto.locationtag accordingly (typically a short site code similar to how you’d name devices at the site). With auto.locationtag set, you then create a dynamic group and assign the location string once to that group. This does rely on knowing the network layout for your environment and that it be somewhat reasonable, but otherwise it is rock solid. You can also create an “Unknown Location” group to identify devices without the auto.locationtag set to help find gaps.
Here is a sanitized version of one of our PS modules:hostProps.get("system.ips").split(",").each { ip ->
if (ip ==~ /(172\.(24|30)|10\.188)\..*/) {
locationtag = "loc1"
}
else if (ip ==~ /(172\.(20|23)|10\.178)\..*/) {
locationtag = "loc2"
}
}
if (locationtag) {
println "locationtag=$locationtag"
}return(0)
I have been watching one of our clients adding the SNMP location to devices since they are moving from LM to Datadog and it is one of the poorer solutions out there for network monitoring. Kinda funny watching it happen :).