az monitor data-collection rule syslog
Note
This reference is part of the monitor-control-service extension for the Azure CLI (version 2.61.0 or higher). The extension will automatically install the first time you run an az monitor data-collection rule syslog command. Learn more about extensions.
Manage Syslog data source.
Commands
Name | Description | Type | Status |
---|---|---|---|
az monitor data-collection rule syslog add |
Add a Syslog data source. |
Extension | GA |
az monitor data-collection rule syslog delete |
Delete a Syslog data source. |
Extension | GA |
az monitor data-collection rule syslog list |
List Syslog data sources. |
Extension | GA |
az monitor data-collection rule syslog show |
Show a Syslog data source. |
Extension | GA |
az monitor data-collection rule syslog update |
Update a Syslog data source. |
Extension | GA |
az monitor data-collection rule syslog add
Add a Syslog data source.
az monitor data-collection rule syslog add --data-collection-rule-name
--name
--resource-group
[--facility-names]
[--log-levels]
[--streams]
[--transform-kql]
Examples
Add a Syslog data source
az monitor data-collection rule syslog add --rule-name myCollectionRule --resource-group myResourceGroup --name syslogBase --facility-names syslog --log-levels Alert Critical --streams Microsoft-Syslog
Required Parameters
The name of the data collection rule. The name is case insensitive.
A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The list of facility names. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The log levels to collect. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The KQL query to transform the data source.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor data-collection rule syslog delete
Delete a Syslog data source.
az monitor data-collection rule syslog delete --data-collection-rule-name
--name
--resource-group
Examples
Delete a Syslog data source
az monitor data-collection rule syslog delete --rule-name myCollectionRule --resource-group myResourceGroup --name syslogBase
Required Parameters
The name of the data collection rule. The name is case insensitive.
A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor data-collection rule syslog list
List Syslog data sources.
az monitor data-collection rule syslog list --data-collection-rule-name
--resource-group
Examples
List Syslog data sources
az monitor data-collection rule syslog list --rule-name myCollectionRule --resource-group myResourceGroup
Required Parameters
The name of the data collection rule. The name is case insensitive.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor data-collection rule syslog show
Show a Syslog data source.
az monitor data-collection rule syslog show --data-collection-rule-name
--name
--resource-group
Examples
Show a Syslog data source
az monitor data-collection rule syslog show --rule-name myCollectionRule --resource-group myResourceGroup --name syslogBase
Required Parameters
The name of the data collection rule. The name is case insensitive.
A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az monitor data-collection rule syslog update
Update a Syslog data source.
az monitor data-collection rule syslog update --data-collection-rule-name
--name
--resource-group
[--add]
[--facility-names]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--log-levels]
[--remove]
[--set]
[--streams]
[--transform-kql]
Examples
Update a Syslog data source
az monitor data-collection rule syslog update --rule-name myCollectionRule --resource-group myResourceGroup --name syslogBase --facility-names syslog --log-levels Emergency Critical
Required Parameters
The name of the data collection rule. The name is case insensitive.
A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
The list of facility names. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
The log levels to collect. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The KQL query to transform the data source.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI