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
"This callback sends a POST-Request to an AlertManager API. It converts the information into a format which is readable by the AlertManager.",
@@ -54,14 +60,34 @@ public ConfigurationRequest getRequestedConfiguration() {
54
60
55
61
// Alert Name
56
62
ConfigurationFieldalertName = newTextField(
57
-
"alertmanager_alert_name",
63
+
CONFIGURATION_KEY_ALERT_NAME,
58
64
"AlertManager Alert Name",
59
65
"TestAlert",
60
66
"The name for the specific AlertManager alert (will be transmitted as 'alertname'-label).",
61
67
Optional.NOT_OPTIONAL
62
68
);
63
69
configurationRequest.addField(alertName);
64
70
71
+
// Custom labels
72
+
ConfigurationFieldcustomLabels = newTextField(
73
+
CONFIGURATION_KEY_CUSTOM_LABELS,
74
+
"Custom AlertManager labels",
75
+
"",
76
+
"The custom AlertManager label key-value-pairs separated by '" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "' to set for each alert. Please use the following notation: 'label1=value1" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "label2=value2'",
"The custom AlertManager annotation key-value-pairs separated by '" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "' to set for each alert. Please use the following notation: 'annotation1=value1" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "annotation2=value2'",
87
+
Optional.OPTIONAL
88
+
);
89
+
configurationRequest.addField(customAnnotations);
90
+
65
91
returnconfigurationRequest;
66
92
}
67
93
@@ -77,14 +103,34 @@ public Map<String, Object> getAttributes() {
assertEquals("The custom AlertManager label key-value-pairs separated by '" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "' to set for each alert. Please use the following notation: 'label1=value1" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "label2=value2'", field.getDescription());
assertEquals("The custom AlertManager annotation key-value-pairs separated by '" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "' to set for each alert. Please use the following notation: 'annotation1=value1" + CustomPropertiesTextFieldParser.KEY_VALUE_PAIR_SEPARATOR + "annotation2=value2'", field.getDescription());
0 commit comments