The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/features/alerting/unified/utils/constants.ts

46 lines
1.5 KiB

export const RULER_NOT_SUPPORTED_MSG = 'ruler not supported';
export const RULE_LIST_POLL_INTERVAL_MS = 20000;
export const ALERTMANAGER_NAME_QUERY_KEY = 'alertmanager';
export const ALERTMANAGER_NAME_LOCAL_STORAGE_KEY = 'alerting-alertmanager';
export const SILENCES_POLL_INTERVAL_MS = 20000;
export const NOTIFICATIONS_POLL_INTERVAL_MS = 20000;
export const CONTACT_POINTS_STATE_INTERVAL_MS = 20000;
export const TIMESERIES = 'timeseries';
export const TABLE = 'table';
export const STAT = 'stat';
export enum Annotation {
description = 'description',
summary = 'summary',
runbookURL = 'runbook_url',
alertId = '__alertId__',
dashboardUID = '__dashboardUid__',
panelID = '__panelId__',
}
export const annotationLabels: Record<Annotation, string> = {
[Annotation.description]: 'Description',
[Annotation.summary]: 'Summary',
[Annotation.runbookURL]: 'Runbook URL',
[Annotation.dashboardUID]: 'Dashboard UID',
[Annotation.panelID]: 'Panel ID',
[Annotation.alertId]: 'Alert ID',
};
export const annotationDescriptions: Record<Annotation, string> = {
[Annotation.description]: 'Description of what the alert rule does.',
[Annotation.summary]: 'Short summary of what happened and why.',
[Annotation.runbookURL]: 'Webpage where you keep your runbook for the alert.',
[Annotation.dashboardUID]: '',
[Annotation.panelID]: '',
[Annotation.alertId]: '',
};
export const defaultAnnotations = [
{ key: Annotation.summary, value: '' },
{ key: Annotation.description, value: '' },
{ key: Annotation.runbookURL, value: '' },
];