06-02-2009 12:11 PM
I want to track my routers up time and occasionally want to reboot when they are reaching certain months/year. is this possible to do on LMS? if not I want write a script to do that and what will be oid/mib to get system up time from Cisco routers by snmpget?
Solved! Go to Solution.
06-02-2009 02:43 PM
RME does track sysUpTime, but not in the way you want. That is, you cannot spawn a script based on the value. You could use the XML-exported inventory to capture the sysUpTime for each device, then write your script based on that.
Alternatively, if your devices support it, you could create an EEM policy to reboot the devices. For example:
event manager applet uptime-reload
event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-val 3153600000 entry-op ge entry-type value poll-interval 60
action 1.0 syslog msg "Uptime is greater than one year ($_snmp_oid_val)
action 2.0 reload
This policy should work with any device that supports EEM 1.0 or higher (e.g. 12.3(4)T or higher).
06-02-2009 02:43 PM
RME does track sysUpTime, but not in the way you want. That is, you cannot spawn a script based on the value. You could use the XML-exported inventory to capture the sysUpTime for each device, then write your script based on that.
Alternatively, if your devices support it, you could create an EEM policy to reboot the devices. For example:
event manager applet uptime-reload
event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-val 3153600000 entry-op ge entry-type value poll-interval 60
action 1.0 syslog msg "Uptime is greater than one year ($_snmp_oid_val)
action 2.0 reload
This policy should work with any device that supports EEM 1.0 or higher (e.g. 12.3(4)T or higher).
06-03-2009 08:32 AM
Thanks a lot, great info.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: