Page 3 of 3

Re: check works until it is scheduled and then it fails

Posted: Fri Feb 19, 2016 3:22 pm
by tgriep
Go and edit that service and add single quotes around the data in the $ARG5$ field. Save it out and see if that helps.

Re: check works until it is scheduled and then it fails

Posted: Fri Feb 19, 2016 3:26 pm
by ssax
Please edit your service and try putting single quotes around this:

Code: Select all

/_layouts/15/Sp.Login.Custom/Login.aspx\?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F
So it looks like this:

Code: Select all

'/_layouts/15/Sp.Login.Custom/Login.aspx\?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F'
Apply config and let us know the results.

Re: check works until it is scheduled and then it fails

Posted: Fri Feb 19, 2016 3:37 pm
by Bionic___
OK, From the command line it works:

Code: Select all

nagios@dira4avbaza /usr/local/nagios/libexec> /usr/local/nagios/libexec/check_website -w 1500 -c 4000 -t 6000 -s -u '/_layouts/15/Sp.Login.Custom/Login.aspx\?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F' portal.dir.texas.gov
HTTPS OK: 55ms - https://portal.dir.texas.gov/_layouts/15/Sp.Login.Custom/Login.aspx\?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F|time=55ms;1500;4000;0;
From the Test Check Command button it fails:

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_website -w 1500 -c 4000 -t 6000 -s  -u \'/_layouts/15/Sp.Login.Custom/Login.aspx\?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F portal.dir.texas.gov 
OUTPUT: HTTPS UNKNOWN: N/A - https://portal.dir.texas.gov'/_layouts/15/Sp.Login.Custom/Login.aspx?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F
From the scheduled initiation:

Code: Select all

HTTPS OK: 288ms - https://portal.dir.texas.gov/_layouts/15/Sp.Login.Custom/Login.aspx?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F
IT WORKS! :D :D :D

I did not know that there was a difference in the way the test button and schedule parsed the information. Chalk that up to a new learning.
I think we can call this one resolved.
Thanks for all the help!