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: README.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,16 +153,21 @@ Examples:
153
153
| total=2 firing=1 pending=0 inactive=1
154
154
155
155
Flags:
156
-
--exclude-alert stringArray Alerts to ignore. Can be used multiple times and supports regex.
157
-
-h, --help help for alert
158
-
-n, --name strings The name of one or more specific alerts to check.
159
-
This parameter can be repeated e.G.: '--name alert1 --name alert2'
160
-
If no name is given, all alerts will be evaluated
161
-
-g, --group strings The name of one or more specific groups to check.
162
-
This parameter can be repeated e.G.: '--group group1 --group group2'
163
-
If no group is given, all groups will be scanned for alerts
164
-
-T, --no-alerts-state string State to assign when no alerts are found (0, 1, 2, 3, OK, WARNING, CRITICAL, UNKNOWN). If not set this defaults to OK (default "OK")
165
-
-P, --problems Display only alerts which status is not inactive/OK. Note that in combination with the --name flag this might result in no alerts being displayed
156
+
--exclude-alert stringArray Alerts to ignore. Can be used multiple times and supports regex.
157
+
--exclude-label stringArray The label of one or more specific alerts to exclude.
158
+
This parameter can be repeated e.g.: '--exclude-label prio=high --exclude-label another=example'
159
+
-g, --group strings The name of one or more specific groups to check for alerts.
160
+
This parameter can be repeated e.g.: '--group group1 --group group2'
161
+
If no group is given, all groups will be scanned for alerts
162
+
-h, --help help for alert
163
+
--include-label stringArray The label of one or more specific alerts to include.
164
+
This parameter can be repeated e.g.: '--include-label prio=high --include-label another=example'
165
+
Note that repeated --include-label are combined using a union.
166
+
-n, --name strings The name of one or more specific alerts to check.
167
+
This parameter can be repeated e.g.: '--name alert1 --name alert2'
168
+
If no name is given, all alerts will be evaluated
169
+
-T, --no-alerts-state string State to assign when no alerts are found (0, 1, 2, 3, OK, WARNING, CRITICAL, UNKNOWN). If not set this defaults to OK (default "OK")
170
+
-P, --problems Display only alerts which status is not inactive/OK. Note that in combination with the --name flag this might result in no alerts being displayed
// If the alert labels matches here we can skip it.
142
+
continue
143
+
}
144
+
129
145
// Handle Inactive Alerts
130
146
iflen(rl.AlertingRule.Alerts) ==0 {
131
147
// Counting states for perfdata
@@ -208,18 +224,28 @@ func init() {
208
224
209
225
fs.StringVarP(&cliAlertConfig.NoAlertsState, "no-alerts-state", "T", "OK", "State to assign when no alerts are found (0, 1, 2, 3, OK, WARNING, CRITICAL, UNKNOWN). If not set this defaults to OK")
210
226
211
-
fs.StringArrayVar(&cliAlertConfig.ExcludeAlerts, "exclude-alert", []string{}, "Alerts to ignore. Can be used multiple times and supports regex.")
0 commit comments