Page 1 of 1
HTTP (No output on stdout) warning
Posted: Fri Oct 30, 2015 1:03 pm
by dlukinski
Hello
We are getting this WARNING:
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
When trying to monitor one of our internal sites/portals (we are an SSO environment)
HTTP Check shows "OK" but produces this warning.
Could there be something we are doing wrong with this kind of checks / could we adjust some configurations?
Re: HTTP (No output on stdout) warning
Posted: Fri Oct 30, 2015 2:06 pm
by rkennedy
Just to clarify, which script are you using to check?
Additionally, what parameters are you running it with? Does this same issue happen if you manually run it over command line?
Re: HTTP (No output on stdout) warning
Posted: Fri Oct 30, 2015 3:06 pm
by dlukinski
rkennedy wrote:Just to clarify, which script are you using to check?
Additionally, what parameters are you running it with? Does this same issue happen if you manually run it over command line?
Works when running over command line:
COMMAND: /usr/local/nagios/libexec/check_http -H siebel.konecranes.com -f ok -I 10.z.z.z -u "/" -p 80 -a \"XX:xx"!!!!!!
OUTPUT: HTTP OK: HTTP/1.1 200 OK - 906 bytes in 0.007 second response time |time=0.007059s;;;0.000000 size=906B;;;0
Re: HTTP (No output on stdout) warning
Posted: Mon Nov 02, 2015 1:43 am
by Box293
dlukinski wrote:Works when running over command line:
COMMAND: /usr/local/nagios/libexec/check_http -H siebel.konecranes.com -f ok -I 10.z.z.z -u "/" -p 80 -a \"XX:xx"!!!!!!
OUTPUT: HTTP OK: HTTP/1.1 200 OK - 906 bytes in 0.007 second response time |time=0.007059s;;;0.000000 size=906B;;;0
I can see you are running into a problem which can lead to the issue you are having.
Due to some issues with how PHP escapes characters the "Test Check Command" does not work in these situations and should be ignored.
So for all further testing of this service you need to:
Make the changes to the service
Save the Service
Apply Confguration
Go back to the home screen and find the Service
When viewing the Service Status Details page click the Schedule a forced immediate check link
Just to re-iterate, for all further testing for this service DO NOT use the "Test Check Command" button, follow the steps above.
However, are you able to execute this command at the command line?
Code: Select all
su nagios
/usr/local/nagios/libexec/check_http -H siebel.konecranes.com -f ok -I 10.z.z.z -u "/" -p 80 -a \"XX:xx"
When I try it does not work, because the \" is making the " be ignored and hence the last " is treated as the first " in a pair of ".
Try with single quotes:
Code: Select all
/usr/local/nagios/libexec/check_http -H siebel.konecranes.com -f ok -I 10.z.z.z -u "/" -p 80 -a 'XX:xx'
Re: HTTP (No output on stdout) warning
Posted: Mon Nov 09, 2015 10:11 am
by dlukinski
Box293 wrote:dlukinski wrote:Works when running over command line:
COMMAND: /usr/local/nagios/libexec/check_http -H siebel.konecranes.com -f ok -I 10.z.z.z -u "/" -p 80 -a \"XX:xx"!!!!!!
OUTPUT: HTTP OK: HTTP/1.1 200 OK - 906 bytes in 0.007 second response time |time=0.007059s;;;0.000000 size=906B;;;0
I can see you are running into a problem which can lead to the issue you are having.
Due to some issues with how PHP escapes characters the "Test Check Command" does not work in these situations and should be ignored.
So for all further testing of this service you need to:
Make the changes to the service
Save the Service
Apply Confguration
Go back to the home screen and find the Service
When viewing the Service Status Details page click the Schedule a forced immediate check link
Just to re-iterate, for all further testing for this service DO NOT use the "Test Check Command" button, follow the steps above.
However, are you able to execute this command at the command line?
Code: Select all
su nagios
/usr/local/nagios/libexec/check_http -H siebel.konecranes.com -f ok -I 10.z.z.z -u "/" -p 80 -a \"XX:xx"
When I try it does not work, because the \" is making the " be ignored and hence the last " is treated as the first " in a pair of ".
Try with single quotes:
Code: Select all
/usr/local/nagios/libexec/check_http -H siebel.konecranes.com -f ok -I 10.z.z.z -u "/" -p 80 -a 'XX:xx'
It produces HTTP OK result (no matter what kind of quotes) either way, only keeps the warning "(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `'' in a way where both the warning and HTTP "OK" exist simultaneously.
Re: HTTP (No output on stdout) warning
Posted: Mon Nov 09, 2015 5:09 pm
by hsmith
When you run the check on the command line that is working, which user are you doing it as? If you're doing it as root, please try doing it as 'nagios' and posting the output of that command here.
Re: HTTP (No output on stdout) warning
Posted: Tue Nov 10, 2015 4:06 pm
by dlukinski
hsmith wrote:When you run the check on the command line that is working, which user are you doing it as? If you're doing it as root, please try doing it as 'nagios' and posting the output of that command here.
- I figured what it was. URL and WEB wizards place the last (') symbol in the second ARG. This what creates this error.
Please close the request now (fix that Wizard in coming updates?)
Re: HTTP (No output on stdout) warning
Posted: Tue Nov 10, 2015 4:12 pm
by rkennedy
Glad to see this is resolved. Can you post a screenshot of exactly how your $ARG1$ and $ARG2$ appear so that I have a bit more information about what you're trying to run?
Re: HTTP (No output on stdout) warning
Posted: Wed Nov 11, 2015 9:48 am
by dlukinski
rkennedy wrote:Glad to see this is resolved. Can you post a screenshot of exactly how your $ARG1$ and $ARG2$ appear so that I have a bit more information about what you're trying to run?
- screenshot attached. See that (') in ARG2? One produced by running URL or WEB monitoring wizards and not noticeable right away.
Re: HTTP (No output on stdout) warning
Posted: Wed Nov 11, 2015 10:09 am
by rkennedy
I appreciate the screenshot - I'll look more into it today and figure out where the underlying issue is.
For now, I'm going to close this post. If you need assistance in the future, feel free to open a new thread.