In almost every SCOM environment I have been involved with the need to monitor certificates has come up. This is the standard management pack I use.
Requirements:
You can also enable agent proxying via powershell.
SCOM 2012 Syntax:
Get-SCOMAgent | where {$_.ProxyingEnabled.Value -eq $False} | Enable-SCOMAgentProxy
SCOM 2007 Syntax:
$agentlist = get-agent | where {$_.ProxyingEnabled.Value -eq $False}Foreach ($agent in $agentlist){ $agent.ProxyingEnabled = $true $agent.ApplyChanges() }
This is a library management pack. So be default it doesn't do anything. I'm including an example management pack that uses it. I have found that certificates are used so differently by organizations that it is hard to make a discovery rule that would result in just the right level of monitoring for the organization.
I provided one discovery data source
I can't possible anticipate the needs of every organization, so if you need a more granular discovery, I'm providing an unsealed version of the management pack, so you can edit the "WHERE" part of the powershell script to suit your own needs. Just change this line in Microsoft.Windows.Certificates.Discovery.DS
$colcert = Get-ChildItem -recurse cert:localmachine\ | WHERE {$_.Thumbprint -ne $null}
To something like this, or whatever meets the needs of your organization.
$colcert = Get-ChildItem -recurse cert:localmachine\ | WHERE {($_.Thumbprint -ne $null) -and ($_.Subject -notmatch "abcd") -and ($_.Issuer -match "qwerty")}
I provided two monitor types
The monitors do not have to be targeted at certificates. You can target them at any hosted class so long as you can provide a valid principal name, thumbprint, and store.
Values to use for Store
Thumbprints should be provided without spaces. For example: 97817950d81c9670cc34d809cf794431367ef474
There are also a couple of state views that show the discovered certificates as both hosted and non-hosted.
The example management pack does the following:
I deliberated for quite a while about whether or not to put in an active monitor by default. Since nothing will be discovered by just the library MP, I decided to place an expiration monitor with a default warning threshold of 10 days on all hosted certificates, and an alerting monitor on the non-hosted class that contains them. You can override the threshold and/or disable the monitor if you want to.