Page 1 of 1

Check_http changed?

Posted: Mon Jul 02, 2018 12:01 pm
by jenstar13
I just upgraded my XI to the latest version today on a centos 5 box, and the check_http is not responding the same on the upgrade as it used to.
so I went to an XI install that I did not upgrade, and the check worked fine

Example, older XI install (I have to remove the domain names etc

]# /usr/local/nagios/libexec/check_http -I lvsprdxxxapp02.gxxxt.net -k "Host: xxxman.gxxxt.net" -p 9201 -u /xxxmanJsp/CTdisplayxxxManLogin.jsp -e 200 -w 5 -c 10 -t 15 -m 100
HTTP OK: Status line output matched "200" - 6526 bytes in 0.152 second response time |time=0.152163s;5.000000;10.000000;0.000000 size=6526B;100;0;0

On the freshly upgraded XI
~]$ /usr/local/nagios/libexec/check_http -I lvsprdxxxapp02.gxxxt.net -k "Host: xxxxman.gxxxt.net" -p 9201 -u /xxxmanJsp/CTdisplayxxxManLogin.jsp -e 200 -w 5 -c 10 -t 15 -m 100
HTTP CRITICAL - Invalid HTTP response received from host on port 9201: HTTP/1.1 302 Moved Temporarily
HTTP/1.1 302 Moved Temporarily -

I physically went to the url and there was no 302

log% curl -I http://xx.xx.160.13:9201/xxxmanJsp/CTdi ... nLogin.jsp
HTTP/1.1 200 OK

I also rebooted the XI machine after the upgrade

for your standard questions
Version of the problem machine
Installed Version: 5.5.0
Last Update Check: 2018-07-02 16:15:34

CentOS Linux release 7.5.1804 (Core)

Problem XI
]$ /usr/local/nagios/libexec/check_http -V
check_http v2.2.1 (nagios-plugins 2.2.1)

Good XI
]# /usr/local/nagios/libexec/check_http -V
check_http v2.0.3 (nagios-plugins 2.0.3)

Re: Check_http changed?

Posted: Mon Jul 02, 2018 12:45 pm
by cdienger
I believe you have to use the "-f" option now to follow the 302 redirect message whereas it is automatically doing this previously. Try the following:

/usr/local/nagios/libexec/check_http -I lvsprdxxxapp02.gxxxt.net -k "Host: xxxman.gxxxt.net" -p 9201 -u /xxxmanJsp/CTdisplayxxxManLogin.jsp -e 200 -w 5 -c 10 -t 15 -m 100 -f follow

Re: Check_http changed?

Posted: Tue Jul 03, 2018 6:01 am
by jenstar13
Holy crap, that's over 1000 checks , I need to update
Do you have a changelog for the upgrade so I can see anything else that has changed?

Re: Check_http changed?

Posted: Tue Jul 03, 2018 10:04 am
by cdienger
The change log can be found at https://assets.nagios.com/downloads/nag ... NGES-5.TXT. That said, you could make this a quick change by editing the check_http command itself always use the "-f follow" option. The command can be edited under Configure > Core Config Manager > Commands > _Commands.

Re: Check_http changed?

Posted: Tue Jul 03, 2018 10:16 am
by jenstar13
Ok Great,
so that's backwards compatible too with the older version of check_httpd?
sorry, today has been nothing but throw stuff over the way to my group, so everyone can take the holiday off, and I've not had time to test anything

Re: Check_http changed?

Posted: Tue Jul 03, 2018 12:58 pm
by cdienger
Correct. It should work with the older versions too.

Re: Check_http changed?

Posted: Thu Jul 05, 2018 5:45 am
by jenstar13
ok thank you, you can close this