Core returns HTTP 400, where XI returns 302 or 200

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Core returns HTTP 400, where XI returns 302 or 200

Post by dlukinski »

Hello Nagios Support

I get CORE HTTP checks returning HTTP 400, where XI returns 302 for the same check command

CORE:
FI-HVK-NRDP-HTTP-Login-tracker.konecranes.com

WARNING 02-21-2018 23:24:02 0d 0h 48m 51s 5/5 HTTP WARNING: HTTP/1.1 400 Bad Request - 581 bytes in 0.005 second response time

XI:

HTTP OK: HTTP/1.1 200 200 - 40883 bytes in 0.035 second response time

Command:
check_xi_service_http! -f follow -I 10.102.74.221 -u "/" -S -p 443!!!!!!!

check_http in CORE case

How to fix this?
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by tacolover101 »

check_xi_service_http is likely defined different than your check_http. i would compare your check commands.

if that's not the case, chase down all the differences and you'll eventually find one. running check_http / curl in verbose will help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by scottwilkerson »

I agree with @tacolover101, you will need to compare the commands as will as the check_command in the config for each of them and compare side by side.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by dlukinski »

scottwilkerson wrote:I agree with @tacolover101, you will need to compare the commands as will as the check_command in the config for each of them and compare side by side.

Could we transfer check_xi to CORE, rename and use it as check_http2 ?

Both XI and CORE http are the stock ones (never edited)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by scottwilkerson »

I am not sure what you mean by check_xi
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by dlukinski »

scottwilkerson wrote:I am not sure what you mean by check_xi
Either copy check_xi_service_http and rename to check_http2 or copy check_http from XI machine to CORE?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by scottwilkerson »

sure that would work
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by dlukinski »

scottwilkerson wrote:sure that would work
Copied check_http from XI to CORE (called check_http2, configured in commands)

Tried using with 3 portals checks
- same commands used as in XI
- same check_http used as in XI

WARNING in CORE and OK in XI

So this is not check_http problem, but a CORE server problem. We;ve got 8 of them checking portals remotely and we want to see this problem fixed.

What we do now?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by scottwilkerson »

can you show the command line output and the command, running the command from the CLI?


I also need you to share the command, service and host config both on a working systen and a non-working system

If it
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Core returns HTTP 400, where XI returns 302 or 200

Post by dlukinski »

scottwilkerson wrote:can you show the command line output and the command, running the command from the CLI?


I also need you to share the command, service and host config both on a working systen and a non-working system

If it
---------------------------------------------------------------------------------------------------------------------------------------
Case of 3 VPN Portal checks (same command, different IPs)

Code: Select all

 -f follow -I 185.15.212.41 -u "/" -S -p 443
OK in XI CLI

Code: Select all

[nagios@fikc-nagxiprod01.konecranes.com ~]$ /usr/local/nagios/libexec/check_http -H vpneur.konecranes.com -f follow -I 185.15.212.41 -u "/" -S -p 443
HTTP OK: HTTP/1.1 200 OK - 7426 bytes in 0.113 second response time |time=0.112642s;;;0.000000 size=7426B;;;0
OK in CORE CLI

Code: Select all

[root@fikc-hvk-nagcore01 objects]# /usr/local/nagios/libexec/check_http -H vpneur.konecranes.com -f follow -I 185.15.212.41 -u "/" -S -p 443
HTTP OK: HTTP/1.1 200 OK - 7426 bytes in 0.131 second response time |time=0.130780s;;;0.000000 size=7426B;;;0
- Tried both "core" check_http and "xi" check_http on the CORE with the same command.

BUT WARNING in CORE GUI as attached
Attachments
VPN-HTTP-CORE.jpg
VPN-HTTP-XI.jpg
Locked