diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 27a2a77064e..fd4ac467771 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -674,6 +674,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add state_daemonset metricset for Kubernetes Metricbeat module {pull}20649[20649] - Add host inventory metrics to azure compute_vm metricset. {pull}20641[20641] - Add host inventory metrics to googlecloud compute metricset. {pull}20391[20391] +- Add billing data collection from Cost Explorer into aws billing metricset. {pull}20527[20527] {issue}20103[20103] - Migrate `compute_vm` metricset to a light one, map `cloud.instance.id` field. {pull}20889[20889] - Request prometheus endpoints to be gzipped by default {pull}20766[20766] - Release all kubernetes `state` metricsets as GA {pull}20901[20901] diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index 0a48bcf033c..ae34419db2e 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -1569,8 +1569,7 @@ type: object - -*`aws.billing.metrics.EstimatedCharges.max`*:: +*`aws.billing.EstimatedCharges`*:: + -- Maximum estimated charges for AWS acccount. @@ -1579,6 +1578,166 @@ type: long -- +*`aws.billing.Currency`*:: ++ +-- +Estimated charges currency unit. + +type: keyword + +-- + +*`aws.billing.ServiceName`*:: ++ +-- +Service name for the maximum estimated charges. + +type: keyword + +-- + + +*`aws.billing.AmortizedCost.amount`*:: ++ +-- +Amortized cost amount + +type: double + +-- + +*`aws.billing.AmortizedCost.unit`*:: ++ +-- +Amortized cost unit + +type: keyword + +-- + + +*`aws.billing.BlendedCost.amount`*:: ++ +-- +Blended cost amount + +type: double + +-- + +*`aws.billing.BlendedCost.unit`*:: ++ +-- +Blended cost unit + +type: keyword + +-- + + +*`aws.billing.NormalizedUsageAmount.amount`*:: ++ +-- +Normalized usage amount + +type: double + +-- + +*`aws.billing.NormalizedUsageAmount.unit`*:: ++ +-- +Normalized usage amount unit + +type: keyword + +-- + + +*`aws.billing.UnblendedCost.amount`*:: ++ +-- +Unblended cost amount + +type: double + +-- + +*`aws.billing.UnblendedCost.unit`*:: ++ +-- +Unblended cost unit + +type: keyword + +-- + + +*`aws.billing.UsageQuantity.amount`*:: ++ +-- +Usage quantity amount + +type: double + +-- + +*`aws.billing.UsageQuantity.unit`*:: ++ +-- +Usage quantity unit + +type: keyword + +-- + +*`aws.billing.start_date`*:: ++ +-- +Start date for retrieving AWS costs + +type: keyword + +-- + +*`aws.billing.end_date`*:: ++ +-- +End date for retrieving AWS costs + +type: keyword + +-- + + +*`aws.billing.group_definition.key`*:: ++ +-- +The string that represents a key for a specified group + +type: keyword + +-- + +*`aws.billing.group_definition.type`*:: ++ +-- +The string that represents the type of group + +type: keyword + +-- + +*`aws.billing.group_by.*`*:: ++ +-- +Cost explorer group by key values + + +type: object + +-- + [float] === cloudwatch diff --git a/metricbeat/docs/images/metricbeat-aws-billing-overview.png b/metricbeat/docs/images/metricbeat-aws-billing-overview.png index 9544b1fa8a8..283f2398f99 100644 Binary files a/metricbeat/docs/images/metricbeat-aws-billing-overview.png and b/metricbeat/docs/images/metricbeat-aws-billing-overview.png differ diff --git a/x-pack/metricbeat/include/list.go b/x-pack/metricbeat/include/list.go index ea6ab5697b0..6fdb2a7f7ab 100644 --- a/x-pack/metricbeat/include/list.go +++ b/x-pack/metricbeat/include/list.go @@ -12,6 +12,7 @@ import ( _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/appsearch" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/appsearch/stats" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws" + _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/billing" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/cloudwatch" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/ec2" _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/rds" diff --git a/x-pack/metricbeat/module/aws/_meta/config.yml b/x-pack/metricbeat/module/aws/_meta/config.yml index 34d2d9f5c55..618ed4cd854 100644 --- a/x-pack/metricbeat/module/aws/_meta/config.yml +++ b/x-pack/metricbeat/module/aws/_meta/config.yml @@ -30,11 +30,16 @@ - sns - sqs - module: aws - period: 12h + period: 24h metricsets: - billing - regions: - - us-east-1 + cost_explorer_config: + group_by_dimension_keys: + - "AZ" + - "INSTANCE_TYPE" + - "SERVICE" +# group_by_tag_keys: +# - "aws:createdBy" - module: aws period: 24h metricsets: diff --git a/x-pack/metricbeat/module/aws/_meta/kibana/7/dashboard/Metricbeat-aws-billing-overview.json b/x-pack/metricbeat/module/aws/_meta/kibana/7/dashboard/Metricbeat-aws-billing-overview.json index 2f0b054ebe7..6a601bc7471 100644 --- a/x-pack/metricbeat/module/aws/_meta/kibana/7/dashboard/Metricbeat-aws-billing-overview.json +++ b/x-pack/metricbeat/module/aws/_meta/kibana/7/dashboard/Metricbeat-aws-billing-overview.json @@ -25,62 +25,126 @@ "gridData": { "h": 5, "i": "89dccfe8-a25e-44ea-afdb-ff01ab1f05d6", - "w": 16, + "w": 9, "x": 0, "y": 0 }, "panelIndex": "89dccfe8-a25e-44ea-afdb-ff01ab1f05d6", "panelRefName": "panel_0", "title": "AWS Account Filter", - "version": "7.4.0" + "version": "7.9.0" }, { "embeddableConfig": { - "title": "Estimated Billing Chart" + "title": "Current Total Unblended Cost" }, "gridData": { - "h": 16, - "i": "26670498-b079-4447-bbc8-e4ca8215898c", - "w": 32, - "x": 16, + "h": 18, + "i": "f1db16b5-ce0a-4f21-885f-434c16346c26", + "w": 8, + "x": 9, "y": 0 }, - "panelIndex": "26670498-b079-4447-bbc8-e4ca8215898c", + "panelIndex": "f1db16b5-ce0a-4f21-885f-434c16346c26", "panelRefName": "panel_1", - "title": "Estimated Billing Chart", - "version": "7.4.0" + "title": "Current Total Unblended Cost", + "version": "7.9.0" }, { "embeddableConfig": { - "title": "Total Estimated Charges" + "title": "Availability Zone Utilization" }, "gridData": { - "h": 11, + "h": 18, + "i": "57912f48-42ec-4d3e-ba54-bf94757d1eec", + "w": 31, + "x": 17, + "y": 0 + }, + "panelIndex": "57912f48-42ec-4d3e-ba54-bf94757d1eec", + "panelRefName": "panel_2", + "title": "Availability Zone Utilization", + "version": "7.9.0" + }, + { + "embeddableConfig": { + "title": "Total Estimated Charges For This Month" + }, + "gridData": { + "h": 13, "i": "221aab02-2747-4d84-9dde-028ccd51bdce", - "w": 16, + "w": 9, "x": 0, "y": 5 }, "panelIndex": "221aab02-2747-4d84-9dde-028ccd51bdce", - "panelRefName": "panel_2", - "title": "Total Estimated Charges", - "version": "7.4.0" + "panelRefName": "panel_3", + "title": "Total Estimated Charges For This Month", + "version": "7.9.0" }, { "embeddableConfig": { - "title": "Top 10 Estimated Billing Per Service Name" + "title": "Cost Per Service Per User" }, "gridData": { - "h": 15, - "i": "21e91e6b-0ff0-42ba-9132-6f30c5c6bbb7", - "w": 48, + "h": 20, + "i": "376f236b-1365-4e80-8076-eec88c1a67bd", + "w": 24, "x": 0, - "y": 16 + "y": 18 }, - "panelIndex": "21e91e6b-0ff0-42ba-9132-6f30c5c6bbb7", - "panelRefName": "panel_3", - "title": "Top 10 Estimated Billing Per Service Name", - "version": "7.4.0" + "panelIndex": "376f236b-1365-4e80-8076-eec88c1a67bd", + "panelRefName": "panel_4", + "title": "Cost Per Service Per User", + "version": "7.9.0" + }, + { + "embeddableConfig": { + "title": "High Spenders" + }, + "gridData": { + "h": 20, + "i": "dd5220c2-dc8a-4d3e-964b-6137d1e447ad", + "w": 24, + "x": 24, + "y": 18 + }, + "panelIndex": "dd5220c2-dc8a-4d3e-964b-6137d1e447ad", + "panelRefName": "panel_5", + "title": "High Spenders", + "version": "7.9.0" + }, + { + "embeddableConfig": { + "title": "Top 10 Estimated Charges per Service Name" + }, + "gridData": { + "h": 18, + "i": "1de716e2-bad9-4fe3-ba49-0e2ea2a59bb4", + "w": 24, + "x": 0, + "y": 38 + }, + "panelIndex": "1de716e2-bad9-4fe3-ba49-0e2ea2a59bb4", + "panelRefName": "panel_6", + "title": "Top 10 Estimated Charges per Service Name", + "version": "7.9.0" + }, + { + "embeddableConfig": { + "title": "Daily Unblended Cost" + }, + "gridData": { + "h": 18, + "i": "60181fec-fea9-4f99-b5f9-a53ffbc2ac65", + "w": 24, + "x": 24, + "y": 38 + }, + "panelIndex": "60181fec-fea9-4f99-b5f9-a53ffbc2ac65", + "panelRefName": "panel_7", + "title": "Daily Unblended Cost", + "version": "7.9.0" } ], "timeRestore": false, @@ -91,6 +155,9 @@ "migrationVersion": { "dashboard": "7.3.0" }, + "namespaces": [ + "default" + ], "references": [ { "id": "deab0260-2981-11e9-86eb-a3a07a77f530", @@ -98,24 +165,44 @@ "type": "visualization" }, { - "id": "749cd470-1530-11ea-841c-01bf20a6c8ba", + "id": "1731c440-e649-11ea-a838-3f4a45f85600", "name": "panel_1", "type": "visualization" }, { - "id": "83f08eb0-1532-11ea-841c-01bf20a6c8ba", + "id": "a5670a20-e65a-11ea-a838-3f4a45f85600", "name": "panel_2", "type": "visualization" }, { - "id": "31a4ea90-152b-11ea-841c-01bf20a6c8ba", + "id": "83f08eb0-1532-11ea-841c-01bf20a6c8ba", "name": "panel_3", "type": "visualization" + }, + { + "id": "b3da5ac0-e6f1-11ea-a5b5-d5a0accaec95", + "name": "panel_4", + "type": "lens" + }, + { + "id": "d7b399c0-e6f1-11ea-a5b5-d5a0accaec95", + "name": "panel_5", + "type": "lens" + }, + { + "id": "cde34840-e6f2-11ea-a5b5-d5a0accaec95", + "name": "panel_6", + "type": "lens" + }, + { + "id": "3e091620-e64b-11ea-a838-3f4a45f85600", + "name": "panel_7", + "type": "visualization" } ], "type": "dashboard", - "updated_at": "2020-02-04T15:57:47.353Z", - "version": "WzY3NjQsMV0=" + "updated_at": "2020-09-14T04:08:21.260Z", + "version": "WzcyNjksOF0=" }, { "attributes": { @@ -162,8 +249,11 @@ }, "id": "deab0260-2981-11e9-86eb-a3a07a77f530", "migrationVersion": { - "visualization": "7.3.1" + "visualization": "7.8.0" }, + "namespaces": [ + "default" + ], "references": [ { "id": "metricbeat-*", @@ -172,8 +262,8 @@ } ], "type": "visualization", - "updated_at": "2020-01-27T21:33:20.219Z", - "version": "WzQ2OTAsMV0=" + "updated_at": "2020-09-14T04:04:04.990Z", + "version": "WzY2MDYsOF0=" }, { "attributes": { @@ -181,61 +271,132 @@ "kibanaSavedObjectMeta": { "searchSourceJSON": { "filter": [], - "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", "query": { "language": "kuery", "query": "" } } }, - "title": "Estimated Billing Pie Chart [Metricbeat AWS]", - "uiStateJSON": { - "vis": { - "colors": { - "16": "#629E51", - "272": "#DEDAF7", - "80": "#E24D42", - "running": "#7EB26D", - "stopped": "#E24D42" + "title": "Total Unblended Cost [Metricbeat AWS]", + "uiStateJSON": {}, + "version": 1, + "visState": { + "aggs": [], + "params": { + "axis_formatter": "number", + "axis_position": "left", + "axis_scale": "normal", + "background_color_rules": [ + { + "id": "cf04e620-e648-11ea-bdad-df8839db1393" + } + ], + "default_index_pattern": "metricbeat-*", + "default_timefield": "@timestamp", + "drop_last_bucket": 0, + "filter": { + "language": "kuery", + "query": "aws.billing.group_definition.key : \"AZ\"" }, - "legendOpen": true + "id": "61ca57f0-469d-11e7-af02-69e470af7417", + "index_pattern": "metricbeat-*", + "interval": "\u003e=2d", + "isModelInvalid": false, + "series": [ + { + "axis_position": "right", + "chart_type": "line", + "color": "#68BC00", + "fill": 0.5, + "filter": { + "language": "kuery", + "query": "aws.billing.group_definition.key : \"AZ\"" + }, + "formatter": "number", + "id": "61ca57f1-469d-11e7-af02-69e470af7417", + "label": "Total Unblended Cost", + "line_width": 1, + "metrics": [ + { + "field": "aws.billing.UnblendedCost.amount", + "id": "61ca57f2-469d-11e7-af02-69e470af7417", + "type": "sum" + } + ], + "override_index_pattern": 1, + "point_size": 1, + "separate_axis": 0, + "series_drop_last_bucket": 0, + "series_index_pattern": "metricbeat-*", + "series_interval": "\u003e=2d", + "series_time_field": "@timestamp", + "split_color_mode": "kibana", + "split_mode": "filter", + "stacked": "none", + "type": "timeseries" + } + ], + "show_grid": 1, + "show_legend": 1, + "time_field": "@timestamp", + "time_range_mode": "last_value", + "tooltip_mode": "show_all", + "type": "metric" + }, + "title": "Total Unblended Cost [Metricbeat AWS]", + "type": "metrics" + } + }, + "id": "1731c440-e649-11ea-a838-3f4a45f85600", + "migrationVersion": { + "visualization": "7.8.0" + }, + "namespaces": [ + "default" + ], + "references": [], + "type": "visualization", + "updated_at": "2020-09-14T04:03:51.696Z", + "version": "WzY0NjksOF0=" + }, + { + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } } }, + "title": "Availability Zone Utilization [Metricbeat AWS]", + "uiStateJSON": {}, "version": 1, "visState": { "aggs": [ { "enabled": true, "id": "1", - "params": { - "customLabel": "", - "field": "aws.billing.metrics.EstimatedCharges.max" - }, + "params": {}, "schema": "metric", - "type": "sum" + "type": "count" }, { "enabled": true, "id": "2", "params": { - "customLabel": "", - "field": "aws.dimensions.ServiceName", + "exclude": "NoAZ", + "field": "aws.billing.group_by.AZ", "missingBucket": false, "missingBucketLabel": "Missing", "order": "desc", - "orderAgg": { - "enabled": true, - "id": "2-orderAgg", - "params": { - "field": "aws.billing.metrics.EstimatedCharges.max" - }, - "schema": "orderAgg", - "type": "avg" - }, - "orderBy": "custom", - "otherBucket": true, + "orderBy": "1", + "otherBucket": false, "otherBucketLabel": "Other", - "size": 10 + "size": 20 }, "schema": "segment", "type": "terms" @@ -244,32 +405,7 @@ "params": { "addLegend": true, "addTooltip": true, - "dimensions": { - "buckets": [ - { - "accessor": 0, - "aggType": "terms", - "format": { - "id": "terms", - "params": { - "id": "string", - "missingBucketLabel": "Missing", - "otherBucketLabel": "Other" - } - }, - "params": {} - } - ], - "metric": { - "accessor": 1, - "aggType": "sum", - "format": { - "id": "number" - }, - "params": {} - } - }, - "isDonut": false, + "isDonut": true, "labels": { "last_level": true, "show": true, @@ -279,14 +415,17 @@ "legendPosition": "right", "type": "pie" }, - "title": "Estimated Billing Pie Chart [Metricbeat AWS]", + "title": "Availability Zone Utilization [Metricbeat AWS]", "type": "pie" } }, - "id": "749cd470-1530-11ea-841c-01bf20a6c8ba", + "id": "a5670a20-e65a-11ea-a838-3f4a45f85600", "migrationVersion": { - "visualization": "7.3.1" + "visualization": "7.8.0" }, + "namespaces": [ + "default" + ], "references": [ { "id": "metricbeat-*", @@ -295,8 +434,8 @@ } ], "type": "visualization", - "updated_at": "2020-01-27T21:33:08.924Z", - "version": "WzQ1ODAsMV0=" + "updated_at": "2020-09-14T04:03:51.696Z", + "version": "WzY0NzAsOF0=" }, { "attributes": { @@ -332,6 +471,10 @@ "default_index_pattern": "metricbeat-*", "default_timefield": "@timestamp", "drop_last_bucket": 0, + "filter": { + "language": "kuery", + "query": "aws.billing.EstimatedCharges : * and not (aws.billing.ServiceName : * )" + }, "gauge_color_rules": [ { "id": "e8a045e0-1531-11ea-961e-c1db9cc6166e" @@ -342,7 +485,7 @@ "gauge_width": 10, "id": "61ca57f0-469d-11e7-af02-69e470af7417", "index_pattern": "metricbeat-*", - "interval": "12h", + "interval": "\u003e=1d", "isModelInvalid": false, "series": [ { @@ -352,7 +495,7 @@ "fill": 0.5, "filter": { "language": "kuery", - "query": "not aws.dimensions.ServiceName : * " + "query": "aws.billing.EstimatedCharges : * and not (aws.billing.ServiceName : * )" }, "formatter": "number", "id": "61ca57f1-469d-11e7-af02-69e470af7417", @@ -360,16 +503,19 @@ "line_width": 1, "metrics": [ { - "field": "aws.billing.metrics.EstimatedCharges.max", + "field": "aws.billing.EstimatedCharges", "id": "61ca57f2-469d-11e7-af02-69e470af7417", "type": "sum" } ], - "override_index_pattern": 0, + "override_index_pattern": 1, "point_size": 1, "separate_axis": 0, "series_drop_last_bucket": 0, - "series_interval": "12h", + "series_index_pattern": "metricbeat-*", + "series_interval": "\u003e=1d", + "series_time_field": "@timestamp", + "split_color_mode": "gradient", "split_mode": "filter", "stacked": "none", "time_range_mode": "last_value", @@ -379,6 +525,8 @@ "show_grid": 1, "show_legend": 1, "time_field": "@timestamp", + "time_range_mode": "last_value", + "tooltip_mode": "show_all", "type": "metric" }, "title": "Total Estimated Charges [Metricbeat AWS]", @@ -387,12 +535,333 @@ }, "id": "83f08eb0-1532-11ea-841c-01bf20a6c8ba", "migrationVersion": { - "visualization": "7.3.1" + "visualization": "7.8.0" }, + "namespaces": [ + "default" + ], "references": [], "type": "visualization", - "updated_at": "2020-02-03T23:52:07.805Z", - "version": "WzY3NDUsMV0=" + "updated_at": "2020-09-14T04:03:51.696Z", + "version": "WzY0NzEsOF0=" + }, + { + "attributes": { + "description": "", + "expression": "kibana\n| kibana_context query=\"{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"}\" filters=\"[]\"\n| lens_merge_tables layerIds=\"cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3\" \n tables={esaggs index=\"metricbeat-*\" metricsAtAllLevels=true partialRows=true includeFormatHints=true aggConfigs=\"[{\\\"id\\\":\\\"5d850e8e-f3e0-4ad2-9697-b8c00c03f753\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"terms\\\",\\\"schema\\\":\\\"segment\\\",\\\"params\\\":{\\\"field\\\":\\\"aws.billing.group_by.SERVICE\\\",\\\"orderBy\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\",\\\"order\\\":\\\"desc\\\",\\\"size\\\":5,\\\"otherBucket\\\":false,\\\"otherBucketLabel\\\":\\\"Other\\\",\\\"missingBucket\\\":false,\\\"missingBucketLabel\\\":\\\"Missing\\\"}},{\\\"id\\\":\\\"a1f5b3b8-41da-452b-8683-7a9ca6b6267f\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"terms\\\",\\\"schema\\\":\\\"segment\\\",\\\"params\\\":{\\\"field\\\":\\\"aws.billing.group_by.aws:createdBy\\\",\\\"orderBy\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\",\\\"order\\\":\\\"desc\\\",\\\"size\\\":10,\\\"otherBucket\\\":false,\\\"otherBucketLabel\\\":\\\"Other\\\",\\\"missingBucket\\\":false,\\\"missingBucketLabel\\\":\\\"Missing\\\"}},{\\\"id\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"sum\\\",\\\"schema\\\":\\\"metric\\\",\\\"params\\\":{\\\"field\\\":\\\"aws.billing.UnblendedCost.amount\\\",\\\"missing\\\":0}}]\" | lens_rename_columns idMap=\"{\\\"col-0-5d850e8e-f3e0-4ad2-9697-b8c00c03f753\\\":{\\\"label\\\":\\\"Service Name\\\",\\\"dataType\\\":\\\"string\\\",\\\"operationType\\\":\\\"terms\\\",\\\"scale\\\":\\\"ordinal\\\",\\\"sourceField\\\":\\\"aws.billing.group_by.SERVICE\\\",\\\"isBucketed\\\":true,\\\"params\\\":{\\\"size\\\":5,\\\"orderBy\\\":{\\\"type\\\":\\\"column\\\",\\\"columnId\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\"},\\\"orderDirection\\\":\\\"desc\\\"},\\\"customLabel\\\":true,\\\"id\\\":\\\"5d850e8e-f3e0-4ad2-9697-b8c00c03f753\\\"},\\\"col-2-a1f5b3b8-41da-452b-8683-7a9ca6b6267f\\\":{\\\"label\\\":\\\"Top values of aws.billing.group_by.aws:createdBy\\\",\\\"dataType\\\":\\\"string\\\",\\\"operationType\\\":\\\"terms\\\",\\\"scale\\\":\\\"ordinal\\\",\\\"suggestedPriority\\\":0,\\\"sourceField\\\":\\\"aws.billing.group_by.aws:createdBy\\\",\\\"isBucketed\\\":true,\\\"params\\\":{\\\"size\\\":10,\\\"orderBy\\\":{\\\"type\\\":\\\"column\\\",\\\"columnId\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\"},\\\"orderDirection\\\":\\\"desc\\\"},\\\"id\\\":\\\"a1f5b3b8-41da-452b-8683-7a9ca6b6267f\\\"},\\\"col-3-75188758-7734-4fc3-af1d-297c455715f0\\\":{\\\"label\\\":\\\"Total Unblended Cost\\\",\\\"dataType\\\":\\\"number\\\",\\\"operationType\\\":\\\"sum\\\",\\\"sourceField\\\":\\\"aws.billing.UnblendedCost.amount\\\",\\\"isBucketed\\\":false,\\\"scale\\\":\\\"ratio\\\",\\\"customLabel\\\":true,\\\"id\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\"}}\"}\n| lens_xy_chart xTitle=\"Service Name\" yTitle=\"Total Unblended Cost\" legend={lens_xy_legendConfig isVisible=true position=\"right\"} fittingFunction=\"None\" \n layers={lens_xy_layer layerId=\"cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3\" hide=false xAccessor=\"5d850e8e-f3e0-4ad2-9697-b8c00c03f753\" yScaleType=\"linear\" xScaleType=\"ordinal\" isHistogram=false splitAccessor=\"a1f5b3b8-41da-452b-8683-7a9ca6b6267f\" seriesType=\"bar_stacked\" accessors=\"75188758-7734-4fc3-af1d-297c455715f0\" columnToLabel=\"{\\\"75188758-7734-4fc3-af1d-297c455715f0\\\":\\\"Total Unblended Cost\\\",\\\"a1f5b3b8-41da-452b-8683-7a9ca6b6267f\\\":\\\"Top values of aws.billing.group_by.aws:createdBy\\\"}\"}", + "state": { + "datasourceMetaData": { + "filterableIndexPatterns": [ + { + "id": "metricbeat-*", + "title": "metricbeat-*" + } + ] + }, + "datasourceStates": { + "indexpattern": { + "currentIndexPatternId": "metricbeat-*", + "layers": { + "cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3": { + "columnOrder": [ + "5d850e8e-f3e0-4ad2-9697-b8c00c03f753", + "a1f5b3b8-41da-452b-8683-7a9ca6b6267f", + "75188758-7734-4fc3-af1d-297c455715f0" + ], + "columns": { + "5d850e8e-f3e0-4ad2-9697-b8c00c03f753": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Service Name", + "operationType": "terms", + "params": { + "orderBy": { + "columnId": "75188758-7734-4fc3-af1d-297c455715f0", + "type": "column" + }, + "orderDirection": "desc", + "size": 5 + }, + "scale": "ordinal", + "sourceField": "aws.billing.group_by.SERVICE" + }, + "75188758-7734-4fc3-af1d-297c455715f0": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Total Unblended Cost", + "operationType": "sum", + "scale": "ratio", + "sourceField": "aws.billing.UnblendedCost.amount" + }, + "a1f5b3b8-41da-452b-8683-7a9ca6b6267f": { + "dataType": "string", + "isBucketed": true, + "label": "Top values of aws.billing.group_by.aws:createdBy", + "operationType": "terms", + "params": { + "orderBy": { + "columnId": "75188758-7734-4fc3-af1d-297c455715f0", + "type": "column" + }, + "orderDirection": "desc", + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.billing.group_by.aws:createdBy", + "suggestedPriority": 0 + } + }, + "indexPatternId": "metricbeat-*" + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "fittingFunction": "None", + "layers": [ + { + "accessors": [ + "75188758-7734-4fc3-af1d-297c455715f0" + ], + "layerId": "cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3", + "seriesType": "bar_stacked", + "splitAccessor": "a1f5b3b8-41da-452b-8683-7a9ca6b6267f", + "xAccessor": "5d850e8e-f3e0-4ad2-9697-b8c00c03f753" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked" + } + }, + "title": "Cost Per Service Per User [Metricbeat AWS]", + "visualizationType": "lnsXY" + }, + "id": "b3da5ac0-e6f1-11ea-a5b5-d5a0accaec95", + "migrationVersion": { + "lens": "7.8.0" + }, + "namespaces": [ + "default" + ], + "references": [], + "type": "lens", + "updated_at": "2020-09-14T04:03:51.696Z", + "version": "WzY0NzIsOF0=" + }, + { + "attributes": { + "description": "", + "expression": "kibana\n| kibana_context query=\"{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"}\" filters=\"[]\"\n| lens_merge_tables layerIds=\"cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3\" \n tables={esaggs index=\"metricbeat-*\" metricsAtAllLevels=true partialRows=true includeFormatHints=true aggConfigs=\"[{\\\"id\\\":\\\"a1f5b3b8-41da-452b-8683-7a9ca6b6267f\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"terms\\\",\\\"schema\\\":\\\"segment\\\",\\\"params\\\":{\\\"field\\\":\\\"aws.billing.group_by.aws:createdBy\\\",\\\"orderBy\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\",\\\"order\\\":\\\"desc\\\",\\\"size\\\":10,\\\"otherBucket\\\":false,\\\"otherBucketLabel\\\":\\\"Other\\\",\\\"missingBucket\\\":false,\\\"missingBucketLabel\\\":\\\"Missing\\\"}},{\\\"id\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"sum\\\",\\\"schema\\\":\\\"metric\\\",\\\"params\\\":{\\\"field\\\":\\\"aws.billing.UnblendedCost.amount\\\",\\\"missing\\\":0}}]\" | lens_rename_columns idMap=\"{\\\"col-0-a1f5b3b8-41da-452b-8683-7a9ca6b6267f\\\":{\\\"label\\\":\\\"Top Users\\\",\\\"dataType\\\":\\\"string\\\",\\\"operationType\\\":\\\"terms\\\",\\\"scale\\\":\\\"ordinal\\\",\\\"suggestedPriority\\\":0,\\\"sourceField\\\":\\\"aws.billing.group_by.aws:createdBy\\\",\\\"isBucketed\\\":true,\\\"params\\\":{\\\"size\\\":10,\\\"orderBy\\\":{\\\"type\\\":\\\"column\\\",\\\"columnId\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\"},\\\"orderDirection\\\":\\\"desc\\\"},\\\"customLabel\\\":true,\\\"id\\\":\\\"a1f5b3b8-41da-452b-8683-7a9ca6b6267f\\\"},\\\"col-1-75188758-7734-4fc3-af1d-297c455715f0\\\":{\\\"label\\\":\\\"Total Unblended Cost\\\",\\\"dataType\\\":\\\"number\\\",\\\"operationType\\\":\\\"sum\\\",\\\"sourceField\\\":\\\"aws.billing.UnblendedCost.amount\\\",\\\"isBucketed\\\":false,\\\"scale\\\":\\\"ratio\\\",\\\"customLabel\\\":true,\\\"id\\\":\\\"75188758-7734-4fc3-af1d-297c455715f0\\\"}}\"}\n| lens_xy_chart xTitle=\"Top Users\" yTitle=\"Total Unblended Cost\" legend={lens_xy_legendConfig isVisible=true position=\"right\"} fittingFunction=\"None\" \n layers={lens_xy_layer layerId=\"cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3\" hide=false xAccessor=\"a1f5b3b8-41da-452b-8683-7a9ca6b6267f\" yScaleType=\"linear\" xScaleType=\"ordinal\" isHistogram=false seriesType=\"bar_horizontal\" accessors=\"75188758-7734-4fc3-af1d-297c455715f0\" columnToLabel=\"{\\\"75188758-7734-4fc3-af1d-297c455715f0\\\":\\\"Total Unblended Cost\\\"}\"}", + "state": { + "datasourceMetaData": { + "filterableIndexPatterns": [ + { + "id": "metricbeat-*", + "title": "metricbeat-*" + } + ] + }, + "datasourceStates": { + "indexpattern": { + "currentIndexPatternId": "metricbeat-*", + "layers": { + "cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3": { + "columnOrder": [ + "a1f5b3b8-41da-452b-8683-7a9ca6b6267f", + "75188758-7734-4fc3-af1d-297c455715f0" + ], + "columns": { + "75188758-7734-4fc3-af1d-297c455715f0": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Total Unblended Cost", + "operationType": "sum", + "scale": "ratio", + "sourceField": "aws.billing.UnblendedCost.amount" + }, + "a1f5b3b8-41da-452b-8683-7a9ca6b6267f": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Top Users", + "operationType": "terms", + "params": { + "orderBy": { + "columnId": "75188758-7734-4fc3-af1d-297c455715f0", + "type": "column" + }, + "orderDirection": "desc", + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.billing.group_by.aws:createdBy", + "suggestedPriority": 0 + } + }, + "indexPatternId": "metricbeat-*" + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "fittingFunction": "None", + "layers": [ + { + "accessors": [ + "75188758-7734-4fc3-af1d-297c455715f0" + ], + "layerId": "cbffa0b1-50bb-40fe-bd8d-6a26d2b58fb3", + "seriesType": "bar_horizontal", + "xAccessor": "a1f5b3b8-41da-452b-8683-7a9ca6b6267f" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_horizontal" + } + }, + "title": "High Spenders [Metricbeat AWS]", + "visualizationType": "lnsXY" + }, + "id": "d7b399c0-e6f1-11ea-a5b5-d5a0accaec95", + "migrationVersion": { + "lens": "7.8.0" + }, + "namespaces": [ + "default" + ], + "references": [], + "type": "lens", + "updated_at": "2020-09-14T04:03:51.696Z", + "version": "WzY0NzMsOF0=" + }, + { + "attributes": { + "description": "", + "expression": "kibana\n| kibana_context query=\"{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"}\" filters=\"[]\"\n| lens_merge_tables layerIds=\"dc597043-d867-4f94-ae90-f31ffc0c2674\" \n tables={esaggs index=\"metricbeat-*\" metricsAtAllLevels=true partialRows=true includeFormatHints=true timeFields=\"@timestamp\" aggConfigs=\"[{\\\"id\\\":\\\"ea87bf3d-0a35-424b-b00b-3614c431b135\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"terms\\\",\\\"schema\\\":\\\"segment\\\",\\\"params\\\":{\\\"field\\\":\\\"aws.billing.ServiceName\\\",\\\"orderBy\\\":\\\"d54f4e58-d8dd-4404-8da9-12b667dd7910\\\",\\\"order\\\":\\\"desc\\\",\\\"size\\\":10,\\\"otherBucket\\\":false,\\\"otherBucketLabel\\\":\\\"Other\\\",\\\"missingBucket\\\":false,\\\"missingBucketLabel\\\":\\\"Missing\\\"}},{\\\"id\\\":\\\"faa5dba4-1fab-4f88-b67f-28bafa26a32d\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"date_histogram\\\",\\\"schema\\\":\\\"segment\\\",\\\"params\\\":{\\\"field\\\":\\\"@timestamp\\\",\\\"useNormalizedEsInterval\\\":true,\\\"interval\\\":\\\"1d\\\",\\\"drop_partials\\\":false,\\\"min_doc_count\\\":0,\\\"extended_bounds\\\":{}}},{\\\"id\\\":\\\"d54f4e58-d8dd-4404-8da9-12b667dd7910\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"avg\\\",\\\"schema\\\":\\\"metric\\\",\\\"params\\\":{\\\"field\\\":\\\"aws.billing.EstimatedCharges\\\",\\\"missing\\\":0}}]\" | lens_rename_columns idMap=\"{\\\"col-0-ea87bf3d-0a35-424b-b00b-3614c431b135\\\":{\\\"label\\\":\\\"Service Names\\\",\\\"dataType\\\":\\\"string\\\",\\\"operationType\\\":\\\"terms\\\",\\\"scale\\\":\\\"ordinal\\\",\\\"suggestedPriority\\\":0,\\\"sourceField\\\":\\\"aws.billing.ServiceName\\\",\\\"isBucketed\\\":true,\\\"params\\\":{\\\"size\\\":10,\\\"orderBy\\\":{\\\"type\\\":\\\"column\\\",\\\"columnId\\\":\\\"d54f4e58-d8dd-4404-8da9-12b667dd7910\\\"},\\\"orderDirection\\\":\\\"desc\\\"},\\\"customLabel\\\":true,\\\"id\\\":\\\"ea87bf3d-0a35-424b-b00b-3614c431b135\\\"},\\\"col-2-faa5dba4-1fab-4f88-b67f-28bafa26a32d\\\":{\\\"label\\\":\\\"@timestamp\\\",\\\"dataType\\\":\\\"date\\\",\\\"operationType\\\":\\\"date_histogram\\\",\\\"sourceField\\\":\\\"@timestamp\\\",\\\"isBucketed\\\":true,\\\"scale\\\":\\\"interval\\\",\\\"params\\\":{\\\"interval\\\":\\\"1d\\\"},\\\"id\\\":\\\"faa5dba4-1fab-4f88-b67f-28bafa26a32d\\\"},\\\"col-3-d54f4e58-d8dd-4404-8da9-12b667dd7910\\\":{\\\"label\\\":\\\"Estimated Charges\\\",\\\"dataType\\\":\\\"number\\\",\\\"operationType\\\":\\\"avg\\\",\\\"sourceField\\\":\\\"aws.billing.EstimatedCharges\\\",\\\"isBucketed\\\":false,\\\"scale\\\":\\\"ratio\\\",\\\"customLabel\\\":true,\\\"id\\\":\\\"d54f4e58-d8dd-4404-8da9-12b667dd7910\\\"}}\"}\n| lens_xy_chart xTitle=\"@timestamp\" yTitle=\"Estimated Charges\" legend={lens_xy_legendConfig isVisible=true position=\"right\"} fittingFunction=\"None\" \n layers={lens_xy_layer layerId=\"dc597043-d867-4f94-ae90-f31ffc0c2674\" hide=false xAccessor=\"faa5dba4-1fab-4f88-b67f-28bafa26a32d\" yScaleType=\"linear\" xScaleType=\"time\" isHistogram=true splitAccessor=\"ea87bf3d-0a35-424b-b00b-3614c431b135\" seriesType=\"line\" accessors=\"d54f4e58-d8dd-4404-8da9-12b667dd7910\" columnToLabel=\"{\\\"d54f4e58-d8dd-4404-8da9-12b667dd7910\\\":\\\"Estimated Charges\\\",\\\"ea87bf3d-0a35-424b-b00b-3614c431b135\\\":\\\"Service Names\\\"}\"}", + "state": { + "datasourceMetaData": { + "filterableIndexPatterns": [ + { + "id": "metricbeat-*", + "title": "metricbeat-*" + } + ] + }, + "datasourceStates": { + "indexpattern": { + "currentIndexPatternId": "metricbeat-*", + "layers": { + "dc597043-d867-4f94-ae90-f31ffc0c2674": { + "columnOrder": [ + "ea87bf3d-0a35-424b-b00b-3614c431b135", + "faa5dba4-1fab-4f88-b67f-28bafa26a32d", + "d54f4e58-d8dd-4404-8da9-12b667dd7910" + ], + "columns": { + "d54f4e58-d8dd-4404-8da9-12b667dd7910": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Estimated Charges", + "operationType": "avg", + "scale": "ratio", + "sourceField": "aws.billing.EstimatedCharges" + }, + "ea87bf3d-0a35-424b-b00b-3614c431b135": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Service Names", + "operationType": "terms", + "params": { + "orderBy": { + "columnId": "d54f4e58-d8dd-4404-8da9-12b667dd7910", + "type": "column" + }, + "orderDirection": "desc", + "size": 10 + }, + "scale": "ordinal", + "sourceField": "aws.billing.ServiceName", + "suggestedPriority": 0 + }, + "faa5dba4-1fab-4f88-b67f-28bafa26a32d": { + "dataType": "date", + "isBucketed": true, + "label": "@timestamp", + "operationType": "date_histogram", + "params": { + "interval": "1d" + }, + "scale": "interval", + "sourceField": "@timestamp" + } + }, + "indexPatternId": "metricbeat-*" + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "fittingFunction": "None", + "layers": [ + { + "accessors": [ + "d54f4e58-d8dd-4404-8da9-12b667dd7910" + ], + "layerId": "dc597043-d867-4f94-ae90-f31ffc0c2674", + "position": "top", + "seriesType": "line", + "showGridlines": false, + "splitAccessor": "ea87bf3d-0a35-424b-b00b-3614c431b135", + "xAccessor": "faa5dba4-1fab-4f88-b67f-28bafa26a32d" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "line" + } + }, + "title": "Top 10 Estimated Charges per Service Name [Metricbeat AWS]", + "visualizationType": "lnsXY" + }, + "id": "cde34840-e6f2-11ea-a5b5-d5a0accaec95", + "migrationVersion": { + "lens": "7.8.0" + }, + "namespaces": [ + "default" + ], + "references": [], + "type": "lens", + "updated_at": "2020-09-14T04:03:51.696Z", + "version": "WzY0NzQsOF0=" }, { "attributes": { @@ -406,14 +875,13 @@ } } }, - "title": "Top 10 Billing per Service Name [Metricbeat AWS]", + "title": "Daily Unblended Cost [Metricbeat AWS]", "uiStateJSON": {}, "version": 1, "visState": { "aggs": [], "params": { "axis_formatter": "number", - "axis_min": 0, "axis_position": "left", "axis_scale": "normal", "default_index_pattern": "metricbeat-*", @@ -421,67 +889,64 @@ "drop_last_bucket": 0, "filter": { "language": "kuery", - "query": "" + "query": "aws.billing.group_definition.key : \"AZ\"" }, - "id": "729af8b0-152a-11ea-ae8f-79fec1a0d4d3", + "id": "61ca57f0-469d-11e7-af02-69e470af7417", "index_pattern": "metricbeat-*", - "interval": "12h", + "interval": "\u003e=1d", "isModelInvalid": false, "series": [ { "axis_position": "right", - "chart_type": "line", - "color": "#3185FC", - "fill": 0, + "chart_type": "bar", + "color": "rgba(118,208,7,1)", + "fill": "1", "filter": { "language": "kuery", - "query": "" + "query": "aws.billing.group_definition.key : \"AZ\"" }, "formatter": "number", - "id": "729b1fc0-152a-11ea-ae8f-79fec1a0d4d3", - "label": "avg(aws.billing.metrics.EstimatedCharges.max)", - "line_width": 2, + "hide_in_legend": 1, + "id": "61ca57f1-469d-11e7-af02-69e470af7417", + "label": "Total Unblended Cost", + "line_width": 1, "metrics": [ { - "field": "aws.billing.metrics.EstimatedCharges.max", - "id": "729b1fc1-152a-11ea-ae8f-79fec1a0d4d3", + "field": "aws.billing.UnblendedCost.amount", + "id": "61ca57f2-469d-11e7-af02-69e470af7417", "type": "sum" } ], - "override_index_pattern": 0, - "point_size": "4", + "point_size": 1, "separate_axis": 0, - "series_drop_last_bucket": 0, - "split_color_mode": "rainbow", - "split_mode": "terms", + "split_color_mode": "kibana", + "split_mode": "filter", "stacked": "none", - "steps": 0, - "terms_field": "aws.dimensions.ServiceName", - "terms_include": "", - "terms_order_by": "729b1fc1-152a-11ea-ae8f-79fec1a0d4d3", - "terms_size": "10", - "type": "timeseries", - "value_template": "${{value}}" + "type": "timeseries" } ], - "show_grid": 1, + "show_grid": 0, "show_legend": 1, "time_field": "@timestamp", + "tooltip_mode": "show_all", "type": "timeseries" }, - "title": "Top 10 Billing per Service Name [Metricbeat AWS]", + "title": "Daily Unblended Cost [Metricbeat AWS]", "type": "metrics" } }, - "id": "31a4ea90-152b-11ea-841c-01bf20a6c8ba", + "id": "3e091620-e64b-11ea-a838-3f4a45f85600", "migrationVersion": { - "visualization": "7.3.1" + "visualization": "7.8.0" }, + "namespaces": [ + "default" + ], "references": [], "type": "visualization", - "updated_at": "2020-02-04T13:56:47.812Z", - "version": "WzY3NjMsMV0=" + "updated_at": "2020-09-14T04:03:51.696Z", + "version": "WzY0NzUsOF0=" } ], - "version": "7.4.0" + "version": "7.9.0" } diff --git a/x-pack/metricbeat/module/aws/billing/_meta/data.json b/x-pack/metricbeat/module/aws/billing/_meta/data.json index df5fece2194..46b66885830 100644 --- a/x-pack/metricbeat/module/aws/billing/_meta/data.json +++ b/x-pack/metricbeat/module/aws/billing/_meta/data.json @@ -2,18 +2,35 @@ "@timestamp": "2017-10-12T08:05:34.853Z", "aws": { "billing": { - "metrics": { - "EstimatedCharges": { - "max": 0 - } - } - }, - "cloudwatch": { - "namespace": "AWS/Billing" - }, - "dimensions": { - "Currency": "USD", - "ServiceName": "AmazonSNS" + "AmortizedCost": { + "amount": 0.6949203833, + "unit": "USD" + }, + "BlendedCost": { + "amount": 0.6949203833, + "unit": "USD" + }, + "NormalizedUsageAmount": { + "amount": 12, + "unit": "N/A" + }, + "UnblendedCost": { + "amount": 0.6949203833, + "unit": "USD" + }, + "UsageQuantity": { + "amount": 312.7086043154, + "unit": "N/A" + }, + "end_date": "2020-08-24", + "group_by": { + "AZ": "eu-central-1" + }, + "group_definition": { + "key": "AZ", + "type": "DIMENSION" + }, + "start_date": "2020-08-23" } }, "cloud": { @@ -21,8 +38,7 @@ "id": "428152502467", "name": "elastic-beats" }, - "provider": "aws", - "region": "us-east-1" + "provider": "aws" }, "event": { "dataset": "aws.billing", diff --git a/x-pack/metricbeat/module/aws/billing/_meta/data_cloudwatch.json b/x-pack/metricbeat/module/aws/billing/_meta/data_cloudwatch.json new file mode 100644 index 00000000000..4ee0ef22520 --- /dev/null +++ b/x-pack/metricbeat/module/aws/billing/_meta/data_cloudwatch.json @@ -0,0 +1,29 @@ +{ + "@timestamp": "2017-10-12T08:05:34.853Z", + "aws": { + "billing": { + "Currency": "USD", + "EstimatedCharges": 0, + "ServiceName": "AmazonDynamoDB" + } + }, + "cloud": { + "account": { + "id": "428152502467", + "name": "elastic-beats" + }, + "provider": "aws" + }, + "event": { + "dataset": "aws.billing", + "duration": 115000, + "module": "aws" + }, + "metricset": { + "name": "billing", + "period": 10000 + }, + "service": { + "type": "aws" + } +} \ No newline at end of file diff --git a/x-pack/metricbeat/module/aws/billing/_meta/data_group_by_instance_type.json b/x-pack/metricbeat/module/aws/billing/_meta/data_group_by_instance_type.json new file mode 100644 index 00000000000..a5109dd8e54 --- /dev/null +++ b/x-pack/metricbeat/module/aws/billing/_meta/data_group_by_instance_type.json @@ -0,0 +1,55 @@ +{ + "@timestamp": "2017-10-12T08:05:34.853Z", + "aws": { + "billing": { + "AmortizedCost": { + "amount": 44.64, + "unit": "USD" + }, + "BlendedCost": { + "amount": 44.64, + "unit": "USD" + }, + "NormalizedUsageAmount": { + "amount": 576, + "unit": "N/A" + }, + "UnblendedCost": { + "amount": 44.64, + "unit": "USD" + }, + "UsageQuantity": { + "amount": 144, + "unit": "N/A" + }, + "end_date": "2020-08-24", + "group_by": { + "INSTANCE_TYPE": "db.r5.large" + }, + "group_definition": { + "key": "INSTANCE_TYPE", + "type": "DIMENSION" + }, + "start_date": "2020-08-23" + } + }, + "cloud": { + "account": { + "id": "428152502467", + "name": "elastic-beats" + }, + "provider": "aws" + }, + "event": { + "dataset": "aws.billing", + "duration": 115000, + "module": "aws" + }, + "metricset": { + "name": "billing", + "period": 10000 + }, + "service": { + "type": "aws" + } +} \ No newline at end of file diff --git a/x-pack/metricbeat/module/aws/billing/_meta/docs.asciidoc b/x-pack/metricbeat/module/aws/billing/_meta/docs.asciidoc index 0e0b4ffb624..90b8f88da87 100644 --- a/x-pack/metricbeat/module/aws/billing/_meta/docs.asciidoc +++ b/x-pack/metricbeat/module/aws/billing/_meta/docs.asciidoc @@ -1,13 +1,8 @@ -You can monitor your estimated AWS charges by using Amazon CloudWatch. When you -enable the monitoring of estimated charges for your AWS account, the estimated -charges are calculated and sent several times daily to CloudWatch as metric data. +You can monitor your estimated AWS charges by using Amazon CloudWatch and Cost +Explorer. -Billing metric data is stored in the US East (N. Virginia) Region and represents -worldwide charges. This data includes the estimated charges for every service in -AWS that you use, in addition to the estimated overall total of your AWS charges. - -This aws `billing` metricset collects these Cloudwatch metrics for monitoring -purposes. +This aws `billing` metricset collects metrics both from Cloudwatch and cost +explorer for monitoring purposes. [float] === AWS Permissions @@ -19,6 +14,7 @@ cloudwatch:ListMetrics tag:getResources sts:GetCallerIdentity iam:ListAccountAliases +ce:GetCostAndUsage ---- [float] @@ -33,18 +29,28 @@ image::./images/metricbeat-aws-billing-overview.png[] [source,yaml] ---- - module: aws - period: 12h + period: 24h metricsets: - billing - # This module uses the aws cloudwatch metricset, all - # the options for this metricset are also available here. + credential_profile_name: elastic-beats + cost_explorer_config: + group_by_dimension_keys: + - "AZ" + - "INSTANCE_TYPE" + - "SERVICE" + group_by_tag_keys: + - "aws:createdBy" ---- [float] -=== Metrics -|=== -|Metric Name|Statistic Method -|EstimatedCharges | Maximum -|=== +=== Metricset-specific configuration notes +When querying AWS Cost Explorer API, you can group AWS costs using up to two +different groups, either dimensions, tag keys, or both. Right now we support +group by type dimension and type tag with separate config parameters: + +* *group_by_dimension_keys*: A list of keys used in Cost Explorer to group by +dimensions. Valid values are AZ, INSTANCE_TYPE, LEGAL_ENTITY_NAME, +LINKED_ACCOUNT, OPERATION, PLATFORM, PURCHASE_TYPE, SERVICE, TAGS, TENANCY, and +USAGE_TYPE. -Supported dimensions for billing metrics: Currency and ServiceName. +* *group_by_tag_keys*: A list of keys used in Cost Explorer to group by tags. diff --git a/x-pack/metricbeat/module/aws/billing/_meta/fields.yml b/x-pack/metricbeat/module/aws/billing/_meta/fields.yml index 2b246415653..0452be75ab4 100644 --- a/x-pack/metricbeat/module/aws/billing/_meta/fields.yml +++ b/x-pack/metricbeat/module/aws/billing/_meta/fields.yml @@ -4,9 +4,78 @@ `billing` contains the estimated charges for your AWS account in Cloudwatch. release: beta fields: - - name: metrics + - name: EstimatedCharges + type: long + description: Maximum estimated charges for AWS acccount. + - name: Currency + type: keyword + description: Estimated charges currency unit. + - name: ServiceName + type: keyword + description: Service name for the maximum estimated charges. + - name: AmortizedCost type: group fields: - - name: EstimatedCharges.max - type: long - description: Maximum estimated charges for AWS acccount. + - name: amount + type: double + description: Amortized cost amount + - name: unit + type: keyword + description: Amortized cost unit + - name: BlendedCost + type: group + fields: + - name: amount + type: double + description: Blended cost amount + - name: unit + type: keyword + description: Blended cost unit + - name: NormalizedUsageAmount + type: group + fields: + - name: amount + type: double + description: Normalized usage amount + - name: unit + type: keyword + description: Normalized usage amount unit + - name: UnblendedCost + type: group + fields: + - name: amount + type: double + description: Unblended cost amount + - name: unit + type: keyword + description: Unblended cost unit + - name: UsageQuantity + type: group + fields: + - name: amount + type: double + description: Usage quantity amount + - name: unit + type: keyword + description: Usage quantity unit + - name: start_date + type: keyword + description: Start date for retrieving AWS costs + - name: end_date + type: keyword + description: End date for retrieving AWS costs + - name: group_definition + type: group + fields: + - name: key + type: keyword + description: The string that represents a key for a specified group + - name: type + type: keyword + description: The string that represents the type of group + - name: group_by.* + type: object + object_type: keyword + object_type_mapping_type: "*" + description: > + Cost explorer group by key values diff --git a/x-pack/metricbeat/module/aws/billing/billing.go b/x-pack/metricbeat/module/aws/billing/billing.go new file mode 100644 index 00000000000..2eb2bd2854a --- /dev/null +++ b/x-pack/metricbeat/module/aws/billing/billing.go @@ -0,0 +1,407 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package billing + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "fmt" + "strconv" + "strings" + "time" + + awssdk "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/cloudwatch" + "github.com/aws/aws-sdk-go-v2/service/cloudwatch/cloudwatchiface" + "github.com/aws/aws-sdk-go-v2/service/costexplorer" + "github.com/aws/aws-sdk-go-v2/service/costexplorer/costexploreriface" + + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + awscommon "github.com/elastic/beats/v7/x-pack/libbeat/common/aws" + "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws" +) + +var ( + metricsetName = "billing" + regionName = "us-east-1" + labelSeparator = "|" + + // This list is from https://github.com/aws/aws-sdk-go-v2/blob/master/service/costexplorer/api_enums.go#L60-L90 + supportedDimensionKeys = []string{ + "AZ", "INSTANCE_TYPE", "LINKED_ACCOUNT", "OPERATION", "PURCHASE_TYPE", + "REGION", "SERVICE", "USAGE_TYPE", "USAGE_TYPE_GROUP", "RECORD_TYPE", + "OPERATING_SYSTEM", "TENANCY", "SCOPE", "PLATFORM", "SUBSCRIPTION_ID", + "LEGAL_ENTITY_NAME", "DEPLOYMENT_OPTION", "DATABASE_ENGINE", + "CACHE_ENGINE", "INSTANCE_TYPE_FAMILY", "BILLING_ENTITY", + "RESERVATION_ID", + } + + dateLayout = "2006-01-02" +) + +// init registers the MetricSet with the central registry as soon as the program +// starts. The New function will be called later to instantiate an instance of +// the MetricSet for each host defined in the module's configuration. After the +// MetricSet has been created then Fetch will begin to be called periodically. +func init() { + mb.Registry.MustAddMetricSet(aws.ModuleName, metricsetName, New, + mb.DefaultMetricSet(), + ) +} + +// MetricSet holds any configuration or state information. It must implement +// the mb.MetricSet interface. And this is best achieved by embedding +// mb.BaseMetricSet because it implements all of the required mb.MetricSet +// interface methods except for Fetch. +type MetricSet struct { + *aws.MetricSet + logger *logp.Logger + CostExplorerConfig CostExplorerConfig `config:"cost_explorer_config"` +} + +// Config holds a configuration specific for billing metricset. +type CostExplorerConfig struct { + GroupByDimensionKeys []string `config:"group_by_dimension_keys"` + GroupByTagKeys []string `config:"group_by_tag_keys"` +} + +// New creates a new instance of the MetricSet. New is responsible for unpacking +// any MetricSet specific configuration options if there are any. +func New(base mb.BaseMetricSet) (mb.MetricSet, error) { + logger := logp.NewLogger(metricsetName) + metricSet, err := aws.NewMetricSet(base) + if err != nil { + return nil, fmt.Errorf("error creating aws metricset: %w", err) + } + + config := struct { + CostExplorerConfig CostExplorerConfig `config:"cost_explorer_config"` + }{} + + err = base.Module().UnpackConfig(&config) + if err != nil { + return nil, fmt.Errorf("error unpack raw module config using UnpackConfig: %w", err) + } + + logger.Debugf("cost explorer config = %s", config) + + return &MetricSet{ + MetricSet: metricSet, + logger: logger, + CostExplorerConfig: config.CostExplorerConfig, + }, nil +} + +// Validate checks if given dimension keys are supported. +func (c CostExplorerConfig) Validate() error { + for _, key := range c.GroupByDimensionKeys { + supported, _ := aws.StringInSlice(key, supportedDimensionKeys) + if !supported { + return fmt.Errorf("costexplorer GetCostAndUsageRequest does not support dimension key: %s", key) + } + } + return nil +} + +// Fetch methods implements the data gathering and data conversion to the right +// format. It publishes the event which is then forwarded to the output. In case +// of an error set the Error field of mb.Event or simply call report.Error(). +func (m *MetricSet) Fetch(report mb.ReporterV2) error { + // Get startDate and endDate + startDate, endDate := getStartDateEndDate(m.Period) + + // Get startTime and endTime + startTime, endTime := aws.GetStartTimeEndTime(m.Period) + + // get cost metrics from cost explorer + awsConfig := m.MetricSet.AwsConfig.Copy() + svcCostExplorer := costexplorer.New(awscommon.EnrichAWSConfigWithEndpoint( + m.Endpoint, "monitoring", "", awsConfig)) + + awsConfig.Region = regionName + svcCloudwatch := cloudwatch.New(awscommon.EnrichAWSConfigWithEndpoint( + m.Endpoint, "monitoring", regionName, awsConfig)) + + timePeriod := costexplorer.DateInterval{ + Start: awssdk.String(startDate), + End: awssdk.String(endDate), + } + + var events []mb.Event + + // Get estimated charges from CloudWatch + eventsCW := m.getCloudWatchBillingMetrics(svcCloudwatch, startTime, endTime) + events = append(events, eventsCW...) + + // Get total cost from Cost Explorer GetCostAndUsage with group by type "DIMENSION" and "TAG" + eventsCE := m.getCostGroupBy(svcCostExplorer, m.CostExplorerConfig.GroupByDimensionKeys, m.CostExplorerConfig.GroupByTagKeys, timePeriod, startDate, endDate) + events = append(events, eventsCE...) + + // report events + for _, event := range events { + if reported := report.Event(event); !reported { + m.Logger().Debug("Fetch interrupted, failed to emit event") + return nil + } + } + return nil +} + +func (m *MetricSet) getCloudWatchBillingMetrics( + svcCloudwatch cloudwatchiface.ClientAPI, + startTime time.Time, + endTime time.Time) []mb.Event { + var events []mb.Event + namespace := "AWS/Billing" + listMetricsOutput, err := aws.GetListMetricsOutput(namespace, regionName, svcCloudwatch) + if err != nil { + m.Logger().Error(err.Error()) + return nil + } + + if listMetricsOutput == nil || len(listMetricsOutput) == 0 { + return events + } + + metricDataQueriesTotal := constructMetricQueries(listMetricsOutput, m.Period) + metricDataOutput, err := aws.GetMetricDataResults(metricDataQueriesTotal, svcCloudwatch, startTime, endTime) + if err != nil { + err = fmt.Errorf("aws GetMetricDataResults failed with %w, skipping region %s", err, regionName) + m.Logger().Error(err.Error()) + return nil + } + + // Find a timestamp for all metrics in output + timestamp := aws.FindTimestamp(metricDataOutput) + if !timestamp.IsZero() { + for _, output := range metricDataOutput { + if len(output.Values) == 0 { + continue + } + exists, timestampIdx := aws.CheckTimestampInArray(timestamp, output.Timestamps) + if exists { + labels := strings.Split(*output.Label, labelSeparator) + + event := aws.InitEvent("", m.AccountName, m.AccountID) + event.MetricSetFields.Put(labels[0], output.Values[timestampIdx]) + + i := 1 + for i < len(labels)-1 { + event.MetricSetFields.Put(labels[i], labels[i+1]) + i += 2 + } + event.Timestamp = endTime + events = append(events, event) + } + } + } + return events +} + +func (m *MetricSet) getCostGroupBy(svcCostExplorer costexploreriface.ClientAPI, groupByDimKeys []string, groupByTags []string, timePeriod costexplorer.DateInterval, startDate string, endDate string) []mb.Event { + var events []mb.Event + + groupBys := getGroupBys(groupByTags, groupByDimKeys) + for _, groupBy := range groupBys { + var groupDefs []costexplorer.GroupDefinition + + if groupBy.dimension != "" { + groupDefs = append(groupDefs, costexplorer.GroupDefinition{ + Key: awssdk.String(groupBy.dimension), + Type: costexplorer.GroupDefinitionTypeDimension, + }) + } + + if groupBy.tag != "" { + groupDefs = append(groupDefs, costexplorer.GroupDefinition{ + Key: awssdk.String(groupBy.tag), + Type: costexplorer.GroupDefinitionTypeTag, + }) + } + + groupByCostInput := costexplorer.GetCostAndUsageInput{ + Granularity: costexplorer.GranularityDaily, + // no permission for "NetAmortizedCost" and "NetUnblendedCost" + Metrics: []string{"AmortizedCost", "BlendedCost", + "NormalizedUsageAmount", "UnblendedCost", "UsageQuantity"}, + TimePeriod: &timePeriod, + // Only two values for GroupBy are allowed + GroupBy: groupDefs, + } + + groupByCostReq := svcCostExplorer.GetCostAndUsageRequest(&groupByCostInput) + groupByOutput, err := groupByCostReq.Send(context.Background()) + if err != nil { + err = fmt.Errorf("costexplorer GetCostAndUsageRequest failed: %w", err) + m.Logger().Errorf(err.Error()) + return nil + } + + if len(groupByOutput.ResultsByTime) > 0 { + costResultGroups := groupByOutput.ResultsByTime[0].Groups + for _, group := range costResultGroups { + event := m.addCostMetrics(group.Metrics, groupByOutput.GroupDefinitions[0], startDate, endDate) + + // generate unique event ID for each event + eventID := startDate + endDate + *groupByOutput.GroupDefinitions[0].Key + string(groupByOutput.GroupDefinitions[0].Type) + for _, key := range group.Keys { + eventID += key + // key value like db.t2.micro or Amazon Simple Queue Service belongs to dimension + if !strings.Contains(key, "$") { + event.MetricSetFields.Put("group_by."+groupBy.dimension, key) + continue + } + + // tag key value is separated by $ + tagKey, tagValue := parseGroupKey(key) + if tagValue != "" { + event.MetricSetFields.Put("group_by."+tagKey, tagValue) + } + } + + t, err := time.Parse(dateLayout, endDate) + if err == nil { + event.Timestamp = t + } + + event.ID = generateEventID(eventID) + events = append(events, event) + } + } + } + return events +} + +func (m *MetricSet) addCostMetrics(metrics map[string]costexplorer.MetricValue, groupDefinition costexplorer.GroupDefinition, startDate string, endDate string) mb.Event { + event := aws.InitEvent("", m.AccountName, m.AccountID) + + // add group definition + event.MetricSetFields.Put("group_definition", common.MapStr{ + "key": *groupDefinition.Key, + "type": groupDefinition.Type, + }) + + for metricName, metricValues := range metrics { + cost := metricValues + costFloat, err := strconv.ParseFloat(*cost.Amount, 64) + if err != nil { + err = fmt.Errorf("strconv ParseFloat failed: %w", err) + m.Logger().Errorf(err.Error()) + continue + } + + value := common.MapStr{ + "amount": costFloat, + "unit": &cost.Unit, + } + + event.MetricSetFields.Put(metricName, value) + event.MetricSetFields.Put("start_date", startDate) + event.MetricSetFields.Put("end_date", endDate) + } + return event +} + +func constructMetricQueries(listMetricsOutput []cloudwatch.Metric, period time.Duration) []cloudwatch.MetricDataQuery { + var metricDataQueries []cloudwatch.MetricDataQuery + metricDataQueryEmpty := cloudwatch.MetricDataQuery{} + for i, listMetric := range listMetricsOutput { + metricDataQuery := createMetricDataQuery(listMetric, i, period) + if metricDataQuery == metricDataQueryEmpty { + continue + } + metricDataQueries = append(metricDataQueries, metricDataQuery) + } + return metricDataQueries +} + +func createMetricDataQuery(metric cloudwatch.Metric, index int, period time.Duration) (metricDataQuery cloudwatch.MetricDataQuery) { + statistic := "Maximum" + periodInSeconds := int64(period.Seconds()) + id := metricsetName + strconv.Itoa(index) + metricDims := metric.Dimensions + metricName := *metric.MetricName + + label := metricName + labelSeparator + for _, dim := range metricDims { + label += *dim.Name + labelSeparator + *dim.Value + labelSeparator + } + + metricDataQuery = cloudwatch.MetricDataQuery{ + Id: &id, + MetricStat: &cloudwatch.MetricStat{ + Period: &periodInSeconds, + Stat: &statistic, + Metric: &metric, + }, + Label: &label, + } + return +} + +func getStartDateEndDate(period time.Duration) (startDate string, endDate string) { + currentTime := time.Now() + startTime := currentTime.Add(period * -1) + startDate = startTime.Format(dateLayout) + endDate = currentTime.Format(dateLayout) + return +} + +func parseGroupKey(groupKey string) (tagKey string, tagValue string) { + keys := strings.Split(groupKey, "$") + if len(keys) == 2 { + tagKey = keys[0] + tagValue = keys[1] + } else if len(keys) > 2 { + tagKey = keys[0] + tagValue = keys[1] + for i := 2; i < len(keys); i++ { + tagValue = tagValue + "$" + keys[i] + } + } else { + tagKey = keys[0] + tagValue = "" + } + return +} + +type groupBy struct { + tag string + dimension string +} + +func getGroupBys(groupByTags []string, groupByDimKeys []string) []groupBy { + var groupBys []groupBy + + if len(groupByTags) == 0 { + groupByTags = []string{""} + } + if len(groupByDimKeys) == 0 { + groupByDimKeys = []string{""} + } + + for _, tagKey := range groupByTags { + for _, dimKey := range groupByDimKeys { + groupBy := groupBy{ + tag: tagKey, + dimension: dimKey, + } + groupBys = append(groupBys, groupBy) + } + } + return groupBys +} + +func generateEventID(eventID string) string { + // create eventID using hash of startDate + endDate + groupDefinitionKey + groupDefinitionType + values + // This will prevent more than one billing metric getting collected in the same day. + h := sha256.New() + h.Write([]byte(eventID)) + prefix := hex.EncodeToString(h.Sum(nil)) + return prefix[:20] +} diff --git a/x-pack/metricbeat/module/aws/billing/billing_integration_test.go b/x-pack/metricbeat/module/aws/billing/billing_integration_test.go index 3d8cbff0598..af603626ffb 100644 --- a/x-pack/metricbeat/module/aws/billing/billing_integration_test.go +++ b/x-pack/metricbeat/module/aws/billing/billing_integration_test.go @@ -8,15 +8,56 @@ package billing import ( + "fmt" + "strconv" "testing" + "github.com/elastic/beats/v7/libbeat/common" mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws" "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/mtest" ) func TestData(t *testing.T) { - config := mtest.GetConfigForTest(t, "billing", "300s") + resultTypeIs := func(resultType string) func(e common.MapStr) bool { + return func(e common.MapStr) bool { + v, err := e.GetValue("aws.billing.group_definition.key") + if err == nil { + // Check for Cost Explorer billing metrics + k, _ := e.GetValue("aws.billing.group_by." + v.(string)) + exists, _ := aws.StringInSlice(k.(string), []string{"NoAZ", "NoInstanceType"}) + if !exists { + return v == resultType + } + } + // Check for CloudWatch billing metrics + exists, err := e.HasKey("aws.billing.EstimatedCharges") + return err == nil && strconv.FormatBool(exists) == resultType + } + } - metricSet := mbtest.NewFetcher(t, config) - metricSet.WriteEvents(t, "/") + dataFiles := []struct { + resultType string + path string + }{ + {"AZ", "./_meta/data.json"}, + {"INSTANCE_TYPE", "./_meta/data_group_by_instance_type.json"}, + {"true", "./_meta/data_cloudwatch.json"}, + } + + config := mtest.GetConfigForTest(t, "billing", "24h") + config = addCostExplorerToConfig(config) + for _, df := range dataFiles { + metricSet := mbtest.NewFetcher(t, config) + t.Run(fmt.Sprintf("result type: %s", df.resultType), func(t *testing.T) { + metricSet.WriteEventsCond(t, df.path, resultTypeIs(df.resultType)) + }) + } +} + +func addCostExplorerToConfig(config map[string]interface{}) map[string]interface{} { + costExplorerConfig := map[string]interface{}{} + costExplorerConfig["group_by_dimension_keys"] = []string{"AZ", "INSTANCE_TYPE"} + config["cost_explorer_config"] = costExplorerConfig + return config } diff --git a/x-pack/metricbeat/module/aws/billing/billing_test.go b/x-pack/metricbeat/module/aws/billing/billing_test.go index 664eeea5103..2ecd511109d 100644 --- a/x-pack/metricbeat/module/aws/billing/billing_test.go +++ b/x-pack/metricbeat/module/aws/billing/billing_test.go @@ -2,20 +2,104 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +// +build !integration + package billing import ( - "os" - - "github.com/elastic/beats/v7/metricbeat/mb" + "testing" + "time" - // Register input module and metricset - _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws" - _ "github.com/elastic/beats/v7/x-pack/metricbeat/module/aws/cloudwatch" + "github.com/stretchr/testify/assert" ) -func init() { - // To be moved to some kind of helper - os.Setenv("BEAT_STRICT_PERMS", "false") - mb.Registry.SetSecondarySource(mb.NewLightModulesSource("../../../module")) +func TestGetStartDateEndDate(t *testing.T) { + startDate, endDate := getStartDateEndDate(time.Duration(24) * time.Hour) + assert.NotEmpty(t, startDate) + assert.NotEmpty(t, endDate) +} + +func TestParseGroupKey(t *testing.T) { + cases := []struct { + title string + groupKey string + expectedTagKey string + expectedTagValue string + }{ + { + "empty tag value", + "aws:createdBy$", + "aws:createdBy", + "", + }, + { + "with a tag value of assumed role", + "aws:createdBy$AssumedRole:AROAWHL7AXDB:158385", + "aws:createdBy", + "AssumedRole:AROAWHL7AXDB:158385", + }, + { + "with a tag value of IAM user", + "aws:createdBy$IAMUser:AIDAWHL7AXDB:foo@test.com", + "aws:createdBy", + "IAMUser:AIDAWHL7AXDB:foo@test.com", + }, + { + "tag value with $", + "aws:createdBy$IAMUser:AIDAWH$L7AXDB:foo@test.com", + "aws:createdBy", + "IAMUser:AIDAWH$L7AXDB:foo@test.com", + }, + } + + for _, c := range cases { + t.Run(c.title, func(t *testing.T) { + tagKey, tagValue := parseGroupKey(c.groupKey) + assert.Equal(t, c.expectedTagKey, tagKey) + assert.Equal(t, c.expectedTagValue, tagValue) + }) + } +} + +func TestGetGroupBys(t *testing.T) { + cases := []struct { + title string + groupByTags []string + groupByDimKeys []string + expectedGroupBys []groupBy + }{ + { + "test with both tags and dimKeys", + []string{"createdBy"}, + []string{"AZ", "INSTANCE_TYPE"}, + []groupBy{ + {"createdBy", "AZ"}, + {"createdBy", "INSTANCE_TYPE"}, + }, + }, + { + "test with only dimKeys", + []string{}, + []string{"AZ", "INSTANCE_TYPE"}, + []groupBy{ + {"", "AZ"}, + {"", "INSTANCE_TYPE"}, + }, + }, + { + "test with only tags", + []string{"createdBy"}, + []string{}, + []groupBy{ + {"createdBy", ""}, + }, + }, + } + + for _, c := range cases { + t.Run(c.title, func(t *testing.T) { + groupBys := getGroupBys(c.groupByTags, c.groupByDimKeys) + assert.Equal(t, c.expectedGroupBys, groupBys) + }) + } } diff --git a/x-pack/metricbeat/module/aws/billing/manifest.yml b/x-pack/metricbeat/module/aws/billing/manifest.yml deleted file mode 100644 index cca412df649..00000000000 --- a/x-pack/metricbeat/module/aws/billing/manifest.yml +++ /dev/null @@ -1,10 +0,0 @@ -default: true -input: - module: aws - metricset: cloudwatch - defaults: - regions: - - us-east-1 - metrics: - - namespace: AWS/Billing - statistic: ["Maximum"] diff --git a/x-pack/metricbeat/module/aws/fields.go b/x-pack/metricbeat/module/aws/fields.go index 6124034a43a..12efc5c0cf9 100644 --- a/x-pack/metricbeat/module/aws/fields.go +++ b/x-pack/metricbeat/module/aws/fields.go @@ -19,5 +19,5 @@ func init() { // AssetAws returns asset data. // This is the base64 encoded gzipped contents of module/aws.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XPdnf6a/1F+p8dqhOfIDoi27ap9ITWeQyrD+X8BAAD//8xXL/c=" } diff --git a/x-pack/metricbeat/modules.d/aws.yml.disabled b/x-pack/metricbeat/modules.d/aws.yml.disabled index 8ddb3333f70..d0053297885 100644 --- a/x-pack/metricbeat/modules.d/aws.yml.disabled +++ b/x-pack/metricbeat/modules.d/aws.yml.disabled @@ -33,11 +33,16 @@ - sns - sqs - module: aws - period: 12h + period: 24h metricsets: - billing - regions: - - us-east-1 + cost_explorer_config: + group_by_dimension_keys: + - "AZ" + - "INSTANCE_TYPE" + - "SERVICE" +# group_by_tag_keys: +# - "aws:createdBy" - module: aws period: 24h metricsets: