http_check returning critical after upgrade to 5.5.3

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cbj111
Posts: 4
Joined: Tue May 01, 2018 12:47 am

http_check returning critical after upgrade to 5.5.3

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: http_check returning critical after upgrade to 5.5.3

Post 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
cbj111
Posts: 4
Joined: Tue May 01, 2018 12:47 am

Re: http_check returning critical after upgrade to 5.5.3

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: http_check returning critical after upgrade to 5.5.3

Post 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.
cbj111
Posts: 4
Joined: Tue May 01, 2018 12:47 am

Re: http_check returning critical after upgrade to 5.5.3

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: http_check returning critical after upgrade to 5.5.3

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cbj111
Posts: 4
Joined: Tue May 01, 2018 12:47 am

Re: http_check returning critical after upgrade to 5.5.3

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: http_check returning critical after upgrade to 5.5.3

Post by lmiltchev »

Sounds good, @cbj111. Is it OK to close this topic now?
Be sure to check out our Knowledgebase for helpful articles and solutions!
gornm565
Posts: 72
Joined: Tue Nov 15, 2016 6:11 pm

Re: http_check returning critical after upgrade to 5.5.3

Post by gornm565 »

Probably should wait until this issue is fixed and then post here about the fix before closing this thread.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: http_check returning critical after upgrade to 5.5.3

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked