Page 1 of 1

http_check returning critical after upgrade to 5.5.3

Posted: Mon Sep 10, 2018 3:02 am
by cbj111
Hi,

I recently upgraded from Nagios XI 5.4.13 to 5.5.3 on my RHEL 7.5 server and one of my check_http services is failing. I'm checking that an application server is alive and am expecting it to return "HTTP/1.0 415 Request data not in text/xml format" when I feed it an empty request so I am calling check_http with these arguments:

check_http -v -H x.x.x.x -p 8412 -P "POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml" -e "415" -w 5 -c 10

This used to work in 5.4.13 but as soon as I upgraded, every service using this call returned a critical status. When I try running it from the command line I see the following message:

Code: Select all

[root@nagiosxi libexec]# ./check_http -v -H x.x.x.x -p 8412 -P "POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml" -e "415" -w 5 -c 10
POST / HTTP/1.1
User-Agent: check_http/v2.2.1 (nagios-plugins 2.2.1)
Connection: close
Host: x.x.x.x:8412
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 63

POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml

http://x.x.x.x:8412/ is 229 characters
STATUS: HTTP/1.0  415 Request data not in text/xml format
**** HEADER ****
Date 2018-09-10 17:43:02.671
Server: RedBack Application Server 5.1
MIME-version: 1.0
Last-modified: 2018-09-10 17:43:02.671
Content-type: text/plain
Content-length: 180
**** CONTENT ****

Status line output matched "415" - 
HTTP CRITICAL: Invalid Status Line (HTTP/1.0  415 Request data not in text/xml format)
[root@nagiosxi libexec]# 
I'm not having this problem with other web servers that I'm monitoring so I assume that the updated check_http has taken exception to my application server. Is there any way I can get them to see eye to eye?

Cheers,

Craig

Re: http_check returning critical after upgrade to 5.5.3

Posted: Mon Sep 10, 2018 11:03 am
by ssax
Let's see what the old version outputs, please run these commands and send us the full output of the final command:

Code: Select all

cd /tmp/
wget 'https://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz'
tar zxf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
./configure
make all
cd /tmp/nagios-plugins-2.0.3/plugins
./check_http -v -H x.x.x.x -p 8412 -P "POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml" -e "415" -w 5 -c 10
You could also just replace the new version with the old version with this command (after running the commands above):
- Note: I would wait to do this until we figure out what the issue is as it would get reverted on the next upgrade

Code: Select all

cp /usr/local/nagios/libexec/check_http /usr/local/nagios/libexec/check_http_v2.2.1
cp /tmp/nagios-plugins-2.0.3/plugins /usr/local/nagios/libexec/
chmod 0775 /usr/local/nagios/libexec/check_http
chown apache.nagios /usr/local/nagios/libexec/check_http

Re: http_check returning critical after upgrade to 5.5.3

Posted: Mon Sep 10, 2018 6:32 pm
by cbj111
Thanks ssax,

After downloading and compiling, the older plugin is working nicely:

Code: Select all

$ ./check_http -v -H x.x.x.x -p 8412 -P "POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml" -e "415" -w 5 -c 10
POST / HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: x.x.x.x:8412
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 63

POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml

http://x.x.x.x:8412/ is 229 characters
STATUS: HTTP/1.0  415 Request data not in text/xml format
**** HEADER ****
Date 2018-09-11 09:12:55.741
Server: RedBack Application Server 5.1
MIME-version: 1.0
Last-modified: 2018-09-11 09:12:55.741
Content-type: text/plain
Content-length: 180
**** CONTENT ****

Status line output matched "415" - 
HTTP OK: Status line output matched "415" - 229 bytes in 0.007 second response time |time=0.007361s;5.000000;10.000000;0.000000 size=229B;;;0
I'll take your advice and hold off downgrading the plugin for the time being..

Cheers,

Craig

Re: http_check returning critical after upgrade to 5.5.3

Posted: Tue Sep 11, 2018 3:24 pm
by ssax
This may be fixed in the latest version, please run these commands and let us know the results:

Code: Select all

cd /tmp/
wget 'https://github.com/nagios-plugins/nagios-plugins/archive/master.zip'
unzip master.zip
cd nagios-plugins-master/
./tools/setup
./configure
make all
cd /tmp/nagios-plugins-master/plugins
./check_http -v -H x.x.x.x -p 8412 -P "POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml" -e "415" -w 5 -c 10
Even if it works you'll still need to replace it with a working version, since the current version isn't working, just run the commands from the previous post to replace your current version with the old version.

Re: http_check returning critical after upgrade to 5.5.3

Posted: Tue Sep 11, 2018 5:34 pm
by cbj111
Hi ssax,

No joy with the latest version, I'm afraid.

Code: Select all

$ ./check_http -v -H x.x.x.x -p 8412 -P "POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml" -e "415" -w 5 -c 10
POST / HTTP/1.1
User-Agent: check_http/v2.2.1.git (nagios-plugins 2.2.1)
Connection: close
Host: x.x.x.x:8412
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 63

POST AppInterfaceServerRequest HTTP/1.0\nContent-Type: text/xml

http://x.x.x.x:8412/ is 229 characters
STATUS: HTTP/1.0  415 Request data not in text/xml format
**** HEADER ****
Date 2018-09-12 08:27:28.695
Server: RedBack Application Server 5.1
MIME-version: 1.0
Last-modified: 2018-09-12 08:27:28.695
Content-type: text/plain
Content-length: 180
**** CONTENT ****

Status line output matched "415" - 
HTTP CRITICAL: Invalid Status Line (HTTP/1.0  415 Request data not in text/xml format)

Cheers,

Craig

Re: http_check returning critical after upgrade to 5.5.3

Posted: Wed Sep 12, 2018 12:29 pm
by npolovenko
Thanks for the update, @cbj111. Looks like you'd need to use an older version of the plugin as a temporary solution.
In a meantime, could you file a new bug report on our GitHub page?
https://github.com/nagios-plugins/nagio ... issues/new

Re: http_check returning critical after upgrade to 5.5.3

Posted: Thu Sep 13, 2018 8:47 pm
by cbj111
Thanks @npolovenko, I've downgraded check_http for the time being and raised issue 416.

https://github.com/nagios-plugins/nagio ... issues/416

Cheers,

Craig

Re: http_check returning critical after upgrade to 5.5.3

Posted: Fri Sep 14, 2018 8:52 am
by lmiltchev
Sounds good, @cbj111. Is it OK to close this topic now?

Re: http_check returning critical after upgrade to 5.5.3

Posted: Mon Sep 17, 2018 1:30 pm
by gornm565
Probably should wait until this issue is fixed and then post here about the fix before closing this thread.

Re: http_check returning critical after upgrade to 5.5.3

Posted: Mon Sep 17, 2018 1:43 pm
by lmiltchev
Probably should wait until this issue is fixed and then post here about the fix before closing this thread.
We can leave the topic open for the time being, but the fix may take some time... Meanwhile, the topic will probably auto-close anyway.

Once the issue/bug has been identified and reported, there is not much to be discussed here. Any information/feedback in regards to this issue, that could be of any use/help to our developers, should be provided directly here:

https://github.com/nagios-plugins/nagio ... issues/416

When a fix is released, and if there are new issues found, you could start a new thread or PM us with a request for reopening this one. Thank you!