diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4344adef4cc..473c64b1cdd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -462,6 +462,7 @@ cypress.config.js @grafana/grafana-frontend-platform /public/app/routes/ @grafana/grafana-frontend-platform /public/app/store/ @grafana/grafana-frontend-platform /public/app/types/ @grafana/grafana-frontend-platform +/public/app/types/alerting.ts @grafana/alerting-frontend /public/dashboards/ @grafana/dashboards-squad /public/fonts/ @grafana/alerting-frontend /public/gazetteer/ @ryantxu diff --git a/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md b/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md index 1ac14176feb..00ac068d50d 100644 --- a/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md +++ b/docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md @@ -355,6 +355,8 @@ settings: retry: '30' # expire: '120' + # the number of seconds before a message expires and is deleted automatically. Examples: 10s, 5m30s, 8h. + ttl: # sound: siren # diff --git a/docs/sources/old-alerting/notifications.md b/docs/sources/old-alerting/notifications.md index c450f8cbdb0..1439ecad37e 100644 --- a/docs/sources/old-alerting/notifications.md +++ b/docs/sources/old-alerting/notifications.md @@ -183,6 +183,7 @@ To set up Pushover, you must provide a user key and an API token. Refer to [What | OK priority | The priority OK notifications are sent; if not set, then OK notifications are sent with the priority set for alerting notifications | | Retry | How often (in seconds) the Pushover servers send the same notification to the user. (minimum 30 seconds) | | Expire | How many seconds your notification will continue to be retried for (maximum 86400 seconds) | +| TTL | The number of seconds before a message expires and is deleted automatically. Examples: 10s, 5m30s, 8h. | | Alerting sound | The sound for alerting notifications | | OK sound | The sound for OK notifications | diff --git a/public/app/features/alerting/unified/utils/cloud-alertmanager-notifier-types.ts b/public/app/features/alerting/unified/utils/cloud-alertmanager-notifier-types.ts index df76463fb5a..494e9ef231c 100644 --- a/public/app/features/alerting/unified/utils/cloud-alertmanager-notifier-types.ts +++ b/public/app/features/alerting/unified/utils/cloud-alertmanager-notifier-types.ts @@ -175,6 +175,16 @@ export const cloudNotifierTypes: Array> = [ placeholder: '1h', } ), + option( + 'ttl', + 'TTL', + 'The number of seconds before a message expires and is deleted automatically. Examples: 10s, 5m30s, 8h.', + { + // allow 30s, 4m30s, etc + validationRule: '^(\\d+[s|m|h])+$|^$', + element: 'input', + } + ), httpConfigOption, ], },