Page 1 of 1

check_http: Invalid certificate expiration period - -H

Posted: Tue Nov 12, 2019 11:06 am
by Quim
Hello

I am trying to check SSL certificate expiry dates. From terminal I get result but GUI (web) I get next error:
check_http: Invalid certificate expiration period - -H
Results is possible watch in screenshot attached.

Any idea to solve the issue?

Thanks,
Quim

Re: check_http: Invalid certificate expiration period - -H

Posted: Tue Nov 12, 2019 11:11 am
by scottwilkerson
Can you show the Nagios host, service and command definition you are using for this check?

Re: check_http: Invalid certificate expiration period - -H

Posted: Tue Nov 12, 2019 11:26 am
by Quim
Hello

Nagios host:
Static hostname: empbranagios
Icon name: computer-vm
Chassis: vm
Machine ID:
Boot ID:
Virtualization: microsoft
Operating System: Ubuntu 18.04.3 LTS
Kernel: Linux 5.0.0-1022-azure
Architecture: x86-64

Nagios version:
Nagios® Core™ 4.4.5

Service:
define service{
use generic-service
host_name empbraapp01
service_description IJ Cert expiry date
check_command check_https_cert!-H www.infojobs.com.br -S --sni -C 45,30
}

Command:
define command{
command_name check_https_cert
command_line $USER1$/check_http -H $HOSTADDRESS$ -S --sni -C $ARG1$
}

Re: check_http: Invalid certificate expiration period - -H

Posted: Tue Nov 12, 2019 11:35 am
by Quim
Hello


Nagios host:
Static hostname: empbranagios
Icon name: computer-vm
Chassis: vm
Machine ID:
Boot ID:
Virtualization: microsoft
Operating System: Ubuntu 18.04.3 LTS
Kernel: Linux 5.0.0-1022-azure
Architecture: x86-64

Nagios version:
Nagios® Core™ 4.4.5

Service:
define service{
use generic-service
host_name empbraapp01
service_description IJ Cert expiry date
check_command check_https_cert!-H www.infojobs.com.br -S --sni -C 45,30
}

Command:
define command{
command_name check_https_cert
command_line $USER1$/check_http -H $HOSTADDRESS$ -S --sni -C $ARG1$
}

Re: check_http: Invalid certificate expiration period - -H

Posted: Tue Nov 12, 2019 11:47 am
by scottwilkerson
Your check_command/arguments and command have conflicting settings.

Change your command to the following:

Code: Select all

define command{
command_name check_https_cert
command_line $USER1$/check_http $ARG1$
}
then restart Nagios

Re: check_http: Invalid certificate expiration period - -H

Posted: Tue Nov 12, 2019 11:57 am
by Quim
ohhhh fine!!
thank you very much :)

Re: check_http: Invalid certificate expiration period - -H

Posted: Tue Nov 12, 2019 12:04 pm
by scottwilkerson
Quim wrote:ohhhh fine!!
thank you very much :)
Glad to resolve it

Locking thread