Pinning a certificate
The web sensors (HTTP status, HTTP content, REST (JSON), Prometheus, Redfish and the Proxmox sensors) take a tls_fingerprint parameter. It is the way to monitor a server with a self-signed or privately issued certificate without turning verification off.
What it does
With tls_fingerprint set, the connection is accepted if and only if the SHA-256 fingerprint of the certificate the server presents (its leaf certificate) equals the pin. The chain, the validity dates and the name are not looked at, so a self-signed, expired or differently named certificate works when it is the pinned one, and a perfectly valid certificate from another key is refused. The TLS handshake is still completed in full, so the server has to hold the private key of the pinned certificate. verify_tls plays no part: a pin is not weakened by turning it off.
The dates are not part of the decision, but they are still reported: over HTTPS the HTTP status and content sensors report how long the pinned certificate remains valid, so an expired pinned certificate is accepted for the connection and makes the sensor Down (see certificate expiry).
A mismatch is a collection failure of kind protocol, before anything is sent, and the message shows both fingerprints:
TLS error: the server presented a certificate with the SHA-256 fingerprint 9F:F0:...:0F:B1, which is not the pinned 08:5A:...:D7. If the certificate was renewed, compare the fingerprint with the new one and update tls_fingerprintWithout a pin nothing changes, except that the message for an untrusted certificate now shows the fingerprint the server presented and says it can be pinned.
Reading the fingerprint
openssl s_client -connect host.example.org:443 </dev/null 2>/dev/null | openssl x509 -noout -fingerprint -sha256prints sha256 Fingerprint=AB:CD:.... Write it in the parameter with or without the colons, in upper or lower case. Take it from a machine you trust, or from the server's own console, not from the monitoring host's first failed poll over a network you do not trust: the first fingerprint you see is the one you will trust.
Discovery
When discovery reads a Proxmox VE host it reads the certificate the host presents, trusts that one for the scan, and proposes every Proxmox sensor with tls_fingerprint set to it (see Proxmox VE). The fingerprint is also in the results, so you can compare it with the host's own before you apply.
Renewals
A renewed certificate has a new fingerprint (unless the same key and the same certificate are reused). The sensors fail with the message above until you update the parameter on each sensor that uses it. Plan this with the renewal. If that is too much work for many sensors, install a certificate from an authority the probe host trusts instead.
Redirects
The HTTP status and content sensors follow redirects. The pin applies to the host the sensor is aimed at; a redirect to another host is checked with verify_tls as before.
Remote probes
The parameter is part of the sensor, so a remote probe applies it like any other. The fingerprint is not a secret.