monitor multiple port

Lei Chen cloved at gmail.com
Fri May 22 13:51:58 CEST 2009


You can use check_snmp_int.pl to do this job.
http://nagios.manubulon.com/snmp_int.html

Such as follow:
 ./check_snmp_int.pl  -H 192.168.100.1  -C xxxx  -n
Ethernet0/29:UP, Ethernet0/19:DOWN, Ethernet0/6:UP, Ethernet0/11:DOWN,
Ethernet0/7:DOWN, Ethernet0/31:UP, Ethernet0/25:DOWN,
Ethernet0/24:DOWN, Ethernet0/8:UP, Aux0/0:UP, Ethernet0/1:UP,
Ethernet0/36:UP, Ethernet0/47:DOWN, Ethernet0/34:UP, Ethernet0/4:UP,
Ethernet0/38:UP, Ethernet0/9:DOWN, Ethernet0/37:DOWN,
GigabitEthernet1/3:DOWN, Ethernet0/43:DOWN, Ethernet0/27:UP,
Ethernet0/23:DOWN, Ethernet0/5:DOWN, Ethernet0/42:UP, Ethernet0/16:UP,
Ethernet0/14:UP, Ethernet0/26:DOWN, Ethernet0/3:UP, Ethernet0/46:UP,
Ethernet0/28:DOWN, Ethernet0/48:DOWN, Ethernet0/41:DOWN,
Ethernet0/12:UP, GigabitEthernet1/2:DOWN, Ethernet0/22:DOWN,
Ethernet0/20:UP, Ethernet0/18:UP, Ethernet0/32:UP, Ethernet0/21:DOWN,
Ethernet0/40:UP, Ethernet0/17:DOWN, Ethernet0/33:UP,
GigabitEthernet1/1:DOWN, Ethernet0/39:DOWN, Ethernet0/35:DOWN,
NULL0:UP, Vlan-interface100:UP, Ethernet0/2:DOWN, Ethernet0/10:UP,
Ethernet0/45:UP, GigabitEthernet1/4:DOWN, Vlan-interface200:UP,
Ethernet0/44:UP, Ethernet0/13:DOWN, Ethernet0/15:DOWN,
Ethernet0/30:UP: 27 int NOK : CRITICAL


2009/5/22 Anirudh Srinivasan <srianirudh at gmail.com>:
> Here is my commands.cfg for check_snmp:
>
> define command{
>         command_name    check_port
>         command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o
> $ARG2$ -r 1 -m RFC1213-MIB
> }
>
> Here is my services.cfg command:
>
> define service{
>         use                     local-service
>         host_name               mir-user-2
>         service_description     Port 1 status
>         check_command           check_port!public!ifOperStatus.1
> }
>
> Now this is for only ONE port , and if it goes down it says Critical which
> is working fine.
>
> I would love to monitor multiple ports together i.e lets say port 1 2 3 and
> 4 and if 4 is down it should be critical . In that case what would be my
> commands.cfg and services.cfg
>
> Can some one elaborate on how my commands.cfg and services.cfg should look
> like ???
>
>
> Thanks in adv
> --
> Anirudh Srinivasan
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> 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
>



-- 
Thanks,
Chenlei & 石头++
MSN Messenger: chnl at 163.com

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
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