check_http: Invalid certificate expiration period - -H

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.
Locked
Quim
Posts: 12
Joined: Tue Nov 12, 2019 10:45 am

check_http: Invalid certificate expiration period - -H

Post 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
Attachments
comparative terminal vs GUI
comparative terminal vs GUI
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_http: Invalid certificate expiration period - -H

Post by scottwilkerson »

Can you show the Nagios host, service and command definition you are using for this check?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Quim
Posts: 12
Joined: Tue Nov 12, 2019 10:45 am

Re: check_http: Invalid certificate expiration period - -H

Post 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$
}
Quim
Posts: 12
Joined: Tue Nov 12, 2019 10:45 am

Re: check_http: Invalid certificate expiration period - -H

Post 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$
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_http: Invalid certificate expiration period - -H

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Quim
Posts: 12
Joined: Tue Nov 12, 2019 10:45 am

Re: check_http: Invalid certificate expiration period - -H

Post by Quim »

ohhhh fine!!
thank you very much :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_http: Invalid certificate expiration period - -H

Post by scottwilkerson »

Quim wrote:ohhhh fine!!
thank you very much :)
Glad to resolve it

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