"rawSql":"SELECT \n $__unixEpochGroupAlias(timeInt32, '$summarize'), \n measurement as metric, \n avg(valueOne) as valueOne,\n avg(valueTwo) as valueTwo\nFROM\n metric_values \nWHERE\n $__unixEpochFilter(timeInt32) AND\n ($metric = 'ALL' OR measurement = $metric)\nGROUP BY \n $__unixEpochGroup(timeInt32, '$summarize'), \n measurement \nORDER BY 1",
"refId":"A"
}
],
"thresholds":[],
"timeFrom":null,
"timeShift":null,
"title":"Multiple series with metric column using unixEpochGroup macro ($summarize)",
"tooltip":{
"shared":true,
"sort":0,
"value_type":"individual"
},
"type":"graph",
"xaxis":{
"buckets":null,
"mode":"time",
"name":null,
"show":true,
"values":[]
},
"yaxes":[
{
"format":"short",
"label":null,
"logBase":1,
"max":null,
"min":"0",
"show":true
},
{
"format":"short",
"label":null,
"logBase":1,
"max":null,
"min":null,
"show":true
}
],
"yaxis":{
"align":false,
"alignLevel":null
}
},
{
"aliasColors":{},
"bars":false,
"dashLength":10,
"dashes":false,
"datasource":"gdev-mssql-ds-tests",
"fill":2,
"gridPos":{
"h":8,
"w":12,
"x":12,
"y":27
},
"id":39,
"legend":{
"alignAsTable":true,
"avg":true,
"current":true,
"max":true,
"min":true,
"rightSide":true,
"show":true,
"total":true,
"values":true
},
"lines":true,
"linewidth":2,
"links":[],
"nullPointMode":"null",
"percentage":false,
"pointradius":3,
"points":false,
"renderer":"flot",
"seriesOverrides":[
{
"alias":"MovingAverageValueOne",
"dashes":true,
"lines":false
},
{
"alias":"MovingAverageValueTwo",
"dashes":true,
"lines":false,
"yaxis":1
}
],
"spaceLength":10,
"stack":false,
"steppedLine":false,
"targets":[
{
"alias":"",
"format":"time_series",
"rawSql":"SELECT \n $__unixEpochGroupAlias(timeInt32, '$summarize'), \n avg(valueOne) as valueOne,\n avg(valueTwo) as valueTwo\nFROM\n metric_values \nWHERE\n $__unixEpochFilter(timeInt32) AND\n ($metric = 'ALL' OR measurement = $metric)\nGROUP BY \n $__unixEpochGroup(timeInt32, '$summarize')\nORDER BY 1",
"refId":"A"
},
{
"alias":"",
"format":"time_series",
"rawSql":"SELECT \n time,\n avg(valueOne) OVER (ORDER BY time ROWS BETWEEN 6 PRECEDING AND 6 FOLLOWING) as MovingAverageValueOne,\n avg(valueTwo) OVER (ORDER BY time ROWS BETWEEN 6 PRECEDING AND 6 FOLLOWING) as MovingAverageValueTwo\nFROM\n metric_values \nWHERE \n $__timeFilter(time) AND \n ($metric = 'ALL' OR measurement = $metric)\nORDER BY 1",
"refId":"B"
}
],
"thresholds":[],
"timeFrom":null,
"timeShift":null,
"title":"Multiple series without metric column using unixEpochGroup macro ($summarize)",