Skip to content

Commit

Permalink
Merge pull request #1 from ApptuitAI/global-tag-filter
Browse files Browse the repository at this point in the history
Added global tag filter for all dashboards
  • Loading branch information
noothir authored Jul 18, 2018
2 parents b0b8678 + 3746cf6 commit 9f8332b
Show file tree
Hide file tree
Showing 12 changed files with 30,981 additions and 33,008 deletions.
19,619 changes: 9,695 additions & 9,924 deletions Elasticsearch Cluster Stats.json

Large diffs are not rendered by default.

19,036 changes: 8,909 additions & 10,127 deletions Elasticsearch Index Stats.json

Large diffs are not rendered by default.

23,303 changes: 11,082 additions & 12,221 deletions Elasticsearch Node Stats.json

Large diffs are not rendered by default.

1,345 changes: 772 additions & 573 deletions JVM Metrics.json

Large diffs are not rendered by default.

59 changes: 52 additions & 7 deletions Logging Metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
"type": "datasource",
"pluginId": "apptuit",
"pluginName": "Apptuit"
},
{
"name": "VAR_GLOBAL_TAG_FILTER",
"type": "constant",
"label": "global_tag_filter",
"value": ".tag_filter('host==$host')",
"description": ""
}
],
"__requires": [
Expand Down Expand Up @@ -85,7 +92,7 @@
],
"id": "A",
"output": true,
"query": "A=fetch('logger.appends.count', rate='true', align='15s').downsample('[[__interval]]','sum').sum(by='cloud_service,level');"
"query": "A=fetch('logger.appends.count', rate='true', align='15s')$global_tag_filter.downsample('[[__interval]]','sum').sum(by='cloud_service,level');"
}
],
"timeSeries": []
Expand Down Expand Up @@ -153,7 +160,7 @@
],
"id": "A",
"output": true,
"query": "A=fetch('logger.appends.count', rate='true', align='15s').downsample('[[__interval]]','sum').sum(by='cloud_service,level');"
"query": "A=fetch('logger.appends.count', rate='true', align='15s')$global_tag_filter.downsample('[[__interval]]','sum').sum(by='cloud_service,level');"
},
"type": "Query"
}
Expand Down Expand Up @@ -248,7 +255,7 @@
],
"id": "A",
"output": true,
"query": "A=fetch('logger.throwables.total.count', rate='true', align='15s').downsample('[[__interval]]','sum').sum(by='cloud_service');"
"query": "A=fetch('logger.throwables.total.count', rate='true', align='15s')$global_tag_filter.downsample('[[__interval]]','sum').sum(by='cloud_service');"
}
],
"timeSeries": []
Expand Down Expand Up @@ -314,7 +321,7 @@
],
"id": "A",
"output": true,
"query": "A=fetch('logger.throwables.total.count', rate='true', align='15s').downsample('[[__interval]]','sum').sum(by='cloud_service');"
"query": "A=fetch('logger.throwables.total.count', rate='true', align='15s')$global_tag_filter.downsample('[[__interval]]','sum').sum(by='cloud_service');"
},
"type": "Query"
}
Expand Down Expand Up @@ -409,7 +416,7 @@
],
"id": "A",
"output": true,
"query": "e=fetch('logger.throwables.count', rate='true').sum(by='cloud_service,class').downsample('[[__interval]]', 'sum');"
"query": "e=fetch('logger.throwables.count', rate='true')$global_tag_filter.sum(by='cloud_service,class').downsample('[[__interval]]', 'sum');"
}
],
"timeSeries": []
Expand Down Expand Up @@ -477,7 +484,7 @@
],
"id": "A",
"output": true,
"query": "e=fetch('logger.throwables.count', rate='true').sum(by='cloud_service,class').downsample('[[__interval]]', 'sum');"
"query": "e=fetch('logger.throwables.count', rate='true')$global_tag_filter.sum(by='cloud_service,class').downsample('[[__interval]]', 'sum');"
},
"type": "Query"
}
Expand Down Expand Up @@ -533,7 +540,45 @@
"jinsight"
],
"templating": {
"list": []
"list": [
{
"allValue": "*",
"current": {},
"datasource": "${DS_APPTUIT}",
"hide": 0,
"includeAll": true,
"label": "host",
"multi": false,
"name": "host",
"options": [],
"query": "tag_values(logger.appends.count,host)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {
"value": "${VAR_GLOBAL_TAG_FILTER}",
"text": "${VAR_GLOBAL_TAG_FILTER}"
},
"hide": 2,
"label": "global_tag_filter",
"name": "global_tag_filter",
"options": [
{
"value": "${VAR_GLOBAL_TAG_FILTER}",
"text": "${VAR_GLOBAL_TAG_FILTER}"
}
],
"query": "${VAR_GLOBAL_TAG_FILTER}",
"type": "constant"
}
]
},
"time": {
"from": "now-2d",
Expand Down
101 changes: 73 additions & 28 deletions Memcache Metrics.json

Large diffs are not rendered by default.

159 changes: 102 additions & 57 deletions MySQL Metrics.json

Large diffs are not rendered by default.

71 changes: 58 additions & 13 deletions Nginx Metrics Grok.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
"type": "datasource",
"pluginId": "apptuit",
"pluginName": "Apptuit"
},
{
"name": "VAR_GLOBAL_TAG_FILTER",
"type": "constant",
"label": "global_tag_filter",
"value": ".tag_filter('host==$host')",
"description": ""
}
],
"__requires": [
Expand Down Expand Up @@ -105,7 +112,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_request_rate=fetch('nginx.request.count', rate='true').downsample('[[__interval]]', 'avg').sum(by='host');"
"query": "nginx_request_rate=fetch('nginx.request.count', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='host');"
}
],
"timeSeries": []
Expand Down Expand Up @@ -281,7 +288,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_request_rate=fetch('nginx.request.count', rate='true').downsample('[[__interval]]', 'avg').sum(by='host');"
"query": "nginx_request_rate=fetch('nginx.request.count', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='host');"
},
"type": "Query"
}
Expand Down Expand Up @@ -397,7 +404,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_error_rate=fetch('nginx.response.count', rate='true').tag_filter('status=~[4-5]\\d\\d').downsample('[[__interval]]', 'avg').sum(by='status');"
"query": "nginx_error_rate=fetch('nginx.response.count', rate='true')$global_tag_filter.tag_filter('status=~[4-5]\\d\\d').downsample('[[__interval]]', 'avg').sum(by='status');"
}
],
"timeSeries": []
Expand Down Expand Up @@ -573,7 +580,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_error_rate=fetch('nginx.response.count', rate='true').tag_filter('status=~[4-5]\\d\\d').downsample('[[__interval]]', 'avg').sum(by='status');"
"query": "nginx_error_rate=fetch('nginx.response.count', rate='true')$global_tag_filter.tag_filter('status=~[4-5]\\d\\d').downsample('[[__interval]]', 'avg').sum(by='status');"
},
"type": "Query"
}
Expand Down Expand Up @@ -687,7 +694,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_response_latency=fetch('nginx.response.duration.seconds').downsample('[[__interval]]', 'avg');"
"query": "nginx_response_latency=fetch('nginx.response.duration.seconds')$global_tag_filter.downsample('[[__interval]]', 'avg');"
}
],
"timeSeries": []
Expand Down Expand Up @@ -861,7 +868,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_response_latency=fetch('nginx.response.duration.seconds').downsample('[[__interval]]', 'avg');"
"query": "nginx_response_latency=fetch('nginx.response.duration.seconds')$global_tag_filter.downsample('[[__interval]]', 'avg');"
},
"type": "Query"
}
Expand Down Expand Up @@ -1010,7 +1017,7 @@
"lineStart": 1,
"numLines": 3,
"output": true,
"query": "nginx_response_latency=fetch('nginx.response.duration.sum.seconds', rate='true').downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_upstream_response_latency=fetch('nginx.response.upstream.duration.sum.seconds', rate='true').downsample('[[__interval]]', 'avg').sum(by='host');\noutput(nginx_response_latency, nginx_upstream_response_latency);"
"query": "nginx_response_latency=fetch('nginx.response.duration.sum.seconds', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_upstream_response_latency=fetch('nginx.response.upstream.duration.sum.seconds', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='host');\noutput(nginx_response_latency, nginx_upstream_response_latency);"
}
],
"timeSeries": []
Expand Down Expand Up @@ -1243,7 +1250,7 @@
"lineStart": 1,
"numLines": 3,
"output": true,
"query": "nginx_response_latency=fetch('nginx.response.duration.sum.seconds', rate='true').downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_upstream_response_latency=fetch('nginx.response.upstream.duration.sum.seconds', rate='true').downsample('[[__interval]]', 'avg').sum(by='host');\noutput(nginx_response_latency, nginx_upstream_response_latency);"
"query": "nginx_response_latency=fetch('nginx.response.duration.sum.seconds', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_upstream_response_latency=fetch('nginx.response.upstream.duration.sum.seconds', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='host');\noutput(nginx_response_latency, nginx_upstream_response_latency);"
},
"type": "Query"
}
Expand Down Expand Up @@ -1412,7 +1419,7 @@
"lineStart": 1,
"numLines": 5,
"output": true,
"query": "nginx_bytes_in=fetch('nginx.network.bytes.count', rate='true').tag_filter('direction=in').downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_bytes_out=fetch('nginx.network.bytes.count', rate='true').tag_filter('direction=out').downsample('[[__interval]]', 'avg').sum(by='host');\nminusone=-1;\nnginx_bytes_out=nginx_bytes_out.mult(minusone);\noutput(nginx_bytes_in, nginx_bytes_out);"
"query": "nginx_bytes_in=fetch('nginx.network.bytes.count', rate='true')$global_tag_filter.tag_filter('direction=in').downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_bytes_out=fetch('nginx.network.bytes.count', rate='true')$global_tag_filter.tag_filter('direction=out').downsample('[[__interval]]', 'avg').sum(by='host');\nminusone=-1;\nnginx_bytes_out=nginx_bytes_out.mult(minusone);\noutput(nginx_bytes_in, nginx_bytes_out);"
}
],
"timeSeries": []
Expand Down Expand Up @@ -1679,7 +1686,7 @@
"lineStart": 1,
"numLines": 5,
"output": true,
"query": "nginx_bytes_in=fetch('nginx.network.bytes.count', rate='true').tag_filter('direction=in').downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_bytes_out=fetch('nginx.network.bytes.count', rate='true').tag_filter('direction=out').downsample('[[__interval]]', 'avg').sum(by='host');\nminusone=-1;\nnginx_bytes_out=nginx_bytes_out.mult(minusone);\noutput(nginx_bytes_in, nginx_bytes_out);"
"query": "nginx_bytes_in=fetch('nginx.network.bytes.count', rate='true')$global_tag_filter.tag_filter('direction=in').downsample('[[__interval]]', 'avg').sum(by='host');\nnginx_bytes_out=fetch('nginx.network.bytes.count', rate='true')$global_tag_filter.tag_filter('direction=out').downsample('[[__interval]]', 'avg').sum(by='host');\nminusone=-1;\nnginx_bytes_out=nginx_bytes_out.mult(minusone);\noutput(nginx_bytes_in, nginx_bytes_out);"
},
"type": "Query"
}
Expand Down Expand Up @@ -1793,7 +1800,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_request_count_by_method=fetch('nginx.request.count', rate='true').downsample('[[__interval]]', 'avg').sum(by='method');"
"query": "nginx_request_count_by_method=fetch('nginx.request.count', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='method');"
}
],
"timeSeries": []
Expand Down Expand Up @@ -1969,7 +1976,7 @@
"lineStart": 1,
"numLines": 1,
"output": true,
"query": "nginx_request_count_by_method=fetch('nginx.request.count', rate='true').downsample('[[__interval]]', 'avg').sum(by='method');"
"query": "nginx_request_count_by_method=fetch('nginx.request.count', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='method');"
},
"type": "Query"
}
Expand Down Expand Up @@ -2023,7 +2030,45 @@
"style": "dark",
"tags": [],
"templating": {
"list": []
"list": [
{
"allValue": "*",
"current": {},
"datasource": "${DS_APPTUIT}",
"hide": 0,
"includeAll": true,
"label": "host",
"multi": false,
"name": "host",
"options": [],
"query": "tag_values(nginx.request.count,host)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {
"value": "${VAR_GLOBAL_TAG_FILTER}",
"text": "${VAR_GLOBAL_TAG_FILTER}"
},
"hide": 2,
"label": "global_tag_filter",
"name": "global_tag_filter",
"options": [
{
"value": "${VAR_GLOBAL_TAG_FILTER}",
"text": "${VAR_GLOBAL_TAG_FILTER}"
}
],
"query": "${VAR_GLOBAL_TAG_FILTER}",
"type": "constant"
}
]
},
"time": {
"from": "2017-12-06T11:30:00.000Z",
Expand Down
Loading

0 comments on commit 9f8332b

Please sign in to comment.