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

Traffic Stats scripted dashboard updates #1118

Merged
merged 3 commits into from
Mar 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/source/admin/traffic_stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Configuration
::

ProxyPass /dashboard http://localhost:3000/dashboard
ProxyPass /dashboard-solo http://localhost:3000/dashboard-solo
ProxyPass /css http://localhost:3000/css
ProxyPass /app http://localhost:3000/app
ProxyPass /api http://localhost:3000/api
Expand Down Expand Up @@ -157,13 +158,13 @@ Configuration
+---------------------------+------------------------------------------------------------------------------------------------+
| server_graph_url | https://<grafanaHost>/dashboard/script/traffic_ops_server.js?which= |
+---------------------------+------------------------------------------------------------------------------------------------+
| visual_status_panel_1 | https://<grafanaHost>/dashboard/solo/db/cdn-stats?panelId=2&fullscreen&from=now-24h&to=now-60s |
| visual_status_panel_1 | https://<grafanaHost>/dashboard-solo/db/cdn-stats?panelId=2&fullscreen&from=now-24h&to=now-60s |
+---------------------------+------------------------------------------------------------------------------------------------+
| visual_status_panel_2 | https://<grafanaHost>/dashboard/solo/db/cdn-stats?panelId=1&fullscreen&from=now-24h&to=now-60s |
| visual_status_panel_2 | https://<grafanaHost>/dashboard-solo/db/cdn-stats?panelId=1&fullscreen&from=now-24h&to=now-60s |
+---------------------------+------------------------------------------------------------------------------------------------+
| daily_bw_url | https://<grafanaHost>/dashboard/solo/db/daily-summary?panelId=1&fullscreen&from=now-3y&to=now |
| daily_bw_url | https://<grafanaHost>/dashboard-solo/db/daily-summary?panelId=1&fullscreen&from=now-3y&to=now |
+---------------------------+------------------------------------------------------------------------------------------------+
| daily_served_url | https://<grafanaHost>/dashboard/solo/db/daily-summary?panelId=2&fullscreen&from=now-3y&to=now |
| daily_served_url | https://<grafanaHost>/dashboard-solo/db/daily-summary?panelId=2&fullscreen&from=now-3y&to=now |
+---------------------------+------------------------------------------------------------------------------------------------+

InfluxDb Tools
Expand Down
4 changes: 3 additions & 1 deletion traffic_stats/grafana/traffic_ops_cachegroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ if(!_.isUndefined(ARGS.which)) {

// Set a title
dashboard.title = which;
//set refresh interval
dashboard.refresh = "30s";

{
dashboard.rows.push( {
Expand Down Expand Up @@ -108,7 +110,7 @@ dashboard.title = which;
"nullPointMode": "connected",
"steppedLine": false,
"tooltip": {
"value_type": "cumulative",
"value_type": "individual",
"shared": true
},
"timeFrom": null,
Expand Down
16 changes: 9 additions & 7 deletions traffic_stats/grafana/traffic_ops_deliveryservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ if(!_.isUndefined(ARGS.which)) {

// Set a title
dashboard.title = which;
//set refresh interval
dashboard.refresh = "30s";

{
dashboard.rows.push( {
Expand Down Expand Up @@ -269,11 +271,11 @@ dashboard.title = which;
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": false,
"stack": true,
"steppedLine": false,
"targets": [
{
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"kbps.ds.1min\" WHERE deliveryservice='" + which + "' and cachegroup != 'total' and $timeFilter GROUP BY time(60s), cachegroup",
"query": "SELECT mean(value)*1000 FROM \"monthly\".\"kbps.cg.1min\" WHERE deliveryservice='" + which + "' and cachegroup != 'total' and $timeFilter GROUP BY time(60s), cachegroup",
"rawQuery": true,
"alias": "$tag_cachegroup"
}
Expand All @@ -282,19 +284,19 @@ dashboard.title = which;
"timeShift": null,
"title": "bandwidth by cachegroup",
"tooltip": {
"shared": false,
"value_type": "cumulative"
"shared": true,
"value_type": "individual"
},
"type": "graph",
"x-axis": true,
"y-axis": true,
"y_formats": [
"bps",
"short"
"bps"
]
}
],
"title": "bwByCg"
)};
}
);
}
return dashboard;
5 changes: 3 additions & 2 deletions traffic_stats/grafana/traffic_ops_scripted.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ if(!_.isUndefined(ARGS.type)) {
}
// Set a title
dashboard.title = which;
//set refresh interval
dashboard.refresh = "30s";

if (type == "deliveryservice") {
dashboard.rows.push( {
Expand Down Expand Up @@ -456,13 +458,12 @@ else if ( type == "server" ) {
"span": 12,
"editable": true,
"type": "graph",
"id": 1,
"id": 2,
"datasource": "cache_stats",
"renderer": "flot",
"x-axis": true,
"y-axis": true,
"y_formats": [
"bps",
"short"
],
"grid": {
Expand Down
5 changes: 3 additions & 2 deletions traffic_stats/grafana/traffic_ops_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ if(!_.isUndefined(ARGS.which)) {

// Set a title
dashboard.title = which;
//set refresh interval
dashboard.refresh = "30s";


{
Expand Down Expand Up @@ -140,13 +142,12 @@ dashboard.title = which;
"span": 12,
"editable": true,
"type": "graph",
"id": 1,
"id": 2,
"datasource": "cache_stats",
"renderer": "flot",
"x-axis": true,
"y-axis": true,
"y_formats": [
"bps",
"short"
],
"grid": {
Expand Down