Documentation
¶
Index ¶
- func BuildAutocomplete(alerts []models.Alert) []models.Autocomplete
- func ColorLabel(colorStore models.LabelsColorMap, key string, val string)
- func DetectJIRAs(silence *models.Silence) (jiraID, jiraLink string)
- func ParseRules(rules []string)
- func StripLables(keptLabels, ignoredLabels []string, sourceLabels map[string]string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAutocomplete ¶
func BuildAutocomplete(alerts []models.Alert) []models.Autocomplete
BuildAutocomplete takes an alert object and generates list of autocomplete strings for it
func ColorLabel ¶
func ColorLabel(colorStore models.LabelsColorMap, key string, val string)
ColorLabel update UnseeColorMap object with a color object generated from label key and value passed here It's used to generate unique colors for configured labels
func DetectJIRAs ¶
DetectJIRAs will try to find JIRA links in Alertmanager silence objects using regexp rules from configuration that were parsed and populated by ParseRules call
func ParseRules ¶
func ParseRules(rules []string)
ParseRules will parse and validate list of JIRA detection rules provided from config, valid rules will be stored for future use in DetectJIRAs() calls
func StripLables ¶
func StripLables(keptLabels, ignoredLabels []string, sourceLabels map[string]string) map[string]string
StripLables allows filtering out some labels from alerts it takes the list of label keys to ignore and alert label map it will return label map without labels found on the ignore list
Types ¶
This section is empty.