|
|
@ -4,6 +4,14 @@ import { ANOMALIES_PATH } from '../config' |
|
|
|
import * as fs from 'fs' |
|
|
|
import * as fs from 'fs' |
|
|
|
import * as crypto from 'crypto'; |
|
|
|
import * as crypto from 'crypto'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type Datasource = { |
|
|
|
|
|
|
|
method: string, |
|
|
|
|
|
|
|
data: Object, |
|
|
|
|
|
|
|
params: Object, |
|
|
|
|
|
|
|
type: string, |
|
|
|
|
|
|
|
url: string |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export type Metric = { |
|
|
|
export type Metric = { |
|
|
|
datasource: string, |
|
|
|
datasource: string, |
|
|
|
targets: string[] |
|
|
|
targets: string[] |
|
|
@ -15,6 +23,7 @@ export type Anomaly = { |
|
|
|
panelUrl: string, |
|
|
|
panelUrl: string, |
|
|
|
|
|
|
|
|
|
|
|
metric: Metric, |
|
|
|
metric: Metric, |
|
|
|
|
|
|
|
datasource: Datasource |
|
|
|
status: string, |
|
|
|
status: string, |
|
|
|
|
|
|
|
|
|
|
|
last_prediction_time: number, |
|
|
|
last_prediction_time: number, |
|
|
|