Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

Commit

Permalink
updated scripted dashboards to use continuous queries
Browse files Browse the repository at this point in the history
  • Loading branch information
dneuman64 committed Jan 22, 2016
1 parent d4a415a commit f4c04e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion traffic_stats/grafana/traffic_ops_cachegroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ dashboard.title = which;
"targets": [
{
"rawQuery": true,
"query": "SELECT sum(value)*1000/6 FROM \"bandwidth\" WHERE cachegroup='" + which + "' and $timeFilter GROUP BY time(60s), hostname",
"query": "SELECT sum(value)*1000 FROM \"monthly\".\"bandwidth.1min\" WHERE cachegroup='" + which + "' and $timeFilter GROUP BY time(60s), hostname",
"alias": "$tag_hostname"
}
],
Expand Down
12 changes: 6 additions & 6 deletions traffic_stats/grafana/traffic_ops_deliveryservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ dashboard.title = which;
"targets": [
{
"measurement": "bw",
"query": "SELECT mean(value)*1000 FROM \"kbps\" WHERE deliveryservice='" + which + "' and cachegroup = 'total' and $timeFilter GROUP BY time(60s), deliveryservice ORDER BY asc",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"kbps.ds.1min\" WHERE deliveryservice='" + which + "' and cachegroup = 'total' and $timeFilter GROUP BY time(60s), deliveryservice ORDER BY asc",
"rawQuery": true,
"tags": {
"deliveryservice": which
Expand Down Expand Up @@ -198,24 +198,24 @@ dashboard.title = which;
"tags": {
"deliveryservice": which
},
"query": "SELECT mean(value) FROM \"tps_2xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc",
"query": "SELECT mean(value) FROM \"monthly\".\"tps_2xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc",
"hide": false,
"rawQuery": true
},
{
"target": "",
"rawQuery": true,
"query": "SELECT mean(value) FROM \"tps_3xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc"
"query": "SELECT mean(value) FROM \"monthly\".\"tps_3xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc"
},
{
"target": "",
"rawQuery": true,
"query": "SELECT mean(value) FROM \"tps_4xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc"
"query": "SELECT mean(value) FROM \"monthly\".\"tps_4xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc"
},
{
"target": "",
"rawQuery": true,
"query": "SELECT mean(value) FROM \"tps_5xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc"
"query": "SELECT mean(value) FROM \"monthly\".\"tps_5xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc"
}
],
"aliasColors": {},
Expand Down Expand Up @@ -273,7 +273,7 @@ dashboard.title = which;
"steppedLine": false,
"targets": [
{
"query": "SELECT sum(value)*1000/6 FROM \"kbps\" WHERE deliveryservice='" + which + "' and cachegroup != 'total' and $timeFilter GROUP BY time(60s), cachegroup",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"kbps.ds.1min\" WHERE deliveryservice='" + which + "' and cachegroup != 'total' and $timeFilter GROUP BY time(60s), cachegroup",
"rawQuery": true,
"alias": "$tag_cachegroup"
}
Expand Down
18 changes: 9 additions & 9 deletions traffic_stats/grafana/traffic_ops_scripted.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ if (type == "deliveryservice") {
"targets": [
{
"measurement": "bw",
"query": "SELECT mean(value)*1000 FROM \"kbps\" WHERE deliveryservice='" + which + "' and cachegroup = 'total' and $timeFilter GROUP BY time(60s), deliveryservice ORDER BY asc",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"kbps.ds.1min\" WHERE deliveryservice='" + which + "' and cachegroup = 'total' and $timeFilter GROUP BY time(60s), deliveryservice ORDER BY asc",
"rawQuery": true,
"tags": {
"deliveryservice": which
Expand Down Expand Up @@ -201,24 +201,24 @@ if (type == "deliveryservice") {
"tags": {
"deliveryservice": which
},
"query": "SELECT mean(value) FROM \"tps_2xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc",
"query": "SELECT mean(value) FROM \"monthly\".\"tps_2xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc",
"hide": false,
"rawQuery": true
},
{
"target": "",
"rawQuery": true,
"query": "SELECT mean(value) FROM \"tps_3xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc"
"query": "SELECT mean(value) FROM \"monthly\".\"tps_3xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc"
},
{
"target": "",
"rawQuery": true,
"query": "SELECT mean(value) FROM \"tps_4xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc"
"query": "SELECT mean(value) FROM \"monthly\".\"tps_4xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc"
},
{
"target": "",
"rawQuery": true,
"query": "SELECT mean(value) FROM \"tps_5xx\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time($interval) ORDER BY asc"
"query": "SELECT mean(value) FROM \"monthly\".\"tps_5xx.ds.1min\" WHERE $timeFilter AND deliveryservice='" + which + "' GROUP BY time(60s) ORDER BY asc"
}
],
"aliasColors": {},
Expand Down Expand Up @@ -276,7 +276,7 @@ if (type == "deliveryservice") {
"steppedLine": false,
"targets": [
{
"query": "SELECT sum(value)*1000/6 FROM \"kbps\" WHERE deliveryservice='" + which + "' and cachegroup != 'total' and $timeFilter GROUP BY time(60s), cachegroup",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"kbps.ds.1min\" WHERE deliveryservice='" + which + "' and cachegroup != 'total' and $timeFilter GROUP BY time(60s), cachegroup",
"rawQuery": true
}
],
Expand Down Expand Up @@ -359,7 +359,7 @@ else if ( type == "cachegroup" ) {
"targets": [
{
"rawQuery": true,
"query": "SELECT sum(value)*1000/6 FROM \"bandwidth\" WHERE cachegroup='" + which + "' and $timeFilter GROUP BY time(60s), hostname"
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"bandwidth.1min\" WHERE cachegroup='" + which + "' and $timeFilter GROUP BY time(60s), hostname"
}
],
"aliasColors": {},
Expand Down Expand Up @@ -434,7 +434,7 @@ else if ( type == "server" ) {
{
"measurement": "bandwidth",
"tags": {},
"query": "SELECT sum(value)*1000/6 FROM \"bandwidth\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"bandwidth.1min\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"rawQuery": true
}
],
Expand Down Expand Up @@ -506,7 +506,7 @@ else if ( type == "server" ) {
{
"measurement": "bandwidth",
"tags": {},
"query": "SELECT sum(value)*1000/6 FROM \"ats.proxy.process.http.current_client_connections\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"connections.1min\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"rawQuery": true
}
],
Expand Down
4 changes: 2 additions & 2 deletions traffic_stats/grafana/traffic_ops_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ dashboard.title = which;
{
"measurement": "bandwidth",
"tags": {},
"query": "SELECT sum(value)*1000/6 FROM \"bandwidth\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"bandwidth.1min\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"rawQuery": true
}
],
Expand Down Expand Up @@ -190,7 +190,7 @@ dashboard.title = which;
{
"measurement": "bandwidth",
"tags": {},
"query": "SELECT sum(value)*1000/6 FROM \"ats.proxy.process.http.current_client_connections\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"connections.1min\" WHERE hostname='" + which + "' and $timeFilter GROUP BY time(60s)",
"rawQuery": true
}
],
Expand Down

0 comments on commit f4c04e1

Please sign in to comment.