Page 2 of 3

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

Posted: Fri Mar 02, 2018 10:52 am
by scottwilkerson
please send the command definition for the command on each

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

Posted: Fri Mar 02, 2018 1:48 pm
by dlukinski
scottwilkerson wrote:please send the command definition for the command on each
Here you go (attached)

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

Posted: Fri Mar 02, 2018 2:43 pm
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$

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

Posted: Fri Mar 02, 2018 2:50 pm
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 ?

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

Posted: Fri Mar 02, 2018 2:55 pm
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

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

Posted: Fri Mar 02, 2018 2:58 pm
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

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

Posted: Fri Mar 02, 2018 3:08 pm
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

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

Posted: Fri Mar 02, 2018 3:39 pm
by scottwilkerson
in your Core your check_http service you showed is using

Code: Select all

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

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

Posted: Fri Mar 02, 2018 4:45 pm
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?

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

Posted: Fri Mar 02, 2018 5:02 pm
by scottwilkerson
dlukinski wrote:So -H vs -I must be the difference for the CORE itself?
I would believe this is your only problem