1 export class PrometheusAlertLabels {
13 class CommonAlertmanagerAlert {
14 labels: PrometheusAlertLabels;
15 annotations: Annotations;
16 startsAt: string; // Date string
17 endsAt: string; // Date string
21 class PrometheusAlert {
22 labels: PrometheusAlertLabels;
23 annotations: Annotations;
24 state: 'pending' | 'firing';
25 activeAt: string; // Date string
29 export interface PrometheusRuleGroup {
32 rules: PrometheusRule[];
35 export class PrometheusRule {
36 name: string; // => PrometheusAlertLabels.alertname
40 severity: string; // => PrometheusAlertLabels.severity
42 annotations: Annotations;
43 alerts: PrometheusAlert[]; // Shows only active alerts
46 group?: string; // Added field for flattened list
49 export class AlertmanagerAlert extends CommonAlertmanagerAlert {
51 state: 'unprocessed' | 'active' | 'suppressed';
52 silencedBy: null | string[];
53 inhibitedBy: null | string[];
59 export class AlertmanagerNotificationAlert extends CommonAlertmanagerAlert {
60 status: 'firing' | 'resolved';
63 export class AlertmanagerNotification {
64 status: 'firing' | 'resolved';
66 commonAnnotations: object;
70 alerts: AlertmanagerNotificationAlert[];
79 export class PrometheusCustomAlert {
80 status: 'resolved' | 'unprocessed' | 'active' | 'suppressed';
84 fingerprint?: string | boolean;