check_ssl_cert issues with URLs that contains port numbers

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
humblestudent
Posts: 6
Joined: Fri Jun 14, 2019 1:33 pm

check_ssl_cert issues with URLs that contains port numbers

Post by humblestudent »

Hello community,

I am trying to use the check_ssl_cert to monitor expiring certificates within my organization. I am able to use the plugin just fine with standard URL schemes i.e. domain.name.com, etc. However, some websites our servers host has URL schemas with the port number within the URL i.e. domain.name:8443, etc.

I tried running the following commands in different variations to no avail.

./check_ssl_cert -p 8443 -w 4 -c 2 -H domain.name:8443
./check_ssl_cert -p 8443 -w 4 -c 2 -H "domain.name:8443"
./check_ssl_cert -p 8443 --ssl3 -w 4 -c 2 -H domain.name:8443
./check_ssl_cert -p 8443 --tls1_3 -w 4 -c 2 -H domain.name:8443

Any tips or recommendations on how to use check_ssl_cert with these domains schemas?

Looking forward to your reply.

Sincerely,

A humble student.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_ssl_cert issues with URLs that contains port numbe

Post by scottwilkerson »

If you are passing the port with the -p flag, you would not add it to the domain in the -H flag

something like

Code: Select all

./check_ssl_cert -p 8443 -w 4 -c 2 -H domain.name
./check_ssl_cert -p 8443 --ssl3 -w 4 -c 2 -H domain.name
./check_ssl_cert -p 8443 --tls1_3 -w 4 -c 2 -H domain.name
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked