- Add descriptions for custom rule set concepts - Addd reference docs for custom rule sets - Update existing docs for 4-level severity
2.3 KiB
Probe
A Probe is a JSON property. The property name is the probe ID used in checks. The property value is an array of probe implementations. The SQL Assessment API engine selects the first implementation with matching target pattern. This means that the order of the implementations in the array is important. A probe can be comprised by a mix of CLR and SQL implementations.
Another ruleset may add probe implementations on top of the list.
A probe should be designed as a function with no side effects. The order of calling probes is not determined. The engine may reorder probe calls to optimize the target SQL Server load. When no check needs data from a probe, that probe will not be called.
Probes from the default rule set read metadata only, e.g. update logs or server properties. They do not read user data from tables or write anything to databases or instances. Probes do not set any flags or properties.
Probe implementation
Probe implementation is represented by a JSON object. Its properties define procedures for getting data and selecting appropriate implementation.
Probe properties
implementation
The implementation property contains probe parameters and data transformations affecting the probe output. For example, for a T-SQL probe the main parameter is the query for selecting data.
Probe parameters are specific for probe type.
target
Target object pattern.
type
Probe type determines the mechanism used to get data. it may be a T-SQL or a WMI. Available probe types are listed in the following table.
| Type | Description |
|---|---|
| AzGraph | Kusto query to Azure resource graph |
| AzMetadata | JSONPath for the object returned by Azure Instance Metadata Service |
| CMD | Command shell script run on the target machine |
| External | Arbitrary .NET code |
| PowerShell | PowerShell script |
| Registry | Data from registry |
| SQL | T-SQl query |
| WMI | WMI query |