Hi all -
I have a perl script called check_portstatus.pl
This script checks for the last-used time on a Cisco switchport, and tells you how many ports are link-down, and for how long.
config details for those interested:
it-slav.net/blogs/2009/11/24 … 5-monitor/
This is what it does, when you run it manually:
[root@nagiosserver objects]# /usr/lib/nagios/plugins/check_portstatus.pl -H
That returns:
*OK: 12 of 53 ports available, 0 down, click here to view the report.
*
This is the error that I get when running the service.
MB-3560-2nd Portstatus CRITICAL 08-16-2011 14:57:30 21d 2h 38m 17s 3/3 (Service check did not exit properly)
So according to the manual output, I’m getting a normal value back, but Nagios is still saying that the service didn’t exit properly.
This used to work, btw –
System details:
Running: nagios-3.2.3-3.el5.rf
Service:
define service{
use generic-service
host_name MB-3560-2nd
service_description Portstatus
check_command check_portstatus
}
Command:
define command{
command_name check_portstatus
command_line $USER1$/check_portstatus.pl -H $HOSTADDRESS$
}