check_ifoperstatus followup
Travis Dangel
Travis.Dangel at sdncommunications.com
Wed Aug 18 23:56:40 CEST 2004
Ok so after playing around with it everything appears to be working from the command line. I have a catalyst 3550 switch here that I'm using for testing purposes with active connections on ports 1 and 5. After storing a couple variables and running the following commands from the command line, everything appears to work ok:
check_ifoperstatus -H $HOSTADDR -C $COMMUNITY -d FastEthernet0/5
returns:
OK: Interface FastEthernet0/5 (index 5) is up.
and...
./check_ifoperstatus -H $HOSTADDR -C $COMMUNITY -d FastEthernet0/7
returns:
CRITICAL: Interface FastEthernet0/7 (index 7) is down.
So... all appears to work fine from the command line. So I have created a check command for this as follows:
#############
# 'check_port_status' command definition
define command{
command_name check_port_status
command_line $USER1$/check_ifoperstatus -H $HOSTADDRESS$ -C $USER5$ -d $ARG1$
}
#############
where $USER5$ contains the snmp community. I then created a service for the switch's IP which calls the command like so:
#############
service_description Port:FA0/5
check_command check_port_status!FastEthernet0/5
############
and restarted nagios... the host comes up with OK status even if port 5 is unplugged. If I disconnect the switch from the network all together then it shows status CRITICAL and fails. Anyone have any ideas here? I've tried changing a few different things around here and there but havent really gotten any results. I have to be missing something stupid here. Any input would be greatly appreciated.
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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