influxdb/pkger/testdata/checks.json

100 lines
2.4 KiB
JSON

[
{
"apiVersion": "influxdata.com/v2alpha1",
"kind": "Label",
"metadata": {
"name": "label-1"
}
},
{
"apiVersion": "influxdata.com/v2alpha1",
"kind": "CheckThreshold",
"metadata": {
"name": "check-0"
},
"spec": {
"description": "desc_0",
"every": "1m",
"offset": "15s",
"query": "from(bucket: \"rucket_1\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"cpu\")\n |> filter(fn: (r) => r._field == \"usage_idle\")\n |> aggregateWindow(every: 1m, fn: mean)\n |> yield(name: \"mean\")",
"status": "inactive",
"statusMessageTemplate": "Check: ${ r._check_name } is: ${ r._level }",
"tags": [
{
"key": "tag_1",
"value": "val_1"
},
{
"key": "tag_2",
"value": "val_2"
}
],
"thresholds": [
{
"type": "greater",
"level": "CRIT",
"value": 50.0,
"allValues": true
},
{
"type": "lesser",
"level": "warn",
"value": 49.9
},
{
"type": "inside_range",
"level": "INfO",
"min": 30.0,
"max": 45.0
},
{
"type": "outside_range",
"level": "ok",
"min": 30.0,
"max": 35.0
}
],
"associations": [
{
"kind": "Label",
"name": "label-1"
}
]
}
},
{
"apiVersion": "influxdata.com/v2alpha1",
"kind": "CheckDeadman",
"metadata": {
"name": "check-1"
},
"spec": {
"name": "display name",
"description": "desc_1",
"every": "5m",
"offset": "10s",
"query": "from(bucket: \"rucket_1\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"cpu\")\n |> filter(fn: (r) => r._field == \"usage_idle\")\n |> aggregateWindow(every: 1m, fn: mean)\n |> yield(name: \"mean\")",
"reportZero": true,
"staleTime": "10m",
"statusMessageTemplate": "Check: ${ r._check_name } is: ${ r._level }",
"tags": [
{
"key": "tag_1",
"value": "val_1"
},
{
"key": "tag_2",
"value": "val_2"
}
],
"timeSince": "90s",
"associations": [
{
"kind": "Label",
"name": "label-1"
}
]
}
}
]