You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/containers/container-insights-syslog.md
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ Container Insights offers the ability to collect Syslog events from Linux nodes
25
25
26
26
Use the following command in Azure CLI to enable syslog collection when you create a new AKS cluster.
27
27
28
+
### Using Azure CLI commands
29
+
28
30
```azurecli
29
31
az aks create -g syslog-rg -n new-cluster --enable-managed-identity --node-count 1 --enable-addons monitoring --enable-msi-auth-for-monitoring --enable-syslog --generate-ssh-key
30
32
```
@@ -35,6 +37,56 @@ Use the following command in Azure CLI to enable syslog collection on an existin
35
37
az aks enable-addons -a monitoring --enable-msi-auth-for-monitoring --enable-syslog -g syslog-rg -n existing-cluster
36
38
```
37
39
40
+
### Using ARM templates
41
+
42
+
You can also use ARM templates for enabling syslog collection
43
+
44
+
1. Download the template in the [GitHub content file](https://aka.ms/aks-enable-monitoring-msi-onboarding-template-file) and save it as **existingClusterOnboarding.json**.
45
+
46
+
1. Download the parameter file in the [GitHub content file](https://aka.ms/aks-enable-monitoring-msi-onboarding-template-parameter-file) and save it as **existingClusterParam.json**.
47
+
48
+
1. Edit the values in the parameter file:
49
+
50
+
-`aksResourceId`: Use the values on the **AKS Overview** page for the AKS cluster.
51
+
-`aksResourceLocation`: Use the values on the **AKS Overview** page for the AKS cluster.
52
+
-`workspaceResourceId`: Use the resource ID of your Log Analytics workspace.
53
+
-`resourceTagValues`: Match the existing tag values specified for the existing Container insights extension data collection rule (DCR) of the cluster and the name of the DCR. The name will be *MSCI-\<clusterName\>-\<clusterRegion\>* and this resource created in an AKS clusters resource group. If this is the first time onboarding, you can set the arbitrary tag values.
54
+
-`enableSyslog`: Set to true
55
+
-`syslogLevels`: Array of syslog levels to collect. Default collects all levels.
56
+
-`syslogFacilities`: Array of syslog facilities to collect. Default collects all facilities
57
+
58
+
> [!NOTE]
59
+
> Syslog level and facilities customization is currently only available via ARM templates.
60
+
61
+
### Deploy the template
62
+
63
+
Deploy the template with the parameter file by using any valid method for deploying Resource Manager templates. For examples of different methods, see [Deploy the sample templates](../resource-manager-samples.md#deploy-the-sample-templates).
The configuration change can take a few minutes to complete. When it's finished, a message similar to the following example includes this result:
72
+
73
+
```output
74
+
provisioningState : Succeeded
75
+
```
76
+
77
+
#### Deploy with Azure CLI
78
+
79
+
```azurecli
80
+
az login
81
+
az account set --subscription "Subscription Name"
82
+
az deployment group create --resource-group <ResourceGroupName> --template-file ./existingClusterOnboarding.json --parameters @./existingClusterParam.json
83
+
```
84
+
85
+
The configuration change can take a few minutes to complete. When it's finished, a message similar to the following example includes this result:
86
+
87
+
```output
88
+
provisioningState : Succeeded
89
+
```
38
90
39
91
## How to access Syslog data
40
92
@@ -85,4 +137,3 @@ Select the minimum log level for each facility that you want to collect.
85
137
86
138
- Read more about [Syslog record properties](/azure/azure-monitor/reference/tables/syslog)
0 commit comments