There are scenarios where the Certificate status alarm is triggered and yet there is no actual or immediate impact.
Most cases include when a CSR is generated via the Vsphere GUI, we have seen these occurrences in VCF as well.
VVF and VCF environments, Vsphere 7.x and 8.x
The issue is that the GUI generates a certificates, that gets places in the MACHINE_SSL_CERT by default.
The Certificate status alarm, works as intended - e.g. it gets triggered 60/ 90 days before the certificate expires, or when it detects a certificate that's expired in one of the following VCenter certificate stores:
for store in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list | grep -v TRUSTED_ROOT_CRLS); do echo "[*] Store :" $store; /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $store --text | grep -ie "Alias" -ie "Not After"; echo "===================================================="; done;
# date
Aug 22 11:41:43 GMT 2024
[*] Store : MACHINE_SSL_CERT
Alias : __MACHINE_CERT
Not After : Aug 22 20:00:00 2026 GMT
Alias : __MACHINE_CSR
Not After : Aug 20 10:00:00 2024 GMT
# /usr/lib/vmware-vmafd/bin/vecs-cli entry delete --store MACHINE_SSL_CERT --alias __MACHINE_CSR
The Built in alarms like Certificate status - can be edited to sent mail.
A precondition is to configure SendMail - see https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-configuration/GUID-467DA288-7844-48F5-BB44-99DE6F6160A4.html
Then Edit the Alarm under Alarm Definitions, Click the Radial Button, select Edit, select Send mail, and add the desired mail/ distribution list.
Follow the wizard Next, Next, Finish.