Does Dynatrace monitor SSL certificate validation?

Thanks for clear explanation usage of the plugin. @Julius L.

We have created an AG Plugin that checks Certs: GitHub - mediro-ict/activegate_python_ssl_plugin: This plugin checks the SSL certificates of hosts entered using the GUI and logs problems and custom Events on Dyantrace if the certificate is about to expire. · GitHub

@Julius L. At long last I got around to trying this out and I must say… OUTSTANDING!

This is a keeper! Thank you!

Thanks @Larry R.!.. I have made few fixes - mainly regarding metadata - all information in one entry for each certificate. I hope this will be in the repository very soon.

Pretty cool stuff! Do you know if there is a compilation of other types of plugins?

Hi Julius, thanks for writing this plugin. We’re looking for something like this. I have exactly done as per the given steps for my Apache HTTP Server running on Windows 2012, but its not capturing the data. Please help.

Regards, Sandeep

It worked for me. Thanks!

@Sandeep K. i also successfully connected but in dynatrace which tab i can see my certification details?

If you used my plugin it will show in the properties for the process group (you need to expand them).

Hi @Julius Loman
we installed the plugin on the server and uploaded extension in dynatrace. but we are getting an error

Error (‘SSLCertCheck_Plugin’ object has no attribute ‘config’) for:
lnbroams04.highmark.com

please help us on what we are missing here..

on server

/opt/dynatrace/oneagent/plugin_deployment/custom.python.sslcertcheck_plugin

drwxrwxr-x. 2 root root 4096 Jan 21 13:19 asn1crypto

drwxrwxr-x. 2 root root 4096 Jan 21 13:19 asn1crypto-1.3.0.dist-info

-rwxrwxr-x. 1 root root 2278 Jan 21 09:46 plugin.json

-rwxrwxr-x. 1 root root 3017 Jan 21 10:54 README.md

drwxrwxr-x. 2 root root 4096 Jan 21 13:19 sslcertcheck_plugin-1.1.dist-info

-rwxrwxr-x. 1 root root 10459 Jan 21 13:19 sslcertcheck_plugin.py

in Dynatrace

Plugin logs for reference:

ruxitagent_pluginagent_84594.0.log
ruxitagent-pluginagent-845940.log (118 KB)

Hi Julius, thanks for this wonderful plugin, it is successfully detecting the certificates.

One quick query regarding the metrics consumption, will it consume any custom metrics in terms of licenses?

Thanks.

Hi Julius,

Followed the same procedure. But receiving an error. Is this known ?

How to clear this ?

No custom metrics are consumed.

Can you share the plugin engine log file from that agent?

Error is being triggered because of line 148 in the python file.

sub=cert[‘subject’].native[‘common_name’],

Py code near the line 148 :

self.logger.info(“SSLCheck result {hps} subject CN {sub} notvalidbefore {nvb} novalidafter {nva}”.format(hps=hps,
sub=cert[‘subject’].native[‘common_name’],
nvb=cert[‘validity’][‘not_before’].native,
nva=cert[‘validity’][‘not_after’].native))

In the plugin engine log :

2020-07-24 13:36:14,326 DEBUG 140009279579904(MainThread) - [report_status] {(‘custom.python.sslcertcheck_plugin’, 9331643405291913339): (PluginFullStatus(pluginName=custom.python.sslcertcheck_plugin, pluginVersion=1.01, state=ERROR_UNKNOWN, description=common_name, monitoredEntityId=xxxxxxxxxx, stacktrace=Traceback (most recent call last):
File “/var/lib/dynatrace/oneagent/agent/runtime/engine_unpacked/ruxit/plugin_state_machine.py”, line 340, in _execute_next_task
self._query_plugin()
File “/var/lib/dynatrace/oneagent/agent/runtime/engine_unpacked/ruxit/plugin_state_machine.py”, line 672, in _query_plugin
self._plugin_run_data.plugin_instance._query_internal(**self._plugin_run_data.plugin_args)
File “/var/lib/dynatrace/oneagent/agent/runtime/engine_unpacked/ruxit/api/base_plugin.py”, line 455, in _query_internal
return self.query(**kwargs)
File “/opt/dynatrace/oneagent/plugin_deployment/custom.python.sslcertcheck_plugin/sslcertcheck_plugin.py”, line 148, in query
sub=cert[‘subject’].native[‘common_name’],
KeyError: ‘common_name’
),

Hope this would be sufficient.

Hi Julius,

The plugin is working for other servers.
Seems like there is some issue for that particular server.
Could you point out what that can be ?

Appreciate your quick responses and superb plugin development !

Hi @Julius L.
when you get a chance, can you please respond to my post on the issue i am having..
Thanks,
Avi

Hi @Julius L. I have deployed this but getting same events continously ,like it is giving details of same certificate again and again ,so can you tell like what is to be changed so that we do not get same certificate after every one min or so

It would be so nice to have it out of the box ! It is part of basic monitoring of the system and should be included if OneAgent is installed on the server and detect any https endpoint.