diff --git a/dashboards/coredns/coredns-dashboard-1.jpg b/dashboards/coredns/coredns-dashboard-1.jpg index 6ffc8a689a..a690147653 100644 Binary files a/dashboards/coredns/coredns-dashboard-1.jpg and b/dashboards/coredns/coredns-dashboard-1.jpg differ diff --git a/dashboards/coredns/coredns.json b/dashboards/coredns/coredns.json index 3f55bc51fb..58e7c01fb0 100644 --- a/dashboards/coredns/coredns.json +++ b/dashboards/coredns/coredns.json @@ -40,8 +40,8 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "FROM (\n\tSELECT \n\t\tlatest(version) as 'corednsversion',\n\t\tlatest(up) as 'corednsup',\n\t\tsum(coredns_panics_total) as 'corednspanics'\n\tFROM Metric\n\tWHERE metricName in ('coredns_build_info','up','coredns_panics_total')\n\t\tand instrumentation.name = 'remote-write'\n\t\tand (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns')\n\tfacet instance, prometheus_server, cluster_name limit max\n\t) \nSELECT sum(corednsup) as 'Instances Up', sum(corednspanics) as 'Panics' where prometheus_server IN ( {{ prometheus_server }} ) facet corednsversion as 'CoreDNS Version', prometheus_server as 'Prometheus Server' limit max" + "accountIds": [], + "query": "FROM (\n\tSELECT \n\t\tlatest(version) as 'corednsversion',\n\t\tlatest(up) as 'corednsup',\n\t\tsum(coredns_panics_total) as 'corednspanics'\n\tFROM Metric\n\tWHERE metricName in ('coredns_build_info','up','coredns_panics_total')\n\t\tand instrumentation.name = 'remote-write'\n\t\tand (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns')\n\tfacet instance, prometheus_server, cluster_name limit max\n\t) \nSELECT sum(corednsup) as 'Instances Up', sum(corednspanics) as 'Panics' where prometheus_server IN ( {{ prometheus_server }} ) and cluster_name IN ({{cluster_name}}) facet corednsversion as 'CoreDNS Version', prometheus_server as 'Prometheus Server' limit max" } ], "platformOptions": { @@ -70,18 +70,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(process_cpu_seconds_total), 1 SECONDS) * 1000 FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) facet concat(prometheus_server,' - ', instance) TIMESERIES " + "accountIds": [], + "query": "SELECT rate(sum(process_cpu_seconds_total), 1 SECONDS) * 1000 FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) and cluster_name IN ({{cluster_name}}) facet concat(prometheus_server,' - ', instance) TIMESERIES " } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "MS" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -106,18 +112,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) as 'Requests' FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server, ' - ', instance) LIMIT 100 timeseries" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) as 'Requests' FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) and cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server, ' - ', instance) LIMIT 100 timeseries" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "REQUESTS_PER_SECOND" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -142,18 +154,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT histogrampercentile(coredns_dns_request_duration_seconds_bucket, (95)) as '95%ile' FROM Metric where (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance,' : ',server, ',',zone) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT histogrampercentile(coredns_dns_request_duration_seconds_bucket, (95)) as '95%ile' FROM Metric where (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) and cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance,' : ',server, ',',zone) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "SECONDS" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -178,18 +196,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT average(go_memstats_alloc_bytes) / 1000 / 1000 FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance) LIMIT 100 TIMESERIES 300000 SLIDE BY 60000" + "accountIds": [], + "query": "SELECT average(go_memstats_alloc_bytes) / 1000 / 1000 FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance) LIMIT 100 TIMESERIES 300000 SLIDE BY 60000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "BYTES" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } } @@ -220,18 +244,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , ', proto) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ' , ', proto) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "REQUESTS_PER_SECOND" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -256,8 +286,8 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , type: ', type) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ' , type: ', type) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { @@ -289,17 +319,20 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT histogrampercentile(coredns_dns_request_size_bytes_bucket, (100 * 0.95)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'udp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT histogrampercentile(coredns_dns_request_size_bytes_bucket, (100 * 0.95)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'udp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) and cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" }, { - "accountId": 0, + "accountIds": [], "query": "SELECT histogrampercentile(coredns_dns_request_size_bytes_bucket, (100 * 0.50)) FROM Metric where proto = 'udp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 50th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "seriesOverrides": [ { @@ -315,6 +348,9 @@ }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -339,18 +375,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_do_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_do_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "REQUESTS_PER_SECOND" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -375,18 +417,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , zone: ', zone) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_requests_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ' , zone: ', zone) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "REQUESTS_PER_SECOND" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -411,17 +459,20 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT histogrampercentile(coredns_dns_request_size_bytes_bucket, (100 * 0.95)) as 'tcp:95%ile' FROM Metric where instrumentation.name = 'remote-write' and proto = 'tcp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT histogrampercentile(coredns_dns_request_size_bytes_bucket, (100 * 0.95)) as 'tcp:95%ile' FROM Metric where instrumentation.name = 'remote-write' and proto = 'tcp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" }, { - "accountId": 0, + "accountIds": [], "query": "SELECT histogrampercentile(coredns_dns_request_size_bytes_bucket, (100 * 0.50)) as 'tcp:50%ile' FROM Metric where instrumentation.name = 'remote-write' and proto = 'tcp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "seriesOverrides": [ { @@ -437,6 +488,9 @@ }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } } @@ -467,18 +521,24 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_responses_total), 1 SECONDS) as 'Responses per second' from Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_responses_total), 1 SECONDS) as 'Responses per second' from Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "REQUESTS_PER_SECOND" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -503,17 +563,20 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT histogrampercentile(coredns_dns_response_size_bytes_bucket, (100 * 0.95)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'udp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT histogrampercentile(coredns_dns_response_size_bytes_bucket, (100 * 0.95)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'udp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) and cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" }, { - "accountId": 0, + "accountIds": [], "query": "SELECT histogrampercentile(coredns_dns_response_size_bytes_bucket, (100 * 0.50)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'udp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 50th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "seriesOverrides": [ { @@ -529,6 +592,9 @@ }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -553,22 +619,28 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT histogrampercentile(coredns_dns_response_size_bytes_bucket, (100 * 0.95)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'tcp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT histogrampercentile(coredns_dns_response_size_bytes_bucket, (100 * 0.95)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'tcp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" }, { - "accountId": 0, + "accountIds": [], "query": "SELECT histogrampercentile(coredns_dns_response_size_bytes_bucket, (100 * 0.50)) FROM Metric where instrumentation.name = 'remote-write' where proto = 'tcp' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ' , 95th%') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false }, + "thresholds": { + "isLabelVisible": true + }, "units": { "unit": "BYTES" }, "yAxisLeft": { "zero": true + }, + "yAxisRight": { + "zero": true } } }, @@ -593,8 +665,8 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_responses_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ', rcode: ',rcode) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_responses_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name In ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ', rcode: ',rcode) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { @@ -626,8 +698,8 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_dns_responses_total), 1 SECONDS) * 60 as 'Responses' FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ', rcode: ',rcode) LIMIT 100" + "accountIds": [], + "query": "SELECT rate(sum(coredns_dns_responses_total), 1 SECONDS) * 60 as 'Responses' FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ', rcode: ',rcode) LIMIT 100" } ], "platformOptions": { @@ -646,7 +718,7 @@ "layout": { "column": 1, "row": 1, - "width": 4, + "width": 5, "height": 3 }, "linkedEntityGuids": null, @@ -659,8 +731,8 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "FROM Metric SELECT sum(coredns_cache_hits_total)/(sum(coredns_cache_misses_total) + sum(coredns_cache_hits_total)) * 100 as 'Cache Hit %' where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) FACET prometheus_server LIMIT 100" + "accountIds": [], + "query": "FROM Metric SELECT sum(coredns_cache_hits_total)/(sum(coredns_cache_misses_total) + sum(coredns_cache_hits_total)) * 100 as 'Cache Hit %' where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) AND cluster_name IN ({{cluster_name}}) FACET prometheus_server LIMIT 100" } ], "platformOptions": { @@ -669,11 +741,11 @@ } }, { - "title": "Cache hit rate by type", + "title": "Cache entries total", "layout": { - "column": 5, + "column": 6, "row": 1, - "width": 4, + "width": 7, "height": 3 }, "linkedEntityGuids": null, @@ -689,29 +761,26 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_cache_hits_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server, ' - ', instance, ', type: ', type) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT (average(coredns_cache_entries) * cardinality(coredns_cache_entries)) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ', type: ',type) LIMIT 100 TIMESERIES 300000" } ], "platformOptions": { "ignoreTimeRange": false - }, - "units": { - "unit": "REQUESTS_PER_SECOND" } } }, { - "title": "Cache entries total", + "title": "Cache misses", "layout": { - "column": 9, - "row": 1, - "width": 4, + "column": 1, + "row": 4, + "width": 6, "height": 3 }, "linkedEntityGuids": null, "visualization": { - "id": "viz.area" + "id": "viz.line" }, "rawConfiguration": { "facet": { @@ -722,26 +791,38 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT (average(coredns_cache_entries) * cardinality(coredns_cache_entries)) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ', type: ',type) LIMIT 100 TIMESERIES 300000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_cache_misses_total), 1 SECONDS) as 'Cache misses per second' FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server,' - ',instance, ', type: misses') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { "ignoreTimeRange": false + }, + "thresholds": { + "isLabelVisible": true + }, + "units": { + "unit": "REQUESTS_PER_SECOND" + }, + "yAxisLeft": { + "zero": true + }, + "yAxisRight": { + "zero": true } } }, { - "title": "Cache misses", + "title": "Cache hit rate by type", "layout": { - "column": 1, + "column": 7, "row": 4, - "width": 4, + "width": 6, "height": 3 }, "linkedEntityGuids": null, "visualization": { - "id": "viz.line" + "id": "viz.area" }, "rawConfiguration": { "facet": { @@ -752,8 +833,8 @@ }, "nrqlQueries": [ { - "accountId": 0, - "query": "SELECT rate(sum(coredns_cache_misses_total), 1 SECONDS) as 'Cache misses per second' FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) FACET concat(prometheus_server,' - ',instance, ', type: misses') LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" + "accountIds": [], + "query": "SELECT rate(sum(coredns_cache_hits_total), 1 SECONDS) FROM Metric where instrumentation.name = 'remote-write' and (app_kubernetes_io_name = 'coredns' or app_newrelic_io_name = 'coredns' or k8s_app = 'kube-dns' or job = 'coredns') and prometheus_server IN ( {{ prometheus_server }} ) and instance IN ( {{ instance }} ) AND cluster_name IN ({{cluster_name}}) FACET concat(prometheus_server, ' - ', instance, ', type: ', type) LIMIT 100 TIMESERIES 300000 SLIDE BY 30000" } ], "platformOptions": { @@ -761,9 +842,6 @@ }, "units": { "unit": "REQUESTS_PER_SECOND" - }, - "yAxisLeft": { - "zero": true } } } @@ -783,7 +861,10 @@ ], "nrqlQuery": { "accountIds": [], - "query": "from Metric select uniques(prometheus_server) where instrumentation.name = 'remote-write' and metricName like 'coredns_%' since 1 week ago" + "query": "from Metric select uniques(prometheus_server) where instrumentation.name = 'remote-write' and metricName like 'coredns_%' since 1 month ago" + }, + "options": { + "ignoreTimeRange": true }, "title": "Prometheus Server", "type": "NRQL", @@ -802,12 +883,31 @@ ], "nrqlQuery": { "accountIds": [], - "query": "from Metric select uniques(instance) where metricName like 'coredns_%' since 1 week ago" + "query": "from Metric select uniques(instance) where metricName like 'coredns_%' since 1 month ago" + }, + "options": { + "ignoreTimeRange": true }, "title": "Instance", "type": "NRQL", "isMultiSelection": true, "replacementStrategy": "STRING" + }, + { + "name": "cluster_name", + "items": null, + "defaultValues": [], + "nrqlQuery": { + "accountIds": [], + "query": "FROM Metric SELECT uniques(cluster_name) since 1 month ago" + }, + "options": { + "ignoreTimeRange": true + }, + "title": "Cluster name", + "type": "NRQL", + "isMultiSelection": false, + "replacementStrategy": "STRING" } ] } \ No newline at end of file diff --git a/dashboards/kubernetes/kubernetes.json b/dashboards/kubernetes/kubernetes.json index 6e1787b1c0..da1dd53f02 100644 --- a/dashboards/kubernetes/kubernetes.json +++ b/dashboards/kubernetes/kubernetes.json @@ -44,7 +44,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "SELECT filter(uniqueCount(k8s.nodeName), WHERE `label.eks.amazonaws.com/compute-type` IS NULL AND k8s.podName IS NULL) AS 'Nodes', filter(uniqueCount(k8s.nodeName), WHERE `label.eks.amazonaws.com/compute-type` IS NOT NULL AND k8s.podName IS NULL) as 'Serverless Nodes', uniqueCount(k8s.clusterName) as 'Clusters', filter(uniqueCount(k8s.namespaceName, k8s.clusterName), WHERE `metricName` = 'k8s.namespace.createdAt') as 'Namespaces', filter(uniqueCount(k8s.deploymentName, k8s.clusterName), WHERE `metricName` = 'k8s.deployment.createdAt') as 'Deployments', filter(uniqueCount(k8s.podName, k8s.nodeName, k8s.deploymentName, k8s.clusterName), WHERE metricName='k8s.pod.isScheduled' or metricName='k8s.pod.startTime') as 'Pods', uniqueCount(k8s.containerId) as 'Containers' FROM Metric UNTIL 1 minute ago" + "query": "SELECT uniqueCount(K8sNodeSample.entityId) as 'Nodes', uniqueCount(K8sNamespaceSample.clusterName) as 'Clusters', uniqueCount(K8sNamespaceSample.entityId) as 'Namespaces', uniqueCount(K8sDeploymentSample.entityId) as 'Deployments', uniqueCount(K8sPodSample.entityId) as 'Pods', uniqueCount(K8sContainerSample.containerID) as 'Containers' FROM K8sNodeSample, K8sNamespaceSample, K8sDeploymentSample, K8sPodSample, K8sContainerSample UNTIL 1 minute ago" } ], "thresholds": [] @@ -275,7 +275,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "SELECT filter(latest(status), WHERE (((`eventType`() IN ('K8sContainerSample', 'K8sPodSample')) AND (((NOT ((status = 'Running')) AND NOT ((status = 'Succeeded'))) AND NOT (status IS NULL)) AND NOT (podName IS NULL))) OR ((`eventType`() = 'K8sNamespaceSample') AND (((NOT ((status = 'Running')) AND NOT ((status = 'Succeeded'))) AND NOT (status IS NULL)) AND NOT (`k8s`.`podName` IS NULL))))) AS `Status`, max(timestamp) AS `Timestamp` FROM K8sContainerSample, K8sNamespaceSample, K8sPodSample FACET tuple(clusterName AS `Cluster Name`, namespaceName AS `Namespace`, (`conditional`(WHERE (`eventType`() IN ('K8sContainerSample', 'K8sPodSample')), podName) OR `conditional`(WHERE (`eventType`() = 'K8sNamespaceSample'), k8s.podName)) AS `Pod Name`) LIMIT 100 " + "query": "SELECT latest(status) as 'Status', max(timestamp) as 'Timestamp' from K8sPodSample WHERE status NOT IN ('Running', 'Succeeded') facet clusterName, namespace, podName since 10 minutes ago UNTIL 1 minute ago limit 100" } ] } @@ -368,7 +368,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric select latest('k8s.volume.fsUsedPercent') facet k8s.podName, k8s.volumeName, k8s.pvcName where k8s.volume.fsUsedPercent > 90 SINCE 10 minutes ago UNTIL 1 minute ago" + "query": "FROM K8sVolumeSample SELECT latest(fsUsedPercent) facet podName, volumeName, pvcName TIMESERIES" } ] } @@ -538,7 +538,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric SELECT filter(uniqueCount(k8s.nodeName), WHERE `label.eks.amazonaws.com/compute-type` IS NULL AND k8s.podName IS NULL) as 'Nodes' since 30 minutes ago" + "query": "FROM K8sNodeSample SELECT uniqueCount(nodeName) as 'Nodes' WHERE `label.eks.amazonaws.com/compute-type` IS NULL since 30 minutes ago" } ], "thresholds": [] @@ -561,7 +561,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric SELECT filter(uniqueCount(k8s.nodeName), WHERE `label.eks.amazonaws.com/compute-type` IS NOT NULL AND k8s.podName IS NULL) as 'Serverless Nodes'" + "query": "FROM K8sNodeSample SELECT uniqueCount(nodeName) as 'Serverless Nodes' WHERE `label.eks.amazonaws.com/compute-type` IS NULL since 30 minutes ago" } ], "thresholds": [] @@ -604,7 +604,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric select uniqueCount(k8s.podName) as 'Running Pods' where k8s.status = 'Running' since 30 minutes ago" + "query": "FROM K8sPodSample select uniqueCount(podName) as 'Running Pods' where status = 'Running' since 30 minutes ago" } ] } @@ -625,7 +625,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric select filter(uniqueCount(k8s.podName), where k8s.status = 'Running') / filter(uniqueCount(k8s.podName), where k8s.status in ('Running','Pending')) * 100 as '% Pods Running' since 30 minutes ago" + "query": "FROM K8sPodSample select filter(uniqueCount(podName), where status = 'Running') / filter(uniqueCount(podName), where status in ('Running','Pending')) * 100 as '% Pods Running' since 30 minutes ago" } ] } @@ -647,7 +647,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric SELECT filter(uniqueCount(k8s.namespaceName, k8s.clusterName), WHERE `metricName` = 'k8s.namespace.createdAt') as 'Namespaces' since 30 minutes ago" + "query": "FROM K8sPodSample select uniqueCount(namespaceName) as 'Namespaces' since 30 minutes ago" } ], "thresholds": [] @@ -670,7 +670,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric select filter(uniqueCount(k8s.deploymentName, k8s.clusterName), WHERE `metricName` = 'k8s.deployment.createdAt') as 'Deployments' since 30 minutes ago" + "query": "FROM K8sPodSample select uniqueCount(deploymentName) as 'Deployments' since 30 minutes ago" } ], "thresholds": [] @@ -761,7 +761,7 @@ "nrqlQueries": [ { "accountId": 0, - "query": "FROM Metric select uniqueCount(k8s.podName) as 'Total Pods', filter(uniqueCount(k8s.podName), where k8s.status = 'Running') as 'Running Pods', filter(uniqueCount(k8s.podName), where k8s.status = 'Pending') as 'Pending Pods', filter(uniqueCount(k8s.podName), where k8s.status = 'Failed') as 'Failed Pods' since 30 minutes ago" + "query": "from K8sPodSample select uniqueCount(podName) as 'Total Pods', filter(uniqueCount(podName), where status = 'Running') as 'Running Pods', filter(uniqueCount(podName), where status = 'Pending') as 'Pending Pods', filter(uniqueCount(podName), where status = 'Failed') as 'Failed Pods' since 30 minutes ago" } ] }