"No output returned from plugin"


#1

Hi All,

I have the following script which I use to check the availability of multiple applications(50+). Initially(for about 2-3 hrs) the status is returned correctly by Nagios but after some time the status turns red and I notice
in the log files that the following error occurs “No output returned from plugin”. Nothing additional is noticed even with turning the max debug level.

I have also tried to remove the host and used IP addresses to cut down on time used to resolve the hostname (but no luck).

I also used the large setup setting(use_large_installation_tweaks) in nagios.cfg but things have gotten worse with that.

The other thing I noticed is that nagios official plugin check_http works fine but I want to avoid using that due to the nature of the check.

[code]#!/bin/bash

read URL < “$1”

TOTAL=curl -w '\ntotal_time=%{time_total}s' -s -m 3 --connect-timeout 3 $URL |perl -n0e '$s=/"alive"/?"OK":"ERROR";($t)=/(total_time.+)/;print "$s $t;0;0;0\n"'

STATUS=echo $TOTAL|awk '{print $1}'
PERF=echo $TOTAL|awk '{print $2}'

case $STATUS in
OK)
echo "$STATUS|$PERF"
echo "curl $URL"
exit 0
;;
WARN)
echo "$STATUS|$PERF"
echo "curl $URL"
exit 1
;;
ERROR)
echo "$STATUS|$PERF"
echo "curl $URL"
exit 2
;;
FATAL)
echo "$STATUS|$PERF"
echo "curl $URL"
exit 2
;;
*)
echo "$STATUS|$PERF"
echo "curl $URL"
exit 2
;;
esac[/code]

Please Help!

Thanks,
Allan