diff --git a/metricbeat/docs/images/metricbeat_coredns_dashboard.png b/metricbeat/docs/images/metricbeat_coredns_dashboard.png new file mode 100644 index 00000000000..c64aa2e93d2 Binary files /dev/null and b/metricbeat/docs/images/metricbeat_coredns_dashboard.png differ diff --git a/metricbeat/docs/modules_list.asciidoc b/metricbeat/docs/modules_list.asciidoc index ee2e22de58c..57ccb7f095b 100644 --- a/metricbeat/docs/modules_list.asciidoc +++ b/metricbeat/docs/modules_list.asciidoc @@ -25,7 +25,7 @@ This file is generated! See scripts/docs_collector.py |<> |<> beta[] |image:./images/icon-no.png[No prebuilt dashboards] | .1+| .1+| |<> beta[] -|<> beta[] |image:./images/icon-no.png[No prebuilt dashboards] | +|<> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] | .1+| .1+| |<> beta[] |<> |image:./images/icon-no.png[No prebuilt dashboards] | .3+| .3+| |<> diff --git a/metricbeat/module/coredns/_meta/kibana/7/dashboard/Metricbeat-coredns-overview.json b/metricbeat/module/coredns/_meta/kibana/7/dashboard/Metricbeat-coredns-overview.json new file mode 100644 index 00000000000..7a13c840488 --- /dev/null +++ b/metricbeat/module/coredns/_meta/kibana/7/dashboard/Metricbeat-coredns-overview.json @@ -0,0 +1,1371 @@ +{ + "objects": [ + { + "attributes": { + "description": "Overview of CoreDNS server metrics.", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "query": { + "language": "lucene", + "query": "" + } + } + }, + "optionsJSON": { + "darkTheme": false, + "hidePanelTitles": false, + "useMargins": true + }, + "panelsJSON": [ + { + "embeddableConfig": {}, + "gridData": { + "h": 10, + "i": "1", + "w": 10, + "x": 0, + "y": 0 + }, + "panelIndex": "1", + "panelRefName": "panel_0", + "version": "6.7.0" + }, + { + "embeddableConfig": {}, + "gridData": { + "h": 10, + "i": "2", + "w": 14, + "x": 10, + "y": 0 + }, + "panelIndex": "2", + "panelRefName": "panel_1", + "version": "6.7.0" + }, + { + "embeddableConfig": { + "vis": { + "colors": { + "NXDOMAIN": "#99440A" + } + } + }, + "gridData": { + "h": 15, + "i": "3", + "w": 19, + "x": 24, + "y": 25 + }, + "panelIndex": "3", + "panelRefName": "panel_2", + "version": "6.7.0" + }, + { + "embeddableConfig": {}, + "gridData": { + "h": 14, + "i": "10", + "w": 24, + "x": 0, + "y": 40 + }, + "panelIndex": "10", + "panelRefName": "panel_3", + "version": "6.7.0" + }, + { + "embeddableConfig": { + "vis": { + "colors": { + "tcp - 1": "#B7DBAB", + "udp - 1": "#5195CE" + }, + "legendOpen": true + } + }, + "gridData": { + "h": 10, + "i": "11", + "w": 19, + "x": 24, + "y": 0 + }, + "panelIndex": "11", + "panelRefName": "panel_4", + "version": "7.0.0" + }, + { + "embeddableConfig": {}, + "gridData": { + "h": 15, + "i": "12", + "w": 19, + "x": 24, + "y": 10 + }, + "panelIndex": "12", + "panelRefName": "panel_5", + "version": "7.0.0" + }, + { + "embeddableConfig": {}, + "gridData": { + "h": 15, + "i": "15", + "w": 24, + "x": 0, + "y": 10 + }, + "panelIndex": "15", + "panelRefName": "panel_6", + "version": "7.0.0" + }, + { + "embeddableConfig": {}, + "gridData": { + "h": 15, + "i": "16", + "w": 24, + "x": 0, + "y": 25 + }, + "panelIndex": "16", + "panelRefName": "panel_7", + "version": "7.0.0" + } + ], + "timeRestore": false, + "title": "[Metricbeat CoreDNS] Overview ECS", + "version": 1 + }, + "id": "Metricbeat-CoreDNS-Dashboard-ecs", + "migrationVersion": { + "dashboard": "7.0.0" + }, + "references": [ + { + "id": "36e08510-53c4-11e9-b466-9be470bbd327-ecs", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "a19df590-53c4-11e9-b466-9be470bbd327-ecs", + "name": "panel_1", + "type": "visualization" + }, + { + "id": "27da53f0-53d5-11e9-b466-9be470bbd327-ecs", + "name": "panel_2", + "type": "visualization" + }, + { + "id": "277fc650-67a9-11e9-a534-715561d0bf42", + "name": "panel_3", + "type": "visualization" + }, + { + "id": "86177430-728d-11e9-b0d0-414c3011ddbb", + "name": "panel_4", + "type": "visualization" + }, + { + "id": "a58345f0-7298-11e9-b0d0-414c3011ddbb", + "name": "panel_5", + "type": "visualization" + }, + { + "id": "57c74300-7308-11e9-b0d0-414c3011ddbb", + "name": "panel_6", + "type": "visualization" + }, + { + "id": "4804eaa0-7315-11e9-b0d0-414c3011ddbb", + "name": "panel_7", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2019-05-10T11:25:44.629Z", + "version": "WzE3MzcsMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "exists": { + "field": "coredns.stats.panic.count" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "coredns.stats.panic.count", + "negate": false, + "type": "exists", + "value": "exists" + } + } + ], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "lucene", + "query": "" + } + } + }, + "title": "Panic Count [Metricbeat CoreDNS] ECS", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "field": "coredns.stats.panic.count", + "percents": [ + 100 + ] + }, + "schema": "metric", + "type": "percentiles" + } + ], + "params": { + "addLegend": false, + "addTooltip": true, + "metric": { + "colorSchema": "Green to Red", + "colorsRange": [ + { + "from": 0, + "to": 10000 + } + ], + "invertColors": false, + "labels": { + "show": false + }, + "metricColorMode": "None", + "percentageMode": false, + "style": { + "bgColor": false, + "bgFill": "#000", + "fontSize": 60, + "labelColor": false, + "subText": "" + }, + "useRanges": false + }, + "type": "metric" + }, + "title": "Panic Count [Metricbeat CoreDNS] ECS", + "type": "metric" + } + }, + "id": "36e08510-53c4-11e9-b466-9be470bbd327-ecs", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [ + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-05-10T07:46:22.258Z", + "version": "WzE1MjcsMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "exists": { + "field": "coredns.stats.dns.request.do.count" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "coredns.stats.dns.request.do.count", + "negate": false, + "type": "exists", + "value": "exists" + } + } + ], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "lucene", + "query": "" + } + } + }, + "title": "DO Count [Metricbeat CoreDNS] ECS", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "customLabel": "DO Count", + "field": "coredns.stats.dns.request.do.count", + "percents": [ + 100 + ] + }, + "schema": "metric", + "type": "percentiles" + } + ], + "params": { + "addLegend": false, + "addTooltip": true, + "metric": { + "colorSchema": "Green to Red", + "colorsRange": [ + { + "from": 0, + "to": 10000 + } + ], + "invertColors": false, + "labels": { + "show": false + }, + "metricColorMode": "None", + "percentageMode": false, + "style": { + "bgColor": false, + "bgFill": "#000", + "fontSize": 60, + "labelColor": false, + "subText": "" + }, + "useRanges": false + }, + "type": "metric" + }, + "title": "DO Count [Metricbeat CoreDNS] ECS", + "type": "metric" + } + }, + "id": "a19df590-53c4-11e9-b466-9be470bbd327-ecs", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [ + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-05-10T07:46:22.258Z", + "version": "WzE1MjgsMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "lucene", + "query": "" + } + } + }, + "title": "Responses by Rcode [Metricbeat CoreDNS] ECS", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "customLabel": "Response per rcode", + "field": "coredns.stats.dns.response.rcode.count" + }, + "schema": "metric", + "type": "avg" + }, + { + "enabled": true, + "id": "5", + "params": { + "customLabel": "server", + "field": "coredns.stats.server", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "row": true, + "size": 5 + }, + "schema": "split", + "type": "terms" + }, + { + "enabled": true, + "id": "3", + "params": { + "customInterval": "2h", + "drop_partials": false, + "extended_bounds": {}, + "field": "@timestamp", + "interval": "auto", + "min_doc_count": 1, + "timeRange": { + "from": "now-15m", + "to": "now" + }, + "useNormalizedEsInterval": true + }, + "schema": "segment", + "type": "date_histogram" + }, + { + "enabled": true, + "id": "4", + "params": { + "field": "coredns.stats.rcode", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "group", + "type": "terms" + }, + { + "enabled": true, + "id": "6", + "params": { + "field": "coredns.stats.zone", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "group", + "type": "terms" + } + ], + "params": { + "addLegend": true, + "addTimeMarker": false, + "addTooltip": true, + "categoryAxes": [ + { + "id": "CategoryAxis-1", + "labels": { + "show": true, + "truncate": 100 + }, + "position": "bottom", + "scale": { + "type": "linear" + }, + "show": true, + "style": {}, + "title": {}, + "type": "category" + } + ], + "grid": { + "categoryLines": false, + "style": { + "color": "#eee" + } + }, + "legendPosition": "right", + "seriesParams": [ + { + "data": { + "id": "1", + "label": "Response per rcode" + }, + "drawLinesBetweenPoints": true, + "interpolate": "linear", + "lineWidth": 1, + "mode": "normal", + "show": "true", + "showCircles": true, + "type": "line", + "valueAxis": "ValueAxis-1" + } + ], + "times": [], + "type": "line", + "valueAxes": [ + { + "id": "ValueAxis-1", + "labels": { + "filter": false, + "rotate": 0, + "show": true, + "truncate": 100 + }, + "name": "LeftAxis-1", + "position": "left", + "scale": { + "mode": "normal", + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "Response per rcode" + }, + "type": "value" + } + ] + }, + "title": "Responses by Rcode [Metricbeat CoreDNS] ECS", + "type": "line" + } + }, + "id": "27da53f0-53d5-11e9-b466-9be470bbd327-ecs", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [ + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-05-10T07:46:22.258Z", + "version": "WzE1MjksMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "lucene", + "query": "" + } + } + }, + "title": " Cache Hits, Misses [Metricbeat CoreDNS] ECS", + "uiStateJSON": { + "vis": { + "colors": { + "Average coredns.stats.dns.cache.misses.count": "#E24D42", + "Hits": "#9AC48A", + "Misses": "#EA6460" + } + } + }, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "customLabel": "Hits", + "field": "coredns.stats.dns.cache.hits.count" + }, + "schema": "metric", + "type": "max" + }, + { + "enabled": true, + "id": "2", + "params": { + "customInterval": "2h", + "drop_partials": false, + "extended_bounds": {}, + "field": "@timestamp", + "interval": "auto", + "min_doc_count": 0, + "timeRange": { + "from": "now-30m", + "to": "now" + }, + "useNormalizedEsInterval": true + }, + "schema": "segment", + "type": "date_histogram" + }, + { + "enabled": true, + "id": "3", + "params": { + "customLabel": "Misses", + "field": "coredns.stats.dns.cache.misses.count" + }, + "schema": "metric", + "type": "max" + }, + { + "enabled": true, + "id": "4", + "params": { + "customLabel": "server", + "field": "coredns.stats.server", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "row": true, + "size": 5 + }, + "schema": "split", + "type": "terms" + } + ], + "params": { + "addLegend": true, + "addTimeMarker": false, + "addTooltip": true, + "categoryAxes": [ + { + "id": "CategoryAxis-1", + "labels": { + "show": true, + "truncate": 100 + }, + "position": "bottom", + "scale": { + "type": "linear" + }, + "show": true, + "style": {}, + "title": {}, + "type": "category" + } + ], + "grid": { + "categoryLines": false, + "style": { + "color": "#eee" + } + }, + "legendPosition": "right", + "seriesParams": [ + { + "data": { + "id": "1", + "label": "Hits" + }, + "drawLinesBetweenPoints": true, + "mode": "normal", + "show": "true", + "showCircles": true, + "type": "line", + "valueAxis": "ValueAxis-1" + }, + { + "data": { + "id": "3", + "label": "Misses" + }, + "drawLinesBetweenPoints": true, + "mode": "normal", + "show": true, + "showCircles": true, + "type": "line", + "valueAxis": "ValueAxis-2" + } + ], + "times": [], + "type": "line", + "valueAxes": [ + { + "id": "ValueAxis-1", + "labels": { + "filter": false, + "rotate": 0, + "show": true, + "truncate": 100 + }, + "name": "LeftAxis-1", + "position": "left", + "scale": { + "defaultYExtents": false, + "mode": "normal", + "setYExtents": false, + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "Hits" + }, + "type": "value" + }, + { + "id": "ValueAxis-2", + "labels": { + "filter": false, + "rotate": 0, + "show": true, + "truncate": 100 + }, + "name": "RightAxis-1", + "position": "right", + "scale": { + "mode": "normal", + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "Misses" + }, + "type": "value" + } + ] + }, + "title": " Cache Hits, Misses [Metricbeat CoreDNS] ECS", + "type": "line" + } + }, + "id": "277fc650-67a9-11e9-a534-715561d0bf42", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [ + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-05-10T07:46:22.258Z", + "version": "WzE1MzAsMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "title": "Requests by Zone [Metricbeat CoreDNS] ECS", + "uiStateJSON": { + "vis": { + "legendOpen": true + } + }, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "aggregate": "max", + "customLabel": "Request count", + "field": "coredns.stats.dns.request.count", + "size": 1, + "sortField": "@timestamp", + "sortOrder": "desc" + }, + "schema": "metric", + "type": "top_hits" + }, + { + "enabled": true, + "id": "2", + "params": { + "customLabel": "server", + "field": "coredns.stats.server", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "_key", + "otherBucket": false, + "otherBucketLabel": "Other", + "row": true, + "size": 5 + }, + "schema": "split", + "type": "terms" + }, + { + "enabled": true, + "id": "4", + "params": { + "customLabel": "zone", + "field": "coredns.stats.zone", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "_key", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "segment", + "type": "terms" + }, + { + "enabled": true, + "id": "5", + "params": { + "customLabel": "protocol", + "field": "coredns.stats.proto", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "_key", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "group", + "type": "terms" + }, + { + "enabled": true, + "id": "6", + "params": { + "customLabel": "family", + "field": "coredns.stats.family", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "_key", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "group", + "type": "terms" + } + ], + "params": { + "addLegend": true, + "addTimeMarker": false, + "addTooltip": true, + "categoryAxes": [ + { + "id": "CategoryAxis-1", + "labels": { + "filter": true, + "rotate": 0, + "show": true, + "truncate": 200 + }, + "position": "left", + "scale": { + "type": "linear" + }, + "show": true, + "style": {}, + "title": {}, + "type": "category" + } + ], + "grid": { + "categoryLines": false + }, + "legendPosition": "right", + "orderBucketsBySum": false, + "seriesParams": [ + { + "data": { + "id": "1", + "label": "Request count" + }, + "drawLinesBetweenPoints": true, + "mode": "stacked", + "show": true, + "showCircles": true, + "type": "histogram", + "valueAxis": "ValueAxis-1" + } + ], + "times": [], + "type": "histogram", + "valueAxes": [ + { + "id": "ValueAxis-1", + "labels": { + "filter": true, + "rotate": 75, + "show": true, + "truncate": 100 + }, + "name": "BottomAxis-1", + "position": "bottom", + "scale": { + "mode": "normal", + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "Request count" + }, + "type": "value" + } + ] + }, + "title": "Requests by Zone [Metricbeat CoreDNS] ECS", + "type": "horizontal_bar" + } + }, + "id": "86177430-728d-11e9-b0d0-414c3011ddbb", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [ + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-05-10T07:46:22.258Z", + "version": "WzE1MzEsMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "title": "Requests by Type [Metricbeat CoreDNS] ECS", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "aggregate": "max", + "customLabel": "Requests", + "field": "coredns.stats.dns.request.type.count", + "size": 1, + "sortField": "@timestamp", + "sortOrder": "desc" + }, + "schema": "metric", + "type": "top_hits" + }, + { + "enabled": true, + "id": "2", + "params": { + "customLabel": "server", + "field": "coredns.stats.server", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "_key", + "otherBucket": false, + "otherBucketLabel": "Other", + "row": true, + "size": 5 + }, + "schema": "split", + "type": "terms" + }, + { + "enabled": true, + "id": "3", + "params": { + "customInterval": "2h", + "drop_partials": false, + "extended_bounds": {}, + "field": "@timestamp", + "interval": "auto", + "min_doc_count": 1, + "timeRange": { + "from": "now-15m", + "to": "now" + }, + "useNormalizedEsInterval": true + }, + "schema": "segment", + "type": "date_histogram" + }, + { + "enabled": true, + "id": "4", + "params": { + "field": "coredns.stats.zone", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "_key", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "group", + "type": "terms" + }, + { + "enabled": true, + "id": "5", + "params": { + "field": "coredns.stats.type", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "desc", + "orderBy": "_key", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 5 + }, + "schema": "group", + "type": "terms" + } + ], + "params": { + "addLegend": true, + "addTimeMarker": false, + "addTooltip": true, + "categoryAxes": [ + { + "id": "CategoryAxis-1", + "labels": { + "show": true, + "truncate": 100 + }, + "position": "bottom", + "scale": { + "type": "linear" + }, + "show": true, + "style": {}, + "title": {}, + "type": "category" + } + ], + "grid": { + "categoryLines": false + }, + "legendPosition": "right", + "seriesParams": [ + { + "data": { + "id": "1", + "label": "Requests" + }, + "drawLinesBetweenPoints": true, + "mode": "normal", + "show": "true", + "showCircles": true, + "type": "line", + "valueAxis": "ValueAxis-1" + } + ], + "times": [], + "type": "line", + "valueAxes": [ + { + "id": "ValueAxis-1", + "labels": { + "filter": false, + "rotate": 0, + "show": true, + "truncate": 100 + }, + "name": "LeftAxis-1", + "position": "left", + "scale": { + "mode": "normal", + "type": "linear" + }, + "show": true, + "style": {}, + "title": { + "text": "Requests" + }, + "type": "value" + } + ] + }, + "title": "Requests by Type [Metricbeat CoreDNS] ECS", + "type": "line" + } + }, + "id": "a58345f0-7298-11e9-b0d0-414c3011ddbb", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [ + { + "id": "metricbeat-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2019-05-10T07:46:22.258Z", + "version": "WzE1MzIsMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "title": "Avg Request Duration (cumulative) [Metricbeat CoreDNS] ECS", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [], + "params": { + "axis_formatter": "number", + "axis_position": "left", + "axis_scale": "normal", + "default_index_pattern": "metricbeat-*", + "id": "61ca57f0-469d-11e7-af02-69e470af7417", + "index_pattern": "", + "interval": "auto", + "series": [ + { + "axis_position": "right", + "chart_type": "line", + "color": "#68BC00", + "fill": "0.1", + "filter": "", + "formatter": "number", + "id": "61ca57f1-469d-11e7-af02-69e470af7417", + "label": "Avg Request Duration (ms)", + "line_width": 1, + "metrics": [ + { + "agg_with": "max", + "field": "coredns.stats.dns.request.duration.ns.sum", + "id": "61ca57f2-469d-11e7-af02-69e470af7417", + "order": "desc", + "order_by": "@timestamp", + "size": 1, + "type": "sum" + }, + { + "agg_with": "max", + "field": "coredns.stats.dns.request.duration.ns.count", + "id": "f6c82d30-7307-11e9-aba0-4f43d70788c6", + "order": "desc", + "order_by": "@timestamp", + "size": 1, + "type": "sum" + }, + { + "id": "1d9de350-7308-11e9-aba0-4f43d70788c6", + "script": "params.sum / params.count / 1e6", + "type": "calculation", + "variables": [ + { + "field": "61ca57f2-469d-11e7-af02-69e470af7417", + "id": "20eee310-7308-11e9-aba0-4f43d70788c6", + "name": "sum" + }, + { + "field": "f6c82d30-7307-11e9-aba0-4f43d70788c6", + "id": "2e4139f0-7308-11e9-aba0-4f43d70788c6", + "name": "count" + } + ] + } + ], + "point_size": 1, + "separate_axis": 0, + "split_filters": [ + { + "color": "#68BC00", + "filter": "", + "id": "505e0670-7309-11e9-aba0-4f43d70788c6", + "label": "" + } + ], + "split_mode": "terms", + "stacked": "none", + "steps": 0, + "terms_field": "coredns.stats.zone", + "terms_order_by": "61ca57f2-469d-11e7-af02-69e470af7417", + "value_template": "{{value}} ms" + } + ], + "show_grid": 1, + "show_legend": 1, + "time_field": "@timestamp", + "type": "timeseries" + }, + "title": "Avg Request Duration (cumulative) [Metricbeat CoreDNS] ECS", + "type": "metrics" + } + }, + "id": "57c74300-7308-11e9-b0d0-414c3011ddbb", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2019-05-10T11:07:14.131Z", + "version": "WzE3MzQsMV0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "title": "Avg Request Size (cumulative) [Metricbeat CoreDNS] ECS", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [], + "params": { + "axis_formatter": "number", + "axis_position": "left", + "axis_scale": "normal", + "default_index_pattern": "metricbeat-*", + "id": "61ca57f0-469d-11e7-af02-69e470af7417", + "index_pattern": "", + "interval": "auto", + "series": [ + { + "axis_position": "right", + "chart_type": "line", + "color": "rgba(228,155,238,1)", + "fill": "0.1", + "formatter": "number", + "id": "61ca57f1-469d-11e7-af02-69e470af7417", + "label": "Avg Request Size (bytes)", + "line_width": 1, + "metrics": [ + { + "field": "coredns.stats.dns.request.size.bytes.sum", + "id": "61ca57f2-469d-11e7-af02-69e470af7417", + "type": "sum" + }, + { + "field": "coredns.stats.dns.request.size.bytes.count", + "id": "98fe65e0-7314-11e9-8e06-d9a616f1e6f2", + "type": "sum" + }, + { + "id": "ab81ee30-7314-11e9-8e06-d9a616f1e6f2", + "script": "params.sum / params.count", + "type": "calculation", + "variables": [ + { + "field": "61ca57f2-469d-11e7-af02-69e470af7417", + "id": "aeed53c0-7314-11e9-8e06-d9a616f1e6f2", + "name": "sum" + }, + { + "field": "98fe65e0-7314-11e9-8e06-d9a616f1e6f2", + "id": "b84dd700-7314-11e9-8e06-d9a616f1e6f2", + "name": "count" + } + ] + } + ], + "point_size": 1, + "separate_axis": 0, + "split_mode": "terms", + "stacked": "none", + "terms_field": "coredns.stats.zone", + "value_template": "{{value}} bytes" + } + ], + "show_grid": 1, + "show_legend": 1, + "time_field": "@timestamp", + "type": "timeseries" + }, + "title": "Avg Request Size (cumulative) [Metricbeat CoreDNS] ECS", + "type": "metrics" + } + }, + "id": "4804eaa0-7315-11e9-b0d0-414c3011ddbb", + "migrationVersion": { + "visualization": "7.0.0" + }, + "references": [], + "type": "visualization", + "updated_at": "2019-05-10T11:18:05.129Z", + "version": "WzE3MzUsMV0=" + } + ], + "version": "7.0.0" +} diff --git a/metricbeat/module/coredns/module.yaml b/metricbeat/module/coredns/module.yaml new file mode 100644 index 00000000000..62788cbf16d --- /dev/null +++ b/metricbeat/module/coredns/module.yaml @@ -0,0 +1,3 @@ +dashboards: + - id: Metricbeat-CoreDNS-Dashboard + file: Metricbeat-coredns-overview.json diff --git a/metricbeat/module/coredns/stats/README.md b/metricbeat/module/coredns/stats/README.md new file mode 100644 index 00000000000..87fa17dc9eb --- /dev/null +++ b/metricbeat/module/coredns/stats/README.md @@ -0,0 +1,69 @@ +# CoreDNS Stats + +## Version history + +- May 2019, `v1.5.0` + +## Resources + +- https://github.com/coredns/coredns/tree/master/plugin/metrics +- https://coredns.io/manual/configuration/ + +## Setup environment for manual tests + +Write this contents to `corefile` + +``` +# Zone1 +domain.elastic:1053 { + log + errors + auto + reload 10s + cache 4 + + prometheus :9153 + + hosts { + 127.0.0.1 my.domain.elastic + 192.168.0.1 theirs.domain.elastic + fallthrough + } +} + +# Zone2 +.:1053 { + log + errors + prometheus :9153 + cache 4 + + forward . 8.8.8.8 8.8.4.4 +} +``` + +It creates 2 zones listening on port 1053, prometheus metrics can be gathered at port 9153 +Requests for `my.domain.elastic` and `theirs.domain.elastic` will be resolved locally +Any other request will be forwarded to google's DNSs. +Cache plugin is activated + +For manual testing you can open a number of terminals and use `watch` with any of these commands: + +``` +dig @localhost -p 1053 TXT apache.org + +dig @localhost -p 1053 A google.com + +dig @localhost -p 1053 MX google.com + +dig @localhost -p 1053 A my.domain.elastic + +dig @localhost -p 1053 A theirs.domain.elastic +tcp + +``` + +Metrics can be manually retrieved using + +``` +curl localhost:9153/metrics +```