SNMP - Beginner - Cisco devices

Hi All,

Ive got a few devices that Id like to monitor environments from, they are Cisco devices.

Am I right in saying all I need is the SNMP binding and the OID of what I want to monitor?

The SNMP instructions I found a little confusing…

I placed this into my snmp.conf under services


# Listening Port (optional, defaults to '162')
#port=

# The SNMP community to listen to (optional, defaults to 'public')
#community=

# The SNMP retry timeout (in milliseconds). Defaults to 1500.
# Sets the number of milliseconds between retries.
#timeout=

# The SNMP number of retries. Defaults to 0.
# Sets the number of retries before aborting the request.
#retries=
community=LAN
port=12345
timeout=1500
retries=0

I assume, if i define a community ‘LAN’ on my Cisco devices that is all I need? The devices are:

Cisco 3945 Router
Cisco 3560E Switch
2 x Cisco UCS-E Blades (both inside the router, so id like to be able to poll the CPU/Storage/Memory of these)

Thanks!

I do not use this binding, but here are some tips that might help you.-

  • Differentiate between snmp get/set and snmp trap.
    You most likely do not need to recievce snmp traps and therefor do not need to define a port.
  • Did you look in the documentation?
    https://docs.openhab.org/addons/bindings/snmp1/readme.html
  • It looks like this is a openHab v1.x binding. So make sure you install the binding successfully.
  • Post a question or a problem so we know how we can help you. :wink:
1 Like

i tried the binding but didn’t like it, ended up with using snmpget on command line and it works great:


SNMP Get seems to work fine with items. Is the 10000 figure at the end seconds the updates are provided in?

Further, how best can I try and work out the OIDs for this Cisco router? I want to poll a number of items on interfaces, temp etc

Uptime was easy to find from google, the rest not so.

Uhh i think i used snmpwalk to find ids and a vendor manual, the 10000 is the polling interval yup

Is that in Seconds?

Oh wait, the 10000ms is just the delay the exec command is allowed to take. The polling works via cron, see the TimerTrigger(“0 0/5 * * * ?”) below. (5 minutes), sorry i just woke up :grin:

time trigger below? im not following…

In my code example the snmp function is callled by a cron trigger, every 5 minutes should be fine

Oh sorry im not using your script. Im just using normal items. I didnt understand what it did

I am using the binding with a synology NAS connected to an UPS.
My service file (snmp.cfg) has no entries at all (only defaults are used). So I assume you also would not need to maintain it.
My items look like this (you will have to replace the SNMP codes with the Cisco codes):

String DS215_UPS_STATUS "UPS Status DS215j [%s]" <usvstatus> { snmp="<[192.168.178.62:public:.1.3.6.1.4.1.6574.4.2.1.0:10000]" }

String DS215_UPS_LOAD "UPS Load DS215j [%s]" <usvstatus> { snmp="<[192.168.178.62:public:.1.3.6.1.4.1.6574.4.3.1.1.0:10000]" }

Number DS215_UPS_LOADN			"UPS LoadN [%.2f ]"			<energy>	{ snmp="<[192.168.178.62:public:.1.3.6.1.4.1.6574.4.3.1.1.0:10000]" }

Number DS215_UPS_RESTMIN		"UPS Restmin [%.2f ]"			<energy>	{ snmp="<[192.168.178.62:public:.1.3.6.1.4.1.6574.4.3.6.1.0:10000]" }

That is all the configuration an it works like a charm.