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-arc/kubernetes/monitor-gitops-flux-2.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ For example, in the **Flux Configuration Compliance Status** table, you can sele
71
71
72
72
After you've imported the dashboard as described in the previous section, you can set up alerts. These alerts notify you when Flux extensions or Flux configurations experience failures.
73
73
74
-
The steps below create an alert that detects a failure in extension provisioning or extension upgrade. The query below is one example that you can edit as needed. You can also create queries to detect failures in compliance state.
74
+
Follow the steps below to create an alert. Example queries are provided to detect extension provisioning or extension upgrade failures, or to detect compliance state failures.
75
75
76
76
1. In the left navigation menu of the dashboard, select **Alerting**.
77
77
1. Select **Alert rules**.
@@ -82,7 +82,7 @@ The steps below create an alert that detects a failure in extension provisioning
82
82
1. Select a data source. The same data source used for the dashboard may be used here.
83
83
1. For **Service**, select **Azure Resource Graph**.
84
84
1. Select the subscriptions from the dropdown list.
85
-
1. Enter this query:
85
+
1. Enter the query you want to use. For example, for extension provisioning or upgrade failures, you can enter this query:
86
86
87
87
```kusto
88
88
kubernetesconfigurationresources
@@ -92,10 +92,42 @@ The steps below create an alert that detects a failure in extension provisioning
92
92
| summarize count() by provisioningState
93
93
```
94
94
95
+
Or for compliance state failures, you can enter this query:
96
+
97
+
```kusto
98
+
kubernetesconfigurationresources
99
+
| where type == "microsoft.kubernetesconfiguration/fluxconfigurations"
1. For **Threshold box**, select **A** for input type and set the threshold to **0** to receive alerts even if just one extension fails on the cluster. Mark this as the **Alert condition**.
96
106
107
+
1. Specify the alert evaluation interval:
108
+
109
+
1. For **Condition**, select the query or expression to trigger the alert rule.
110
+
1. For **Evaluate every**, enter the evaluation frequency. The value must be a multiple of 10 seconds.
111
+
1. For **Evaluate for**, enter the duration for which the condition must be true before the alert is created.
112
+
1. In **Configure no data and error handling**, choose the desired behavior when the alert rule returns no data or returns an error.
113
+
1. To check the results from running the query, select **Preview**.
114
+
97
115
:::image type="content" source="media/monitor-gitops-flux2/application-dashboard-set-alerts.png" alt-text="Screenshot showing the alert creation process." lightbox="media/monitor-gitops-flux2/application-dashboard-set-alerts.png":::
98
116
117
+
1. Add the storage location, rule group, and any additional metadata that you want to associate with the rule.
118
+
119
+
1. For **Folder**, select the folder where the rule should be stored.
120
+
1. For **Group**, specify a pre-defined group.
121
+
1. Add a description and summary to customize alert messages.
122
+
1. Add Runbook URL, panel, dashboard, and alert IDs.
123
+
124
+
1. If desired, add any custom labels, and then select **Save**.
125
+
126
+
Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value .
127
+
Click Save to save the rule or Save and exit to save the rule and go back to the Alerting page.
128
+
129
+
Next, create a for the rule.
130
+
99
131
## Monitor resource consumption and reconciliations
100
132
101
133
Follow these steps to import dashboards that let you monitor Flux resource consumption, reconciliations, API requests, and reconciler status.
0 commit comments