Recalculate health
I'm writing this blog so they are easy to find and you don't need to sift through management packs.
It's important to understand how these link together because there's quite a bit going on - maybe that's why most don't work, because it's more work/too hard. In general, start with the unit monitor then look at the monitor type. Within that you'll see the probe action it calls - it will only be a few lines - then look at the code for the probe.
Monitors with this feature
- SQL query.
- PowerShell script.
- Registry query.
VMware.CB.Monitor.AgentStatus
This runs a PowerShell script. It links to monitor type VMware.CB.MonitorType.AgentStatus which links to this probe action:
<ProbeAction ID="Probe" TypeID="VMware.CB.ProbeAction.AgentStatus"><TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</ProbeAction>
The probe runs a PowerShell script using the Windows!Microsoft.Windows.PowerShellPropertyBagTriggerOnlyProbe probe and outputs System!System.PropertyBagData.
Tenable.Nessus.Monitor.SQLAccess
This runs a SQL query. It links to monitor type Tenable.Nessus.MonitorType.SQLAccess which links to this probe action:
<ProbeAction ID="Probe" TypeID="Tenable.Nessus.ProbeAction.SQLAccess" />The probe runs a SQL query using the System!System.OleDbProbe probe and outputs System!System.OleDbData.
Tenable.Nessus.Monitor.AgentInstall
This queries the registry. It links to monitor type Tenable.Nessus.MonitorType.AgentInstall which links to this probe action:
<ProbeAction ID="Probe" TypeID="Tenable.Nessus.ProbeAction.AgentStatus"></ProbeAction>
The probe queries the registry using the Windows!Microsoft.Windows.RegistryTriggerProbe probe and outputs Windows!Microsoft.Windows.RegistryData.
Memory joggers
No real structure here, just some notes that might help.
- You'll see this in the probe action. I'm guessing it links to hitting the button:
<TriggerOnly>true</TriggerOnly>
- You'll see this in the probe action. No idea what it does:
- You'll see this in each monitor type. See how similar these elements are, differences in red:
<RegularDetection MonitorTypeStateID="RegKeyExists">
<Node ID="CDExists">
<Node ID="RegDS"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="RegKeyMissing">
<Node ID="CDMissing">
<Node ID="RegDS"/>
</Node>
</RegularDetection>
</RegularDetections>
Note: You will often see these in monitor types but they still don't seem to work. You need the probe action in the monitor type (above notes) and an actual probe action module.
<Node ID="Probe" />
</Node>
</OnDemandDetection>
<OnDemandDetection MonitorTypeStateID="RegKeyMissing">
<Node ID="CDMissing">
<Node ID="Probe" />
</Node>
</OnDemandDetection>
</OnDemandDetections>
Comments
Post a Comment