I’ve written a OneAgent plugin for SSL/TLS certificate expiration check (also does notification in advance). If you need to check certificates locally for any process running on a host monitored by oneagent.
If you are interested, you can download it from GitHub - juliusloman/dynatrace-oneagent-plugin-sslcertcheck: Dynatrace OneAgent plugin for SSL/TLS certificate expiration check · GitHub.