Cisco switch and routers

Cook, Garry GWCOOK at mactec.com
Fri Oct 24 15:55:58 CEST 2003


It's possible. However, most people on mailing lists don't want to give
away free tech support. Don't get me wrong though, we don't mind helping
out our mailing-list friends... 

So, let's keep this thread on-list. That way someone else searching for
the same problem may find this info in the archives, and I won't have to
answer the same question once a month. :-)

Beware of email word-wrap in the following entries.

This is an entry from my services.cfg file:
#------------------------------
# router-cpu definition
define service{
        name                            router-cpu

        use                             generic-service

        hostgroup_name                  ce-router
        service_description             CPU
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              5
        normal_check_interval           20
        retry_check_interval            5
        notification_interval           30
        notification_period             daytime
        notification_options            w,c,r
        check_command                   cisco_cpunew

        register                        1
        }
#------------------------------

The check command above points to this in checkcommands.cfg:
#------------------------------
# 'cisco_cpunew' command definition
define command{
        command_name    cisco_cpunew
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -o
.1.3.6.1.4.1.9.2.1.58.0 -w 84:70 -c 100:85 -C $USER9$ -l CPU\
Utilization -u%
        }
#------------------------------

The line above that starts with 'command_line' should end with
'Utilization -u%'. It may very well be broken into two lines in email,
so make sure that you put it back together should you decide to paste it
into your config.

OK, so if you are now somewhat familiar with Nagios, and have read the
help on the check_snmp command like I suggested earlier, the two entries
above should make sense. If not, run 'check_snmp -h' from
/path/to/nagios/libexec again and compare the output to the command
definition above. The only thing that might not be readily apparent is
the $USER9$ variable, which is where I store my SNMP community string.
This is located in the resource.cfg file, which has a restricted set of
permissions so that it cannot be read by the world.

If you get this setup properly and are still having issues, make sure
that your SNMP community string is the same as the one on the router and
that there is no firewall between the Nagios server and router that may
be blocking SNMP.

HTH

Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 720.220.1862 (Mobile) 

> -----Original Message-----
> From: Yalcin Cekic [mailto:yc at eng.bahcesehir.edu.tr] 
> Sent: Friday, October 24, 2003 7:28 AM
> To: Cook, Garry
> Subject: Re[2]: [Nagios-users] Cisco switch and routers
> 
> 
>  
>  Hi Garry,
> 
>  Is it possible to give some example of plugins you use?
>  I try to use check_snmp but cant receive any info.
>  ----------
> [root at testpc plugins]# ./check_snmp -H 193.255.xx.xx -C abcd
> SNMP problem - No data recieved from host
> CMD: /usr/bin/snmpget -m ALL -v 1 -c ycro 193.255.85.21:161
>  ----------
>  
>  I can get info using mrtg program.
> 
>  thx for your help,
> 
>  Y.C
>  
> CG> On my Cisco IOS gear I'm checking PING, BGP State, CPU 
> Utilization, Free
> CG> Memory, as well as looking for interfaces that are 
> administratively up
> CG> but operationally down.
> 
> CG> The plugins used are: check_ping, check_bgpstate.pl (from 
> the contrib
> CG> directory), check_snmp (CPU & MEM), and check_ifstatus. 
> 
> CG> Each of these plugins (with the exception of BGP State) 
> can be run on
> CG> IOS Routers & Switches. These should be found in your
> CG> '/path/to/nagios/libexec' directory can be run with '-h' 
> or '--help' to
> CG> get help on how to use them.
> 
> CG> I believe the bgpstate plugin my have it's own README 
> file, although
> CG> you'll only want to use this on your routers that are 
> running the BGP
> CG> routing protocol, if any.
> 
> CG> On my CatOS switches I just run a PING check. I could 
> setup some SNMP
> CG> checks I suppose, I just haven't gotten around to this yet.
> 
> CG> Garry W. Cook, CCNA
> CG> Network Infrastructure Manager
> CG> MACTEC, Inc. - http://www.mactec.com/
> CG> 303.308.6228 (Office) - 720.220.1862 (Mobile) 
> 
> >> -----Original Message-----
> >> From: yc [mailto:yc at eng.bahcesehir.edu.tr] 
> >> Sent: Wednesday, October 22, 2003 3:33 PM
> >> To: nagios-users at lists.sourceforge.net
> >> Subject: [Nagios-users] Cisco switch and routers
> >> 
> >> 
> >> 
> >> Hi, 
> >> 
> >> I am a new bee in nagios list.
> >> I installed nagios 1.0 with no problem :-)
> >> I works for localhost very well.
> >> I want to check my cisco switch/router,
> >> I cant find any plugin or something for cisco in nagios.
> >> Is it possible? how? 
> >> 
> >> any help is welcome, 
> >> 
> >> Y.C
> >> 
> 
> 


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
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