CHECK_HTTP odd behaviour

Morris, Patrick patrick.morris at hp.com
Wed Feb 17 17:50:35 CET 2010


Paul WILLIS PSE 55499 wrote:
> I'm trying to run a check on a website we have that a) has a stupidly 
> long generated path and b) insists it is available only to certain 
> browers.
> If I run /usr/local/nagios/check_http -p 8000 -H some.host.co.uk -u 
> "/sap/bc/webdynpro/sap/hrrcf_a_unreg_job_search?sap-wd-configId=ZUNREG_JOB_SEARCH&sap-ep-themeroot=/sap/public/bc/ur/customerthemes/sap_kp" 
> -A "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.9) 
> Gecko/20061206 Firefox/1.5.0.9" -R fs_QE2_00
> it comes back fine and tells me that it can read the string fs_QE2_00 
> on the page OK. If I put exactly the same command into my command 
> definition file the accompanying service simply goes red with a status 
> definition of null. If I then drop the -A string it will now work, 
> although it now gives the expected 500 error of browser not supported. 
> I have tried simplifying the -A string but the web site requires 
> pretty much all of it else it 500 errors. Has anyone any idea why the 
> Agent string works when check_http  is run directly but not through 
> Nagios?

My guess is that you've got a quoting and/or special character issue in 
your check or service commands; there shouldn't really be any difference 
between running it from the command line and running it through Nagios 
in this respect.

One relatively easy way to check that would be to run the check through 
a wrapper script that first echoes the command it's using to a log file, 
and then runs the command. My guess is that you'll find the command 
Nagios is running and the one you're running from the command line 
aren't the same.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list