Monitor Cisco Uptime

Fernando Feijo ffeijo at ffeijo.com
Sun Oct 21 18:01:34 CEST 2012


Thanks, Joerg.

I wish I had known about that one before I wrote my own (inferior) script ..

Fernando

**
On Oct 20, 2012, at 2:05 PM, Jörg Linge <pitchfork at ederdrom.de> wrote:

> https://github.com/mludvig/nagios-plugins/blob/268693c0afa2775c719584212433164cd846fe23/check_snmp_uptime.pl
> 
> Joerg
> 
> Am 20.10.2012 um 20:14 schrieb "Will Bashlor" <wbashlor at atcnetworks.net>:
> 
>> The thought in my mind for querying uptime via snmp had 2 purposes, 1.) to (possibly) alert on no snmp response, and 2.) To display uptime in a list format on Nagios for my network engineers/techs to view.
>>  
>> I like the idea of alerting on uptime < 1 day. But wouldn’t the reply need to be in a numbered time format only? I guess my mind is in Cacti threshold plugin mode. For example:
>>  
>> If the snmp respond replies with 4579200 in seconds (53 days), and I want to alert on uptime less than 1 day then my alert value would be <86400, correct? If this is true how can this be done when the response is:
>>  
>> “iso.3.6.1.2.1.1.3.0 = Timeticks: (447923619) 51 days, 20:13:56.19”
>>  
>> Or can I alert based on 447923619 only? It appears the 447923619 is seconds with the last 2 digits being hundredths. Secondly, how can I simply display “51 days, 20:13:56.19” In Nagios? I know these are basic questions, I have a lot to learn and will continue to research every day.
>>  
>> We have ssh only enabled for obvious security reasons, so that would work as well for monitoring device vitals.
>>  
>> I’m still interested in what other Network Managers as myself are using, services wise to monitor critical core equipment vitals other than ping, if anyone else would like to share.
>>  
>> Today we are using an older version of whatsup with a little over 1000 devices/services (includes CPE) with ping only. I’m looking to Nagios as a possible future replacement. Love it so far, just a bit of a learning curve. NagiosQL helps me a lot with config files.
>>  
>> Thanks for the response.
>>  
>> -Will
>>  
>> From: Fernando Feijo [mailto:ffeijo at ffeijo.com] 
>> Sent: Saturday, October 20, 2012 12:19 PM
>> To: Nagios Users List
>> Subject: Re: [Nagios-users] Monitor Cisco Uptime
>>  
>> >>>What other services do you recommend monitoring for up/down status besides ping?
>> You could also do ssh or even telnet, if you have them enabled.
>>  
>> You did not ask, but a comment on uptime. You can use it to detect router bounces, detecting rogue reloads or perhaps system crashes. I have it to go to critical whenever the uptime is below X minutes, and email out. Network tests such as ping, snmp or ssh availability might miss a quick box's trip down, but uptime will always catch a reload.
>>  
>> Fernando
>>  
>> **
>> On Oct 20, 2012, at 11:09 AM, Will Bashlor <wbashlor at atcnetworks.net> wrote:
>> 
>> 
>> Hi list,
>>  
>> Well I’m not sure which of the steps below worked but it started working in Nagios and the check_snmp command works from cli. I’d still be interested in a guide or the correct steps I should have taken. I’m on a test vm now but will be reinstalling on a production vm later.
>>  
>> root at atcdeb01:~# /usr/lib/nagios/plugins/check_snmp -H x.x.x.x -C public -o sysUpTime.0
>> SNMP OK - Timeticks: (448261008) 51 days, 21:10:10.08 |
>> root at atcdeb01:~#
>>  
>> Now I’ve got to figure out a couple more things. Feel free to respond if you can help.
>>  
>> 1.)    Even though ping and uptime show ok, the test Cisco host status went to “PENDING” in Nagios…?
>> 2.)    Not sure how to get rid of part of the response I don’t need for uptime. I only need “51 days, 21:10:10.08” under Status Information in Nagios
>>  
>> Another thing, I’m looking for advice. For monitoring up/down status’ for core Cisco routers/switches my idea is to monitor snmp response and ping, but I don’t want to get 2 alerts from 1 device if it were to go down.
>>  
>> So can I get ping or snmp alerts if they go down individually and only one alert if the device is down hard? What other services do you recommend monitoring for up/down status besides ping?
>>  
>> Or is ping sufficient enough in your opinion? I may configure text alerts only on ping and maybe just email alerts for snmp, or no alerts for snmp. I like seeing uptime in Nagios though, it makes it easy to see if any devices have just rebooted after an event.
>>  
>> I continue to research every day but I am interested in your thoughts and opinions if you’d like to share.
>>  
>> Oh, can I integrate Nagios with my Cacti? Sorry for all the questions but will be very grateful for any responses.
>>  
>> Thanks all very much,
>>  
>> -Will
>>  
>> From: Will Bashlor [mailto:wbashlor at atcnetworks.net] 
>> Sent: Saturday, October 20, 2012 11:23 AM
>> To: Nagios Users List
>> Subject: [Nagios-users] Monitor Cisco Uptime
>>  
>> Hi list,
>>  
>> I’ve searched to no avail, this is a basic question with hopefully a simple answer.
>>  
>> I’m a long time cacti user (windows), I know basic Linux knowledge, new to Nagios. I have a fresh install of Debian stable (squeeze) with apt-get installed Webmin, ssh, apache2, and Nagios 3.2.1, nagiosql, and whatever dependencies. I am trying to setup monitoring of our core Cisco routers and switches. I have configured 2 services, ping and uptime. Ping works great of course but I can’t get a valid response from check_snmp for uptime. Here’s the command I’ve tried from the command line:
>>  
>> root at atcdeb01:/# /usr/lib/nagios/plugins/check_snmp -H x.x.x.x -C public -o sysUpTime.0
>> no output, it just hangs
>>  
>> I’ve also tried
>>  
>> root at atcdeb01:/# /usr/bin/snmpget -v2c -c public x.x.x.x sysUpTime.0
>> sysUpTime.0: Unknown Object Identifier (Sub-id not found: (top) -> sysUpTime)
>>  
>> Obviously with the correct IP and community string
>>  
>> If I try this I get:
>>  
>> root at atcdeb01:/# /usr/bin/snmpget -v2c -c public x.x.x.x 1.3.6.1.2.1.1.3.0
>> iso.3.6.1.2.1.1.3.0 = Timeticks: (447923619) 51 days, 20:13:56.19
>>  
>> So using OID names aren’t working. I’ve researched with not much luck.
>>  
>> From here and various other sites I’ve tried…
>> http://wiki.debian.org/SNMP
>>  
>> Added “deb http://ftp.us.debian.org/debian squeeze main contrib non-free” to /etc/apt/sources.list
>>  
>> apt-get update
>>  
>> Then apt-get install snmp-mibs-downloader
>>  
>> Then “download-mibs”. Restart snmp.
>>  
>> All to no avail. What am I doing wrong? Is there a simple guide I can use so check_snmp works with oid names for Cisco and other devices?
>>  
>> Thanks for any help you can provide.
>>  
>> Best Regards,
>>  
>> -Will
>>  
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_sfd2d_oct_______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
>> ::: Messages without supporting info will risk being sent to /dev/null
>>  
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_sfd2d_oct
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
>> ::: Messages without supporting info will risk being sent to /dev/null
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct_______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20121021/467f82db/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list