mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Add docs for SQL Assessment API probe requirements
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
# attr::service:: variables
|
||||
|
||||
[Automatic variables](./README.md) in the **attr::service::* namespace are provided with [Service requirements](../ProbeRequirements/ServiceRequirement.md).
|
||||
|
||||
The following variables are available for each service. Service key is a value from [Service requirement supported values](../ProbeRequirements/ServiceRequirement.md#supported-values).
|
||||
|
||||
| Variable name | Type | Description |
|
||||
|------------------------------|--------|--------------------------------------|
|
||||
| attr::service::_key_ | bool | Inidicates if the service is present |
|
||||
| attr::service::_key_.name | string | Actual service name |
|
||||
| attr::service::_key_.account | string | User account name for this service |
|
||||
|
||||
## Examples
|
||||
|
||||
In the following example the message will report actual user account name when the SQL Server Agent service is present and running under local service account. See [Message template](../MessageTemplate.md).
|
||||
|
||||
```json
|
||||
{
|
||||
…
|
||||
"message": "Account '@{attr::service::SQLAgent.account}' is not supported for 'SQL Server Agent' service.",
|
||||
"localServiceAccount": "NT AUTHORITY\\LOCALSERVICE",
|
||||
"condition": [
|
||||
{ "not": "@attr::service::SQLAgent" },
|
||||
{ "ine": [
|
||||
"@attr::service::SQLAgent.account",
|
||||
"@localServiceAccount"
|
||||
]}
|
||||
],
|
||||
"probes": [ "IsClusteredServer" ]
|
||||
}
|
||||
```
|
||||
|
||||
The next example extends the previous check with support for clustered servers. When the server is clustered, three more accounts are not supported.
|
||||
|
||||
```json
|
||||
{
|
||||
…
|
||||
"message": "Account '@{attr::service::SQLAgent.account}' is not supported for 'SQL Server Agent' service.",
|
||||
"localServiceAccount": "NT AUTHORITY\\LOCALSERVICE",
|
||||
"unsupportedAccounts": [
|
||||
"NT AUTHORITY\\SYSTEM",
|
||||
"LOCALSYSTEM",
|
||||
"NT AUTHORITY\\NETWORKSERVICE"
|
||||
],
|
||||
"condition": [
|
||||
{ "not": "@attr::service::SQLAgent" },
|
||||
{
|
||||
"ine": [
|
||||
"@attr::service::SQLAgent.account",
|
||||
"@localServiceAccount"
|
||||
],
|
||||
"or": [
|
||||
{ "not": "@is_clustered_server" },
|
||||
{ "not": {
|
||||
"iin": [
|
||||
"@attr::service::SQLAgent.account",
|
||||
"@unsupportedAccounts"
|
||||
]
|
||||
}}
|
||||
]
|
||||
}
|
||||
],
|
||||
"probes": [ "IsClusteredServer" ]
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,12 @@
|
||||
# attr::target:: variables
|
||||
|
||||
[Automatic variables](./README.md) in **attr::target::** namespace include the data which matched the [target pattern](../Rule.md#target).
|
||||
|
||||
| Variable name | Type | Description |
|
||||
|-----------------------------|---------|-------------------|
|
||||
| attr::target::version | version | Target SQL Server [version](../TargetPattern.md#version) |
|
||||
| attr::target::platform | string | Target SQL Server host [platform](../TargetPattern.md#platform) (e.g. Windows, Linux) |
|
||||
| attr:target::engine_edition | string | Target [engine edition](../TargetPattern.md#engineedition) |
|
||||
| attr::target::server_name | string | Target [server name](../TargetPattern.md#servername) |
|
||||
| attr::target::machine_type | string | Target [machine type](../TargetPattern.md#machinetype) |
|
||||
| attr::target::urn | string | Target object URN |
|
||||
@@ -0,0 +1,8 @@
|
||||
# Automatic variables
|
||||
|
||||
Data for assessment is delivered by probes. Some data is available before the first probe is invoked, e.g. target SQL Server version or requirements for probes. This data might be accessed via automatic variables.
|
||||
|
||||
Automatic variables are grouped in namespaces.
|
||||
|
||||
- [attr::service::](./AttrService.md)
|
||||
- [attr::target::](./AttrTarget.md)
|
||||
@@ -22,6 +22,14 @@ The `implementation` property contains probe parameters and [data transformation
|
||||
|
||||
Probe parameters are specific for [probe type](#type).
|
||||
|
||||
### requires
|
||||
|
||||
Explicit functional [requirements](./ProbeRequirements/README.md) for this probe. SQL Assessment API checks if all the requirements are met. If not, the probe is not executed, all dependent checks are skipped, and a warning is returned.
|
||||
|
||||
### runFor
|
||||
|
||||
Explicit logical [requirements](./ProbeRequirements/README.md) for this probe. SQL Assessment API checks if all the requirements are met. If not, the probe implementation is not executed and an empty result set is returned immediately.
|
||||
|
||||
### target
|
||||
|
||||
Target object [pattern](TargetPattern.md).
|
||||
@@ -30,13 +38,13 @@ Target object [pattern](TargetPattern.md).
|
||||
|
||||
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](../Reference/Probes/AzGraphProbe.md)|Kusto query to Azure resource graph|
|
||||
|[AzMetadata](../Reference/Probes/AzMetadataProbe.md)|JSONPath for the object returned by Azure Instance Metadata Service|
|
||||
|[CMD](../Reference/Probes/CMDShellProbes.md)|Command shell script run on the target machine|
|
||||
|[External](../Reference//Probes/ExternalProbe.md)|Arbitrary .NET code|
|
||||
|[PowerShell](../Reference/Probes/PowerShellProbes.md)|PowerShell script|
|
||||
|[Registry](../Reference/Probes/RegistryProbes.md)|Data from registry|
|
||||
|[SQL](../Reference/Probes/TSQLProbes.md)|T-SQl query|
|
||||
|[WMI](../Reference/Probes/WMIProbes.md)|WMI query|
|
||||
| Type | Description |
|
||||
|-----------------------------------------------------|--------------------------|
|
||||
|[AzGraph](../Reference/Probes/AzGraphProbe.md) | Kusto query to Azure resource graph |
|
||||
|[AzMetadata](../Reference/Probes/AzMetadataProbe.md) | JSONPath for the object returned by Azure Instance Metadata Service |
|
||||
|[CMD](../Reference/Probes/CMDShellProbes.md) | Command shell script run on the target machine |
|
||||
|[External](../Reference/Probes/ExternalProbe.md) | Arbitrary .NET code |
|
||||
|[PowerShell](../Reference/Probes/PowerShellProbes.md)| PowerShell script |
|
||||
|[Registry](../Reference/Probes/RegistryProbes.md) | Data from registry |
|
||||
|[SQL](../Reference/Probes/TSQLProbes.md) | T-SQl query |
|
||||
|[WMI](../Reference/Probes/WMIProbes.md) | WMI query |
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# Feature requirement
|
||||
|
||||
Feature requirement lists SQL Server features.
|
||||
|
||||
## Name format
|
||||
|
||||
__feature__
|
||||
|
||||
## Supported values
|
||||
|
||||
__HADR__ - High Availability and Disaster Recovery ([Always On Availability Groups](https://learn.microsoft.com/sql/database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server)).
|
||||
|
||||
## Examples
|
||||
|
||||
```json
|
||||
"runFor": {
|
||||
"feature": [ "HADR" ]
|
||||
}
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Probe requirements](./README.md)
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
# Permission requirement
|
||||
|
||||
Permission requirements specify special permissions required by the probe. for more information see [sys.fn_my_permissions](https://learn.microsoft.com/sql/relational-databases/system-functions/sys-fn-my-permissions-transact-sql)
|
||||
|
||||
## Name format
|
||||
|
||||
*securable_class* __permission__ __\[__ __on__ *securable_name* __]__
|
||||
|
||||
*securable_class* is the name of the class of securable for which permissions are listed. *securable_class* is a sysname. Examples of *securable_class* are: DATABASE, OBJECT, REMOTE SERVICE BINDING, SERVER.
|
||||
|
||||
*securable_name* is the name of the securable. If the securable is the server or a database, this part should be omitted. *securable_name* is a sysname. *securable_name* can be a multipart name.
|
||||
|
||||
## Supported values
|
||||
|
||||
Allowed values depend on securable class. See [SQL Server Permissions](https://learn.microsoft.com/sql/relational-databases/security/permissions-database-engine) and [SQL Server Permissions Hierarchy](https://learn.microsoft.com/sql/relational-databases/security/permissions-hierarchy-database-engine).
|
||||
|
||||
## Examples
|
||||
|
||||
```json
|
||||
"requires": {
|
||||
"server permission": [
|
||||
"ALTER TRACE"
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
```json
|
||||
"requires": {
|
||||
"object permission on [msdb].[dbo].[sysalerts]": [
|
||||
"SELECT"
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
```json
|
||||
"requires": {
|
||||
"object permission on [msdb].[dbo].[sysjobs]": [
|
||||
"SELECT"
|
||||
],
|
||||
"object permission on [msdb].[dbo].[sysjobsteps]": [
|
||||
"SELECT"
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Probe requirements](./README.md)
|
||||
@@ -0,0 +1,100 @@
|
||||
# Probe requirements
|
||||
|
||||
Probe requirements help to deal with situations when a probe cannot get data due to insufficient permissions or configuration issues. SQL Assessment API can skip probes when their requirements were stated explicitly.
|
||||
|
||||
By default any error in probe terminates assessment process immediately with an error message. This leads to incomplete results because not all checks have been run. For example, the following probe will generate an error and terminate assessment if current user does not have _sysadmin_ role.
|
||||
|
||||
```json
|
||||
"DBMetaInfo": [
|
||||
{
|
||||
"type": "SQL",
|
||||
"target": { "type": "Database" },
|
||||
"implementation": {
|
||||
"query": "DBCC DBINFO(@TargetName) WITH TABLERESULTS,NO_INFOMSGS",
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
This requirement can be specified explicitly in the probe's __requires__ property. With this property SQL Assessment API will check if current user has _sysadmin_ role before running the query. If not, the query will not be run and all checks, that depend on this probe, will be skipped. The user will get a warning about this.
|
||||
|
||||
```json
|
||||
"DBMetaInfo": [
|
||||
{
|
||||
"type": "SQL",
|
||||
"target": { "type": "Database" },
|
||||
"implementation": {
|
||||
"query": "DBCC DBINFO(@TargetName) WITH TABLERESULTS,NO_INFOMSGS",
|
||||
},
|
||||
"requires": {
|
||||
"role": [ "sysadmin" ]
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
In some scenarios there is no need for the warning. Let's take a probe which detects database mirroring endpoints with the following T-SQL query.
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
[name] AS endpoint_name,
|
||||
is_encryption_enabled,
|
||||
encryption_algorithm,
|
||||
encryption_algorithm_desc
|
||||
FROM
|
||||
sys.database_mirroring_endpoints
|
||||
```
|
||||
|
||||
This probe makes little sense when High Availability abd Disaster Recovery (HADR) is disabled. We can add a requirement for this probe to skip it in these cases.
|
||||
|
||||
```json
|
||||
"AGEndpoints": [
|
||||
{
|
||||
"type": "SQL",
|
||||
"target": { "type": "Server" },
|
||||
"implementation": { "query": " … " },
|
||||
"requires": {
|
||||
"feature": [ "HADR" ]
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
With this implementation, the user will get a warning for each SQL Server instance not involved in HADR operations, which would be confusing. There is another probe propery named __runFor__ which specifies requirements in the same format as __requires__. The difference is the absence of the warning message. The probe does not run the query but return an empty set immediately.
|
||||
|
||||
```json
|
||||
"AGEndpoints": [
|
||||
{
|
||||
"type": "SQL",
|
||||
"target": { "type": "Server" },
|
||||
"implementation": { "query": " … " },
|
||||
"runFor": {
|
||||
"feature": [ "HADR" ]
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Each requirement is represented by a JSON property. The property name is the requirement name. The property value is a JSON array of strings representing required values. For example, the following probe requires _ALTER TABLE_ and _ADMINISTER BULK OPERATIONS_ server permissions.
|
||||
|
||||
```json
|
||||
"requires": {
|
||||
"server permission": [
|
||||
"ALTER TABLE",
|
||||
"ADMINISTER BULK OPERATIONS"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Requirement types
|
||||
|
||||
SQL Assessment API supports a variety of requirement types. The are documented below.
|
||||
|
||||
Each requirement type has specific name format. Fixed literal characters in the name format are __bold__. Variable parts of the name are _italic_. Optional parts are __\[__ enclosed in square brackets __\]__.
|
||||
|
||||
Supported requirement types:
|
||||
|
||||
- [role](./RoleRequirement.md)
|
||||
- [permission](./PermissionRequirement.md)
|
||||
- [feature](./FeatureRequirement.md)
|
||||
- [service](./ServiceRequirement.md)
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Role requirement
|
||||
|
||||
Specifies current user roles required for running this probe.
|
||||
|
||||
## Name format
|
||||
|
||||
__role__
|
||||
|
||||
## Supported values
|
||||
|
||||
SQL Server role names.
|
||||
|
||||
## Examples
|
||||
|
||||
```json
|
||||
"requires": {
|
||||
"role": [
|
||||
"bulkadmin",
|
||||
"diskadmin"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Probe requirements](./README.md)
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
# Service requirement
|
||||
|
||||
Lists SQL Server services required for the probe.
|
||||
|
||||
## Name format
|
||||
|
||||
__service__
|
||||
|
||||
## Supported values
|
||||
|
||||
**MSSQL** – SQL Server service
|
||||
|
||||
**SQLAgent** – [SQL Server Agent service](https://learn.microsoft.com/sql/ssms/agent)
|
||||
|
||||
**MSOLAP** – [SQL Server Analysis Services](https://learn.microsoft.com/analysis-services)
|
||||
|
||||
**ReportServer** – [SQL Server Reporting Services](https://learn.microsoft.com/sql/reporting-services)
|
||||
|
||||
**MsDtsServer** – [Integration Services](https://learn.microsoft.com/sql/integration-services)
|
||||
|
||||
**MSSQLFDLauncher** – [Full-Text Filter daemon host launcher service](https://learn.microsoft.com/sql/tools/configuration-manager/sql-full-text-filter-daemon-launcher-sql-server-configuration-manager)
|
||||
|
||||
**SQLBrowser** – [SQL Server Browser service](https://learn.microsoft.com/sql/tools/configuration-manager/sql-server-browser-service)
|
||||
|
||||
## Examples
|
||||
|
||||
```json
|
||||
"runFor": {
|
||||
"service": [ "ReportServer" ]
|
||||
}
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [attr::service:: variables](../AutomaticVariables/AttrService.md)
|
||||
- [Probe requirements](./README.md)
|
||||
|
||||
@@ -48,7 +48,7 @@ Hyperlink to an article that explains the best practice recommendations and reme
|
||||
|
||||
### level
|
||||
|
||||
__Allowed values:__ `Information`, `Low`, `Medium`, 'High'
|
||||
__Allowed values:__ `Information`, `Low`, `Medium`, `High`
|
||||
|
||||
The severity level of the issue detected by this check.
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
+2
-2
@@ -12,7 +12,7 @@
|
||||
"…": "…",
|
||||
"transform?": "<i>Data transform</i>"
|
||||
},
|
||||
"requires?": "<i>Characteristics</i>",
|
||||
"runFor?": "<i>Characteristics</i>"
|
||||
"requires?": "<i>Requirements</i>",
|
||||
"runFor?": "<i>Requirements</i>"
|
||||
}
|
||||
@endjson
|
||||
@@ -16,7 +16,7 @@
|
||||
"displayName?": "<i>Short descriptive name</i>",
|
||||
"description?": "<i>Long description</i>",
|
||||
"message?": "<i>Message template</i>",
|
||||
"level?": "<b>Information</b> | <b>Warning</b> | <b>Critical</b>",
|
||||
"level?": "<b>Information</b> | <b>Low</b> | <b>Medium</b> | <b>High</b>",
|
||||
"helpLink?": "<i>Hyperlink to an article</i>",
|
||||
"probes?": [
|
||||
"<i>Probe ref 1</i>",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
# Overview
|
||||
# AzGraph probe
|
||||
|
||||
**Type code:** *AzGraph*
|
||||
|
||||
@@ -9,9 +9,9 @@ This probe runs a Kusto query on Azure resource graph.
|
||||
|
||||
Implementation part of the probe definition contains the following parameters.
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|query|Required|String||Kusto query|
|
||||
| Parameter | Required | Type | Default | Description |
|
||||
|-----------|:--------:|:------:|:-------:|-------------|
|
||||
| query | Required | String | | Kusto query |
|
||||
|
||||
Use at-sign '@' to ember parameters into the query string.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
# Overview
|
||||
# AzMetadata probe
|
||||
|
||||
**Type code:** *AzMetadata*
|
||||
|
||||
@@ -11,6 +11,6 @@ When assessment is running remotely and Azure Graph is available, IMDS is emulat
|
||||
|
||||
Implementation part of the probe definition contains the following parameters.
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|query|Required|String|JSONPath to the data to retrieve|
|
||||
| Parameter | Required | Type | Default | Description |
|
||||
|-----------|:--------:|:------:|:-------:|----------------------------------|
|
||||
| query | Required | String | | JSONPath to the data to retrieve |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Overview
|
||||
# CMD shell probe
|
||||
|
||||
**Type code:** *CMD*
|
||||
|
||||
@@ -6,9 +6,9 @@ CmdShell probes execute CMD.EXE shell commands and return text lines in the `@st
|
||||
|
||||
## How to use
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|command|Required|String||Shell command to execute|
|
||||
| Parameter | Required | Type | Default | Description |
|
||||
|-----------|:--------:|:------:|:-------:|-------------------------|
|
||||
| command | Required | string | | Shell command to execute|
|
||||
|
||||
Each line returned by the command it returned as separate data row with a single `@stdout` column. Use the Regex parser transformation to extract data from the `@stdout` variable.
|
||||
|
||||
@@ -28,9 +28,9 @@ The following probe lists file system entries in the current directory:
|
||||
|
||||
Output:
|
||||
|
||||
|Row|@stdout|
|
||||
|-|-|
|
||||
|0|"03/18/2017 06:52 AM \<DIR\> UV"|
|
||||
|1|"03/18/2017 06:52 AM \<DIR\> UV-FOGRA"|
|
||||
|2|"03/16/2017 03:21 PM 6,419 x3dom.css"|
|
||||
|3|"03/16/2017 03:21 PM 926,910 x3dom.js"|
|
||||
| Row | @stdout |
|
||||
|-----|-----------------------------------------------------|
|
||||
| 0 | "03/18/2017 06:52 AM \<DIR\> UV" |
|
||||
| 1 | "03/18/2017 06:52 AM \<DIR\> UV-FOGRA" |
|
||||
| 2 | "03/16/2017 03:21 PM 6,419 x3dom.css" |
|
||||
| 3 | "03/16/2017 03:21 PM 926,910 x3dom.js" |
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
# Overview
|
||||
# External probe
|
||||
|
||||
**Type code:** *External*
|
||||
|
||||
@@ -9,20 +9,20 @@ External probe type allows running external code as probe. This probe can call a
|
||||
|
||||
Implementation part of the probe definition contains the following parameters.
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|class|Required|String||The name of the class implementing `IProbeImplementation`|
|
||||
|assembly|Optional|String|SQL Assessment API engine assembly|Path to an assembly file containing `class`. If not specified the engine will look for an internal class with the specified name.|
|
||||
| Parameter | Required | Type | Default | Description |
|
||||
|-----------|:--------:|:------:|:-------:|-----------------------------------|
|
||||
| class | Required | string | | The name of the class implementing `IProbeImplementation` |
|
||||
| assembly | Optional | string | SQL Assessment API engine assembly|Path to an assembly file containing `class`. If not specified the engine will look for an internal class with the specified name. |
|
||||
|
||||
### IProbeImplmenetation interface
|
||||
|
||||
The `IProbeImplementation` interface has the following properties. The engine sets their values so the probe implementation could have optional parameters and information about the assessed SQL Server instance or database.
|
||||
|
||||
|Property|Type|Description|
|
||||
|---|:-:|---|
|
||||
|ServerName|string|The name of the target server.|
|
||||
|TargetName|string|The name of the assessed instance or the database.|
|
||||
|Urn|string|A string identifier of the target object.|
|
||||
|Parameters|dictionary|A dictionary containing named parameters passed to the probe from the calling check.|
|
||||
| Property | Type | Description |
|
||||
|------------|:----------:|---------------------------------------------------|
|
||||
| ServerName | string | The name of the target server |
|
||||
| TargetName | string | The name of the assessed instance or the database |
|
||||
| Urn | string | A string identifier of the target object |
|
||||
| Parameters | dictionary | A dictionary containing named parameters passed to the probe from the calling check |
|
||||
|
||||
After setting all the `IProbeImplementation` properties the engine calls `GetDataAsync` method to retrieve all the data.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Overview
|
||||
# PowerShell probe
|
||||
|
||||
**Type code:** *PowerShell*
|
||||
|
||||
@@ -8,9 +8,9 @@ PowerShell probes execute commands in PowerShell (fx) on the target machine and
|
||||
|
||||
PowerShell probe implementation has the following parameters:
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|command|Required|string||PowerShell command to execute|
|
||||
| Parameter | Required | Type | Default | Description |
|
||||
|-----------|:--------:|:------:|:-------:|-------------------------------|
|
||||
| command | Required | string | | PowerShell command to execute |
|
||||
|
||||
Use the `$` (dollar) sign in the `command` text to access probe parameters passed by checks.
|
||||
|
||||
@@ -34,9 +34,9 @@ The following probe enumerates file system items in the current dirrectory:
|
||||
|
||||
Output:
|
||||
|
||||
|@Output|'@Output.FullName'|'@Output.Parent.Name'|
|
||||
|-|-|-|
|
||||
|"UV"|"C:\Windows\system32\UV"|"system32"|
|
||||
|"UV-FOGRA"|"C:\Windows\system32\UV-FOGRA"|"system32"|
|
||||
|"x3dom.css"|"C:\Windows\system32\x3dom.css"|"system32"|
|
||||
|"x3dom.js"|"C:\Windows\system32\x3dom.js"|"system32"|
|
||||
| @Output | @Output.FullName | @Output.Parent.Name |
|
||||
|-------------|---------------------------------|---------------------|
|
||||
| "UV" | "C:\Windows\system32\UV" | "system32" |
|
||||
| "UV-FOGRA" | "C:\Windows\system32\UV-FOGRA" | "system32" |
|
||||
| "x3dom.css" | "C:\Windows\system32\x3dom.css" | "system32" |
|
||||
| "x3dom.js" | "C:\Windows\system32\x3dom.js" | "system32" |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Overview
|
||||
# Registry probe
|
||||
|
||||
**Type code:** *Registry*
|
||||
|
||||
@@ -8,10 +8,10 @@ Registry probes obtain data from the target machine registry.
|
||||
|
||||
Registry probe implementation has the following parameters.
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|query|Required|Object||Tree-like structure specifying Registry keys and values to collect see [Registry query](#registry-query)|
|
||||
|instance|Optional|Bool|*false*|Indicates whether the probe should return data specific to this SQL Server instance see [Instance specific data](#instance-specific-data)|
|
||||
| Parameter | Required | Type | Default | Description |
|
||||
|-----------|:--------:|:------:|:-------:|-----------------------------------|
|
||||
| query | Required | object | | Tree-like structure specifying Registry keys and values to collect see [Registry query](#registry-query) |
|
||||
| instance | Optional | bool | *false* | Indicates whether the probe should return data specific to this SQL Server instance see [Instance specific data](#instance-specific-data) |
|
||||
|
||||
### Registry query
|
||||
|
||||
@@ -68,11 +68,11 @@ The following registry query returns 2 values for for system hardware. Please, n
|
||||
|
||||
Output:
|
||||
|
||||
|@Identifier|@SystemBiosVersion|
|
||||
|-|-|
|
||||
|"AT/AT COMPATIBLE"|"ALASKA - 1072009"|
|
||||
|"AT/AT COMPATIBLE"|"3802"|
|
||||
|"AT/AT COMPATIBLE"|"American Megatrends - 5000C"|
|
||||
| @Identifier | @SystemBiosVersion |
|
||||
|--------------------|-------------------------------|
|
||||
| "AT/AT COMPATIBLE" | "ALASKA - 1072009" |
|
||||
| "AT/AT COMPATIBLE" | "3802" |
|
||||
| "AT/AT COMPATIBLE" | "American Megatrends - 5000C" |
|
||||
|
||||
### Example 2
|
||||
|
||||
@@ -97,11 +97,11 @@ Use asterisk '*' to enumerate all subkeys of the given key. The following regist
|
||||
Output:
|
||||
|
||||
| @RegistryKeyName | @VendorIdentifier |
|
||||
|---|---|
|
||||
| 0 | "Genuine Intel" |
|
||||
| 1 | "Genuine Intel" |
|
||||
| 2 | "Genuine Intel" |
|
||||
| 3 | "Genuine Intel" |
|
||||
|------------------|-------------------|
|
||||
| 0 | "Genuine Intel" |
|
||||
| 1 | "Genuine Intel" |
|
||||
| 2 | "Genuine Intel" |
|
||||
| 3 | "Genuine Intel" |
|
||||
|
||||
### Example 3
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Overview
|
||||
# SQL probe
|
||||
|
||||
**Type code:** *SQL*
|
||||
|
||||
@@ -8,10 +8,11 @@ T-SQL probes are based on T-SQL queries used to retrieve data from the specified
|
||||
|
||||
Implementation part of the probe definition contains the following parameters.
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|query|Required|String||T-SQL query|
|
||||
|UseDatabase|Optional|Bool|*false*|Indicates whether `USE DATABASE` statement should be issued before running the query. use for probes targeted to databases.|
|
||||
| Parameter | Required | Type | Default | Description |
|
||||
|-------------|:--------:|:------:|:-------:|-----------------------------------|
|
||||
| query | Required | String | | T-SQL query |
|
||||
| UseDatabase | Optional | Bool | *false* | Indicates whether `USE DATABASE` statement should be issued before running the query. use for probes targeted to databases|
|
||||
| timeout | Optional | Number | 30 | Sets command execution timeout in seconds|
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Overview
|
||||
# WMI probe
|
||||
|
||||
**Type code:** *WMI*
|
||||
|
||||
@@ -10,10 +10,10 @@ A WMI query returns a number of WMI objects. Each object is processed as a separ
|
||||
|
||||
Implementation part has the following properties.
|
||||
|
||||
|Parameter|Required|Type|Default|Description|
|
||||
|---|:-:|:-:|:-:|---|
|
||||
|query|Required|String||WMI query returning probe data|
|
||||
|methods|Optional|Map||List of WMI methods to be called on selected WMI objects|
|
||||
|Parameter|Required|Type |Default|Description |
|
||||
|---------|:------:|:----:|:-----:|------------------------------|
|
||||
|query |Required|String| |WMI query returning probe data|
|
||||
|methods |Optional|Map | |List of WMI methods to be called on selected WMI objects|
|
||||
|
||||
### WMI methods
|
||||
|
||||
@@ -37,15 +37,15 @@ Simple WMI probe returns name and block size for volumes.
|
||||
|
||||
Output:
|
||||
|
||||
|@Output.Name|@Output.BlockSize|
|
||||
|-|-|
|
||||
|E:\\|4096|
|
||||
|C:\\|4096|
|
||||
|\\?\Volume{b9878a89-2e73-4790-8576-9c8217b2fba7}\\|4096|
|
||||
|M:\\|4096|
|
||||
|G:\\|4096|
|
||||
|R:\\|4096|
|
||||
|\\?\Volume{41c4c545-aad7-4a8c-86e5-11a52611a81d}\\|1024|
|
||||
| @Output.Name | @Output.BlockSize |
|
||||
|----------------------------------------------------|------------------:|
|
||||
| E:\\ | 4096 |
|
||||
| C:\\ | 4096 |
|
||||
| \\?\Volume{b9878a89-2e73-4790-8576-9c8217b2fba7}\\ | 4096 |
|
||||
| M:\\ | 4096 |
|
||||
| G:\\ | 4096 |
|
||||
| R:\\ | 4096 |
|
||||
| \\?\Volume{41c4c545-aad7-4a8c-86e5-11a52611a81d}\\ | 1024 |
|
||||
|
||||
### Example 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user