Skip to content

Commit

Permalink
refactor(alerts): Added configuration to ui Read.me
Browse files Browse the repository at this point in the history
  • Loading branch information
TilmanHaupt committed Sep 4, 2024
1 parent c47dfa1 commit 98ce6a0
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 17 deletions.
30 changes: 13 additions & 17 deletions alerts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,29 @@ This plugin extension contains [Prometheus Alertmanager](https://github.com/prom

### alerts supernova parameters


`theme`: Override the default theme. Possible values are `"theme-light"` or `"theme-dark"` (default)

`theme`: Override the default theme. Possible values are `"theme-light"` or `"theme-dark"` (default)

`endpoint`: Alertmanager API Endpoint URL `/api/v2`. Should be one of `alerts.alertmanager.ingress.hosts`


`silenceExcludedLabels`: SilenceExcludedLabels are labels that are initially excluded by default when creating a silence. However, they can be added if necessary when utilizing the advanced options in the silence form.The labels must be an array of strings. Example: `["pod", "pod_name", "instance"]`

`filterLabels`: FilterLabels are the labels shown in the filter dropdown, enabling users to filter alerts based on specific criteria. The 'Status' label serves as a default filter, automatically computed from the alert status attribute and will be not overwritten. The labels must be an array of strings. Example: `["app", "cluster", "cluster_type"]`

`filterLabels`: FilterLabels are the labels shown in the filter dropdown, enabling users to filter alerts based on specific criteria. The 'Status' label serves as a default filter, automatically computed from the alert status attribute and will be not overwritten. The labels must be an array of strings. Example: `["app", "cluster", "cluster_type"]`

`predefinedFilters`: PredefinedFilters are filters applied through in the UI to differentiate between contexts through matching alerts with regular expressions. They are loaded by default when the application is loaded. The format is a list of objects including name, displayname and matchers (containing keys corresponding value). Example:

`predefinedFilters`: PredefinedFilters are filters applied through in the UI to differentiate between contexts through matching alerts with regular expressions. They are loaded by default when the application is loaded. The format is a list of objects including name, displayname and matchers (containing keys corresponding value). Example:
```json
[{
"name": "prod",
"displayName": "Productive System",
"matchers": {
"region": "^prod-.*"
[
{
"name": "prod",
"displayName": "Productive System",
"matchers": {
"region": "^prod-.*"
}
}
}]
```
]
```

`silenceTemplates`: SilenceTemplates are used in the Modal (schedule silence) to allow pre-defined silences to be used to scheduled maintenance windows. The format consists of a list of objects including description, editable_labels (array of strings specifying the labels that users can modify), fixed_labels (map containing fixed labels and their corresponding values), status, and title. Example:
`silenceTemplates`: SilenceTemplates are used in the Modal (schedule silence) to allow pre-defined silences to be used to scheduled maintenance windows. The format consists of a list of objects including description, editable_labels (array of strings specifying the labels that users can modify), fixed_labels (map containing fixed labels and their corresponding values), status, and title. Example:

```json
"silenceTemplates": [
Expand All @@ -76,8 +74,6 @@ This plugin extension contains [Prometheus Alertmanager](https://github.com/prom
]
```



### Managing Alertmanager configuration

ref:
Expand Down
62 changes: 62 additions & 0 deletions alerts/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,65 @@ If the end user wishes to include any excluded labels as matchers, they can easi
To set the excluded alert labels:

1. Utilize the app prop `silenceExcludedLabels`, which is used during the setup of the script tag.

### Theme

Override the default `theme`. Possible values are `"theme-light"` or `"theme-dark"` (default)

To set the theme:

1. Utilize the app prop `theme`, which is used during the setup of the script tag.

### Endpoint

`endpoint` sets the Alertmanager API Endpoint URL `/api/v2`. Should be one of `alerts.alertmanager.ingress.hosts`

To set the endpoint:

1. Utilize the app prop `endpoint`, which is used during the setup of the script tag.

### Predefined Filters

`predefinedFilters` are filters applied through in the UI to differentiate between contexts through matching alerts with regular expressions. They are loaded by default when the application is loaded. The format is a list of objects including name, displayname and matchers (containing keys corresponding value).

Example:

```json
[
{
"name": "prod",
"displayName": "Productive System",
"matchers": {
"region": "^prod-.*"
}
}
]
```

To set the predefined Filter:

1. Utilize the app prop `predefinedFilters`, which is used during the setup of the script tag.

### Silence Templates

`silenceTemplates`: SilenceTemplates are used in the Modal (schedule silence) to allow pre-defined silences to be used to scheduled maintenance windows. The format consists of a list of objects including description, editable_labels (array of strings specifying the labels that users can modify), fixed_labels (map containing fixed labels and their corresponding values), status, and title.

Example:

```json
"silenceTemplates": [
{
"description": "Description of the silence template",
"editable_labels": ["region"],
"fixed_labels": {
"name": "Marvin",
},
"status": "active",
"title": "Silence"
}
]
```

To set the silence templates:

1. Utilize the app prop `silenceTemplates`, which is used during the setup of the script tag.

0 comments on commit 98ce6a0

Please sign in to comment.