Updated Nagios XI - check_http doesn't parse content with -s

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ehumphries
Posts: 4
Joined: Tue Mar 19, 2019 11:09 am

Updated Nagios XI - check_http doesn't parse content with -s

Post by ehumphries »

We were running 2.2.1 of the nagios plugins yesterday. Updated Nagios XI, then updated the plugins.
[root@localhost ~]# /usr/local/nagios/libexec/check_http -V
check_http v2.3.2 (nagios-plugins 2.3.2)
Existing nagios check we had configured doesn't seem to be finding "SOMESTRING" in the page content any longer:
[root@localhost ~]# /usr/local/nagios/libexec/check_http -I 10.2.3.26 -s "SOMESTRING" -f ok -u "/users/sign_in" -w 5 -p 8080
HTTP CRITICAL: HTTP/1.1 200 OK - string 'SOMESTRING' not found on 'http://10.2.3.26:8080/users/sign_in', page size 8194 too small - 8194 bytes in 0.032 second response time |time=0.031728s;5.000000;;0.000000 size=8194B;8195;0;0
If i do the same thing with CURL, clearly SOMESTRING still exists in the page content:
[root@localhost ~]# curl http://10.2.3.26:8080/users/sign_in | grep "SOMESTRING"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29764 100 29764 0 0 985k 0 --:--:-- --:--:-- --:--:-- 1002k
<h6>SOMESTRING Phone</h6>
I've dug through the different available flags, and I haven't yet figured out any magic incantation that appears to fix this issue. What am I doing wrong? What else can I check?
pspagnola
Posts: 51
Joined: Thu Nov 21, 2019 4:40 pm

Re: Updated Nagios XI - check_http doesn't parse content wit

Post by pspagnola »

I ran into a similar but different issues recently. The solution was to change the host address from the IP address to the DNS name, because the site was bound to the DNS name and not the IP address. I was getting a 304 redirect response.

During my troubleshooting I learned a few things. Inside of Core Configuration Manager (CCM) You can...
- on the service template screen, there is more that one check command for HTTP checking.
- There is a run check now command to help troubleshoot.
- you can adjust the ARGs and perform more tests.


sorry if you know all of this already.

The final working result for me was:
check command: check_xi_service_http
$USER1$/check_http -H $HOSTADDRESS$ $ARG1$
ARG1 = -s "string-to-check" -f ok -I hostname.domain.tld -u '/' -S --sni -p 443
Nagios v5.6.12 ~200 hosts 500+ services.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Updated Nagios XI - check_http doesn't parse content wit

Post by scottwilkerson »

This was an issue identified in 2.3.2 and will be resolved in the next release.
https://github.com/nagios-plugins/nagio ... issues/535

As a word of caution, we do not recommend upgrading to the latest and "greatest" nagios-plugins open-source project for Nagios XI customers as issues like this can arise. When we deem the plugins version is fully stable it will be included in a Nagios XI release.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ehumphries
Posts: 4
Joined: Tue Mar 19, 2019 11:09 am

Re: Updated Nagios XI - check_http doesn't parse content wit

Post by ehumphries »

I appreciate your responses.

I only updated the plugins because our Nagios box hadn't been updated in a couple years. I wasn't sure if the plugins came with the standard update process. This isn't a large issue for us, I was just wondering what I did wrong. Will the fixed check_http plugin come down during the normal upgrade process in the future?

A good thing to note, is that check_http is the only plugin we're having issues with out of almost 600 different checks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Updated Nagios XI - check_http doesn't parse content wit

Post by scottwilkerson »

ehumphries wrote:Will the fixed check_http plugin come down during the normal upgrade process in the future?
It will once our team deems it "enterprise stable"

For now if you like, you can downgrade to 2.2.1
https://github.com/nagios-plugins/nagio ... s/releases
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ehumphries
Posts: 4
Joined: Tue Mar 19, 2019 11:09 am

Re: Updated Nagios XI - check_http doesn't parse content wit

Post by ehumphries »

Thanks much!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Updated Nagios XI - check_http doesn't parse content wit

Post by scottwilkerson »

ehumphries wrote:Thanks much!
No problem

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked