From f67463648a90f9ef7aa8475bee24c1d9cd09bcf6 Mon Sep 17 00:00:00 2001 From: noothir <37412408+noothir@users.noreply.github.com> Date: Mon, 3 Sep 2018 17:14:12 +0530 Subject: [PATCH] Updated dashboards with topk functions (#3) --- Elasticsearch Cluster Stats.json | 92 ++++++++++ Elasticsearch Node Stats.json | 4 +- OS Metrics.json | 278 +++++++++++++++++++++++++++++++ Tomcat Metrics.json | 12 +- 4 files changed, 379 insertions(+), 7 deletions(-) diff --git a/Elasticsearch Cluster Stats.json b/Elasticsearch Cluster Stats.json index cff9df0..59f3b37 100644 --- a/Elasticsearch Cluster Stats.json +++ b/Elasticsearch Cluster Stats.json @@ -1272,6 +1272,98 @@ "yBucketNumber": null, "yBucketSize": null }, + { + "aliasColors": { + "avg": "rgb(158, 166, 155)" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_APPTUIT}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 89, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "metrics": [], + "refId": "A", + "ts": { + "alias": "avg:avg;top3:$t(node)", + "errors": [], + "genMap": [], + "id": "A", + "output": true, + "query": "A=fetch('elasticsearch.node.os.cpu.percent').tag_filter('cluster==$cluster').downsample('[[__interval]]','avg');\navg=A.avg();\ntop3=A.top3();\noutput(avg, top3);" + }, + "type": "Query" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Top 3 Node CPU", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, { "collapsed": false, "gridPos": { diff --git a/Elasticsearch Node Stats.json b/Elasticsearch Node Stats.json index 6b8d36d..1a7e93d 100644 --- a/Elasticsearch Node Stats.json +++ b/Elasticsearch Node Stats.json @@ -426,12 +426,12 @@ "errors": [], "id": "A", "output": true, - "query": "A=fetch('elasticsearch.node.jvm.gc.collectors.old.collection_count')$global_tag_filter.series_max();" + "query": "A=fetch('elasticsearch.node.jvm.gc.collectors.old.collection_count')$global_tag_filter.series_max().top5();" }, "type": "Query" } ], - "title": "JVM GC", + "title": "Top 5 JVM GC", "transform": "timeseries_aggregations", "type": "table" }, diff --git a/OS Metrics.json b/OS Metrics.json index 17106b0..ff55ace 100644 --- a/OS Metrics.json +++ b/OS Metrics.json @@ -988,6 +988,284 @@ "show": true } ] + }, + { + "aliasColors": { + "avg": "rgb(158, 166, 155)" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_APPTUIT}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 7 + }, + "id": 19, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "metrics": [], + "refId": "A", + "ts": { + "alias": "used_cpu_percent:avg; top3:$t(host)", + "errors": [], + "genMap": [], + "id": "A", + "output": true, + "query": "idle_cpu=fetch('node.cpu.ticks.count', rate='true').tag_filter('type==idle').downsample('[[__interval]]', 'avg');\ncount=idle_cpu.count();\nidle_cpu_percent=idle_cpu.sum().div(count);\nhundred=100;\nused_cpu_percent=hundred.sub(idle_cpu_percent);\ntop3 = hundred.sub(idle_cpu).top3();\noutput(top3, used_cpu_percent);" + }, + "type": "Query" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Top 3 Used CPU", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "ade-scoring-group-1-95-4wp2": "#bf1b00", + "avg": "rgb(158, 166, 155)" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_APPTUIT}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 7 + }, + "id": 20, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "metrics": [], + "refId": "A", + "ts": { + "alias": "avg_mem_used_percent:avg; top3:$t(host)", + "errors": [], + "genMap": [], + "id": "A", + "output": true, + "query": "memtotal=fetch('node.memory.total.bytes').downsample('[[__interval]]', 'avg');\nmemfree=fetch('node.memory.bytes').tag_filter('state==free').downsample('[[__interval]]', 'avg');\nmembuffers=fetch('node.memory.bytes').tag_filter('state==buffers').downsample('[[__interval]]', 'avg');\nmemcached=fetch('node.memory.bytes').tag_filter('state==cached').downsample('[[__interval]]', 'avg');\nmemunused=memfree.add(membuffers, ignore='state').add(memcached, ignore='state');\nhundred=100;\nmem_available_percent=memunused.div(memtotal).mult(hundred);\navg_mem_available_percent=memunused.sum().div(memtotal.sum()).mult(hundred);\nmem_used_percent=hundred.sub(mem_available_percent);\navg_mem_used_percent=hundred.sub(avg_mem_available_percent);\ntop3=mem_used_percent.top3();\noutput(avg_mem_used_percent, top3);" + }, + "type": "Query" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Top 3 Memory Usages", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "ade-scoring-group-1-95-4wp2": "#bf1b00", + "avg": "rgb(158, 166, 155)" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_APPTUIT}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 7 + }, + "id": 21, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "metrics": [], + "refId": "A", + "ts": { + "alias": "avg_node_disk_utilization:avg; top3:$t(host)", + "errors": [], + "genMap": [], + "id": "A", + "output": true, + "query": "node_disk_utilization=fetch('node.disk.uptime.percent').downsample('[[__interval]]','avg');\navg_node_disk_utilization=node_disk_utilization.avg();\ntop3=node_disk_utilization.top3();\noutput(avg_node_disk_utilization, top3);" + }, + "type": "Query" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Top 3 Disc Utilization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "repeat": null, diff --git a/Tomcat Metrics.json b/Tomcat Metrics.json index e13c001..cce4141 100644 --- a/Tomcat Metrics.json +++ b/Tomcat Metrics.json @@ -52,7 +52,9 @@ "height": "250px", "panels": [ { - "aliasColors": {}, + "aliasColors": { + "avg": "rgb(158, 166, 155)" + }, "bars": false, "dashLength": 10, "dashes": false, @@ -64,7 +66,7 @@ "current": false, "max": false, "min": false, - "show": true, + "show": false, "total": false, "values": false }, @@ -196,13 +198,13 @@ "metrics": [], "refId": "A", "ts": { - "alias": "tomcat_request_rate:$t(cloud_service)", + "alias": "avg_tomcat_request_rate:avg;tomcat_request_rate:$t(host)", "errors": [], "id": "A", "lineStart": 1, "numLines": 1, "output": true, - "query": "tomcat_request_rate=fetch('tomcat.requests.count', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').sum(by='cloud_service');" + "query": "avg_tomcat_request_rate=fetch('tomcat.requests.count', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').avg();\ntomcat_request_rate=fetch('tomcat.requests.count', rate='true')$global_tag_filter.downsample('[[__interval]]', 'avg').top3();\noutput(avg_tomcat_request_rate, tomcat_request_rate);" }, "type": "Query" } @@ -210,7 +212,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "Request/sec", + "title": "Top 3 Request/sec", "tooltip": { "shared": true, "sort": 0,