Hi Marc,<br><br>Thanks for your reply, I checked on the multiple process of Nagios but there is only one running.<br><br>Any other thing you can think of which might be causing this odd behaviour?<br><br>Thanks,<br>Allan.<br>
<br><div class="gmail_quote">On Sun, Aug 29, 2010 at 6:12 PM, newme me <span dir="ltr"><<a href="mailto:allanm78@gmail.com">allanm78@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<span>
Folks, <br><br>I switched to "check_http" plugin (official nagios plugin) but that also has same problem.<br><br>Initially when I start nagios then the status on the Nagios Web interface is same as the one returned from commandline.<br>
<br>After
some time the status becomes critical but is not as same as the
commandline. Command line returns the correct status of OK instead of
what the Nagios web interface shows as "CRITICAL"<br><br>Result from commandline(& browser) -<br>./check_http -H <a href="http://xyz.com" target="_blank">xyz.com</a> -p 2222 -u /abc -t 3<br>OK<br><br>Result from Nagios Interface - <br>
nodename nor servname provided, or not known<br>HTTP CRITICAL - Unable to open TCP socket<br><br>I
am thinking that this has something to do with Nagios as the box is
behaving just fine based on the commandline result(and verified on the
URL through the browser).<br><br>Please help!<br><br>Thanks,<br><font color="#888888">Allan.</font></span><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Thu, Aug 26, 2010 at 10:26 PM, newme me <span dir="ltr"><<a href="mailto:allanm78@gmail.com" target="_blank">allanm78@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><span>Hi Folks,<br>
<br>
Nagios is acting a little weird for me, I have this external script
which I hooked into Nagios, it merely does a curl/wget on a URL and
returns the status based on string in the content/output. Initially for
2-3 hrs the script returns the right status and Nagios reports correctly
i.e. OK, WARN, ERROR based on the exit from the script. After 2-3 hrs
output which was (and should be) OK or WARN starts returning CRITICAL
and the output line says "Application is" and not even "Application is
ERROR" or "Application is FATAL".<br>
<br>
There is nothing in the logs to suggest what could be the problem. Have
you experienced this before and let me know the corrective action. I am
running Nagios on Mac OSX. <br>
<br>
Here is the script for the curious - <br>
<br>
#!/bin/bash<br>
<br>
read URL < "$1"<br>
<br>
STATUS=`curl -s $URL |grep summary|awk -F\" '{print $2}'`<br>
echo "Application is $STATUS"<br>
echo "curl $URL"<br>
<br>
case $STATUS in<br>
OK)<br>
exit 0<br>
;;<br>
WARN)<br>
exit 1<br>
;;<br>
ERROR)<br>
exit 2<br>
;;<br>
FATAL)<br>
exit 2<br>
;;<br>
*)<br>
exit 2<br>
;;<br>
esac<br>
<br>
Thanks,<br><font color="#888888">
<br>
Allan.</font></span>
</blockquote></div><br>
</div></div></blockquote></div><br>