Checking Switches and Routers like whats up
Jan Scholten
Jan.Scholten at iconz.net
Thu Nov 4 22:18:44 CET 2004
Try a generic check like:
define command{
command_name check_pix515_if
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $USER3$ -o
interfaces.ifTable.ifEntry.ifOperStatus.1 -c 1
}
and use it with a service definition like:
..
check_command check_pix515_if!1 (for the first port)
and
check_command check_pix515_if!2 (for the second port)
$USER$ is in the resources.cfg and contains the snmp password
As you can see this will be a lot of snmp checks per switch. you can
aggregate some Ports and check up to 8 OIDs, i do that for some routers:
#Checks for Linkup on ae02s
define command{
command_name check_ae02s_ifStatus1
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $USER3$ -P
1 -m ALL -o
1.3.6.1.2.1.2.2.1.8.16,1.3.6.1.2.1.2.2.1.8.17,1.3.6.1.2.1.2.2.1.8.18,1.3.6.1.2.1.2.2.1.8.19,1.3.6.1.2.1.2.2.1.8.20,1.3.6.1.2.1.2.2.1.8.21,1.3.6.1.2.1.2.2.1.8.22,1.3.6.1.2.1.2.2.1.8.23
-w :1,:1,:1,:1,:1,:1,:1,:1 -c :1,:1,:1,:1,:1,:1,:1,:1 -l "Linkstatus for
Vlans is:"
}
As a result i have get: Linkstatus for Vlans is: OK - 1 1 1 1 1 1 1 1
If you want to check every Port seperate you'll have a real big service
overview and a load of checks (slow) what you could do: make every port
"not activeley checked" and handle incoming snmp traps (Link up/Link down)
and use a script do determine which port should be set up or down. use
freshness to check at least .. say every two hours if the current state
ist still ok (so no Up/Down Trap received). See the doc i sent yesterday!
Jan
> Hello Nagiosians!
>
> I use check_snmp to check the status of firewall ports. The same
> concept applies to switch ports. I'd use a snmp walk on the machine and
> just scroll to find the stuff you want. If you were smart about this
> (unlike me) you would make that inerfaces.ifTable.ifEntry.ifOperStatus.#
> something like $MIB$ and just pass that from the check command so you
> don't have to have a seperate checkcommand for every port. We just do
> it with firewalls so I keep it simple (2 interfaces).
>
> define command{
> command_name check_pix515_if1
> command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C MR.STRING
> -o int
> erfaces.ifTable.ifEntry.ifOperStatus.1 -c 1
> }
>
> define command{
> command_name check_pix515_if2
> command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C MR.STRING
> -o int
> erfaces.ifTable.ifEntry.ifOperStatus.2 -c 1
> }
>
> Gimme some candy,
> Jason Payne
>
> -----Original Message-----
> From: Wengrzik, Andreas [mailto:Wengrzik at ewr.de]
> Sent: Thursday, November 04, 2004 4:31 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Checking Switches and Routers like whats up
>
>
> Hello!
>
> I have the order to make everything what whats up does with the switches
> i have to do in nagios...
>
> So anyone does check all ports of the switches or routers with nagios???
>
> I have to check each port if it is up or down.
> What will be the best way to do that??
>
> Thanks for the help!
>
> bye
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_idU88&alloc_id065&op=ick
> _______________________________________________
> 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
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
> _______________________________________________
> 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
>
>
--
Jan Scholten
Research and Development Intern
Iconz.co.nz
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
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