I am wondering if any one has been able to pull SSL certificate info from a servers local computer certificate store. I can get on the server and run the below PowerShell command and it pulls all of the SSL certificates that i expect. When i create a custom datasource to run this same PowerShell command its only pulling the SSL certificates for my local session.
Get-item Cert:\LocalMachine\my\* | select-object certificatedomains,issuer,status,notbefore,subject
I can run this command without admin rights, i am suspecting that Logic Monitor is using WMI to run this and for some reason it isnt allow of some sort. I have searched all of the docs and cannot find anything on how to do this. Any help is greatly appreciated.
Best answer by mnagelView original
DataSource code always runs directly on the collector’s server, and it’s up to your code to connect to the relevant server with the SSL cert, unless you want to check the server the collector software is installed on. Might that be part of the issue?
I created a module for this some time back -- should be in the Exchange. I just looked at ours, though, and it is marked ‘Security Review’ which is super annoying since it was submitted 2 years ago at least -- LM has no apparent workflow for the Exchange, just have to find the right person to poke (if you get lucky). There should at least be some sort of “escalate” button on those to get someone’s attention.
I also don’t think the version posted is our current version (we added some code later to avoid expired certs in some cases). Here is the full source code (AD and collection). Somewhat ironically, the code handler for the forum post editor does not include “PowerShell”.
This is fantastic, I am going to give this a try. I really appreciate the help.