Grafana version 4.4.1 (commit: 6a9f8ca)
datasource: influxdb_1.2.4
os: Ubuntu 16.04.2 LTS
I’m trying to set up Alert notifications for disk usage
I specify a threshold and and I receive an error:
“error tsdb.HandleRequest() error time: invalid duration $inter”
what am I doing wrong?
panel Json:
{
“alert”: {
“conditions”: [
{
“evaluator”: {
“params”: [
92063492063
],
“type”: “gt”
},
“operator”: {
“type”: “and”
},
“query”: {
“params”: [
“B”,
“5m”,
“now”
]
},
“reducer”: {
“params”: [],
“type”: “avg”
},
“type”: “query”
}
],
“executionErrorState”: “alerting”,
“frequency”: “60s”,
“handler”: 1,
“name”: “Disk usage for $mountpoint alert”,
“noDataState”: “no_data”,
“notifications”: []
},
“aliasColors”: {},
“bars”: false,
“dashLength”: 10,
“dashes”: false,
“datasource”: “influxsource”,
“editable”: true,
“error”: false,
“fill”: 1,
“grid”: {},
“id”: 52240,
“interval”: “$inter”,
“legend”: {
“alignAsTable”: true,
“avg”: true,
“current”: true,
“max”: true,
“min”: false,
“show”: true,
“sort”: “current”,
“sortDesc”: true,
“total”: false,
“values”: true
},
“lines”: true,
“linewidth”: 1,
“links”: [],
“minSpan”: 6,
“nullPointMode”: “connected”,
“percentage”: false,
“pointradius”: 5,
“points”: false,
“renderer”: “flot”,
“repeat”: null,
“seriesOverrides”: [
{
“alias”: “/total/”,
“color”: “#BF1B00 ”,
“fill”: 0,
“linewidth”: 2,
“zindex”: 3
}
],
“spaceLength”: 10,
“span”: 6,
“stack”: false,
“steppedLine”: true,
“targets”: [
{
“alias”: “$tag_host: mountpoint $tag_path - $col”,
“dsType”: “influxdb”,
“function”: “mean”,
“groupBy”: [
{
“interval”: “auto”,
“params”: [
“auto”
],
“type”: “time”
},
{
“key”: “host”,
“params”: [
“tag”
],
“type”: “tag”
},
{
“key”: “path”,
“params”: [
“tag”
],
“type”: “tag”
}
],
“measurement”: “disk_total”,
“orderByTime”: “ASC”,
“policy”: “default”,
“query”: “SELECT mean(total) AS “total”, mean(used) as “used” FROM “disk” WHERE “host” =~ /$server$/ AND “path” =~ /^$mountpoint$/AND $timeFilter GROUP BY time($interval), “host”, “path””,
“rawQuery”: true,
“refId”: “B”,
“resultFormat”: “time_series”,
“select”: [
[
{
“params”: [
“value”
],
“type”: “field”
},
{
“params”: [],
“type”: “mean”
}
]
],
“tags”: []
}
],
“thresholds”: [
{
“colorMode”: “critical”,
“fill”: true,
“line”: true,
“op”: “gt”,
“value”: 92063492063
}
],
“timeFrom”: null,
“timeShift”: null,
“title”: “Disk usage for $mountpoint”,
“tooltip”: {
“msResolution”: false,
“shared”: true,
“sort”: 0,
“value_type”: “cumulative”
},
“type”: “graph”,
“xaxis”: {
“buckets”: null,
“mode”: “time”,
“name”: null,
“show”: true,
“values”: []
},
“yaxes”: [
{
“format”: “bytes”,
“logBase”: 1,
“max”: null,
“min”: 0,
“show”: true
},
{
“format”: “short”,
“logBase”: 1,
“max”: null,
“min”: null,
“show”: true
}
],
“scopedVars”: {
“mountpoint”: {
“text”: “/”,
“value”: “/”,
“selected”: false
}
}
}
template variables are not supported in alerting queries
n3ph
September 28, 2017, 1:45am
3
Is this somehow planned?
Would be nice to define alerts in telegraf dashboards…
Best regards