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.
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 »

please send the command definition for the command on each
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
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:please send the command definition for the command on each
Here you go (attached)
Attachments
VPN-HTTP-XI-Commands.jpg
VPN-HTTP-CORE-Commands-2.jpg
VPN-HTTP-CORE-Commands.jpg
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 »

your commands do not match

check_http2 should be

Code: Select all

$USER1$/check_http -H $HOSTADDRESS$ $ARG1$
but you have

Code: Select all

$USER1$/check_http -t 120 -I $HOSTADDRESS$ $ARG1$
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
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:your commands do not match

check_http2 should be

Code: Select all

$USER1$/check_http -H $HOSTADDRESS$ $ARG1$
but you have

Code: Select all

$USER1$/check_http -t 120 -I $HOSTADDRESS$ $ARG1$
1. It does not matter: check_http CORE command produces WARNING in CORE GUI and OK in CORE CLI

2. CORE having difficulty with some portals, so we have to extend the delay (30 sec normally) in CORE / use of -H makes no difference

So why CORE check_http produces OK in CLI and WARNING in GUI ?
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 »

It does matter, this is the command that is going to be executed, have you tested it in the CLI?

Code: Select all

/usr/local/nagios/libexec/check_http -t 120 -I 185.15.212.41 -f follow -I 185.15.212.41 -u "/" -S -p 443
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
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 »

dlukinski wrote: 2. CORE having difficulty with some portals, so we have to extend the delay (30 sec normally) in CORE / use of -H makes no difference
It does matter when you are doing a certificate check
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
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:It does matter, this is the command that is going to be executed, have you tested it in the CLI?

Code: Select all

/usr/local/nagios/libexec/check_http -t 120 -I 185.15.212.41 -f follow -I 185.15.212.41 -u "/" -S -p 443
change from -I to -H for check_http2 (copied from XI) just made a difference, irrespective of the delay set.

the problem is that when i execute check_http (stock CORE 4.3.4) in CLI, i get an OK

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.129 second response time |time=0.128775s;;;0.000000 size=7426B;;;0
[root@fikc-hvk-nagcore01 objects]#
But CORE GUI with same check_http (stock) shows WARNING
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 »

in your Core your check_http service you showed is using

Code: Select all

$USER1$/check_http -t 55 -I $HOSTADDRESS$ $ARG1$
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
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:in your Core your check_http service you showed is using

Code: Select all

$USER1$/check_http -t 55 -I $HOSTADDRESS$ $ARG1$

True :-\

Did not realize while Copy & Pasting command from XI

So -H vs -I must be the difference for the CORE itself?
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 »

dlukinski wrote:So -H vs -I must be the difference for the CORE itself?
I would believe this is your only problem
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked