Certificate
Certificate
Note
This feature is not the same as the core SSL Certificate Management
A small python3 script that checks age and remaining validity of certificates
This script needs following packages on Debian/Ubuntu Systems:
apt-get install python3 python3-openssl
Content of an example /etc/snmp/certificate.json . Please edit with your own settings.
{"domains": [
{"fqdn": "www.mydomain.com"},
{"fqdn": "some.otherdomain.org",
"port": 8443},
{"fqdn": "personal.domain.net"},
{"fqdn": "selfsignedcert_host.domain.com",
"cert_location": "/etc/pki/tls/certs/localhost.pem"}
]
}
a. (Required): Key 'domains' contains a list of domains to check. b. (Optional): You can define a port. By default it checks on port 443. c. (Optional): you can give a certificate location for self-signed certificates.
SNMP Extend
- Copy the shell script to the host.
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/certificate.py -O /etc/snmp/certificate.py
- Make the script executable.
chmod +x /etc/snmp/certificate.py
- Edit your
snmpd.conffile, usually/etc/snmp/snmpd.conf, and add:
extend certificate /etc/snmp/certificate.py
LibreNMS discovers the application automatically, as described at the top of the page. If the discovery fails, do the steps under the SNMP Extend heading at the top of the page.