HTTP (No output on stdout) warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

HTTP (No output on stdout) warning

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: HTTP (No output on stdout) warning

Post 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?
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: HTTP (No output on stdout) warning

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: HTTP (No output on stdout) warning

Post 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'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: HTTP (No output on stdout) warning

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: HTTP (No output on stdout) warning

Post 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.
Former Nagios Employee.
me.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: HTTP (No output on stdout) warning

Post 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?)
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: HTTP (No output on stdout) warning

Post 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?
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: HTTP (No output on stdout) warning

Post 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.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: HTTP (No output on stdout) warning

Post 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.
Former Nagios Employee
Locked