Created
February 26, 2021 12:39
-
-
Save kylebrandt/e2ce8c936bd42aed6aa6200e28c1d949 to your computer and use it in GitHub Desktop.
Classic Condition in SSE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT http://admin:admin@localhost:3000/api/alert-definitions/HH7cv0yMk | |
Content-Type: application/json | |
{ | |
"id": 24, | |
"orgId": 1, | |
"title": "First CC Alert", | |
"condition": "B", | |
"data": [ | |
{ | |
"refId": "A", | |
"queryType": "", | |
"relativeTimeRange": { | |
"from": 60, | |
"to": 0 | |
}, | |
"model": { | |
"alias": "", | |
"csvWave": { | |
"timeStep": 60, | |
"valuesCSV": "0,0,2,2,1,1" | |
}, | |
"datasource": "gdev-testdata", | |
"datasourceUid": "000000004", | |
"hide": false, | |
"intervalMs": 1000, | |
"lines": 10, | |
"maxDataPoints": 100, | |
"points": [], | |
"pulseWave": { | |
"offCount": 3, | |
"offValue": 1, | |
"onCount": 3, | |
"onValue": 2, | |
"timeStep": 60 | |
}, | |
"refId": "A", | |
"scenarioId": "predictable_pulse", | |
"stream": { | |
"bands": 1, | |
"noise": 2.2, | |
"speed": 250, | |
"spread": 3.5, | |
"type": "signal" | |
}, | |
"stringInput": "" | |
} | |
}, | |
{ | |
"refId": "B", | |
"queryType": "", | |
"relativeTimeRange": { | |
"from": 0, | |
"to": 0 | |
}, | |
"model": { | |
"conditions": [ | |
{ | |
"evaluator": { | |
"params": [ | |
1 | |
], | |
"type": "gt" | |
}, | |
"operator": { | |
"type": "and" | |
}, | |
"query": { | |
"params": [ | |
"A" | |
] | |
}, | |
"reducer": { | |
"params": [], | |
"type": "avg" | |
}, | |
"type": "query" | |
} | |
], | |
"datasource": "__expr__", | |
"datasourceUid": "-100", | |
"hide": false, | |
"intervalMs": 1000, | |
"maxDataPoints": 100, | |
"refId": "B", | |
"type": "classic_conditions" | |
} | |
} | |
], | |
"updated": "2021-02-25T16:22:02.120470967-05:00", | |
"intervalSeconds": 60, | |
"version": 1, | |
"uid": "HH7cv0yMk", | |
"paused": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment