| 1 | export interface InfluxDBAlert { |
| 2 | time: string | Date |
| 3 | check_name: string |
| 4 | sensor_type: string |
| 5 | severity: InfluxDBAlertSeverity |
| 6 | message: string |
| 7 | status: InfluxDBAlertStatus |
| 8 | check_id?: string |
| 9 | } |
| 10 | |
| 11 | export enum InfluxDBAlertSeverity { |
| 12 | Ok = "ok", |
| 13 | Info = "info", |
| 14 | Warning = "warning", |
| 15 | Critical = "critical" |
| 16 | } |
| 17 | |
| 18 | export enum InfluxDBAlertStatus { |
| 19 | Active = "active", |
| 20 | Cleared = "cleared" |
| 21 | } |
| 22 | |
| 23 | export interface InfluxDBAlertResponse { |
| 24 | success: boolean |
| 25 | message: string |
| 26 | alerts: InfluxDBAlert[] |
| 27 | total_count: number |
| 28 | filtered_count: number |
| 29 | active_alerts_count: number |
| 30 | cleared_alerts_count: number |
| 31 | } |
| 32 | |
| 33 | export interface InfluxDBAlertQueryParams { |
| 34 | days?: number |
| 35 | severity?: InfluxDBAlertSeverity[] |
| 36 | check_name?: string |
| 37 | sensor_type?: string |
| 38 | status?: "active" | "cleared" | "all" |
| 39 | latest_only?: boolean |
| 40 | exclude_ok?: boolean |
| 41 | } |
| 42 | |
| 43 | export interface InfluxDBCheckNamesResponse { |
| 44 | success: boolean |
| 45 | message: string |
| 46 | check_names: string[] |
| 47 | total_count: number |
| 48 | } |