1 export class PrometheusAlertLabels {
12 class CommonAlertmanagerAlert {
13 labels: PrometheusAlertLabels;
14 annotations: Annotations;
15 startsAt: string; // Date string
16 endsAt: string; // Date string
20 class PrometheusAlert {
21 labels: PrometheusAlertLabels;
22 annotations: Annotations;
23 state: 'pending' | 'firing';
24 activeAt: string; // Date string
28 export interface PrometheusRuleGroup {
31 rules: PrometheusRule[];
34 export class PrometheusRule {
35 name: string; // => PrometheusAlertLabels.alertname
39 severity: string; // => PrometheusAlertLabels.severity
41 annotations: Annotations;
42 alerts: PrometheusAlert[]; // Shows only active alerts
45 group?: string; // Added field for flattened list
48 export class AlertmanagerAlert extends CommonAlertmanagerAlert {
50 state: 'unprocessed' | 'active' | 'suppressed';
51 silencedBy: null | string[];
52 inhibitedBy: null | string[];
58 export class AlertmanagerNotificationAlert extends CommonAlertmanagerAlert {
59 status: 'firing' | 'resolved';
62 export class AlertmanagerNotification {
63 status: 'firing' | 'resolved';
65 commonAnnotations: object;
69 alerts: AlertmanagerNotificationAlert[];
78 export class PrometheusCustomAlert {
79 status: 'resolved' | 'unprocessed' | 'active' | 'suppressed';
83 fingerprint?: string | boolean;