diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 51b8627e7212..7ccf82239353 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -497,6 +497,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add stack monitoring section to elasticsearch module documentation {pull}#23286[23286] - Fix metric grouping for windows/perfmon module {issue}23489[23489] {pull}23505[23505] - Add check for iis/application_pool metricset for nil worker process id values. {issue}23605[23605] {pull}23647[23647] +- Unskip s3_request integration test. {pull}23887[23887] - Add system.hostfs configuration option for system module. {pull}23831[23831] *Packetbeat* @@ -954,6 +955,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Apache: convert status.total_kbytes to status.total_bytes in fleet mode. {pull}23022[23022] - Release MSSQL as GA {pull}23146[23146] - Enrich events of `state_service` metricset with kubernetes services' metadata. {pull}23730[23730] +- Check fields are documented in aws metricsets. {pull}23887[23887] *Packetbeat* diff --git a/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go b/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go index c99c6acb40c2..f2a136c36a32 100644 --- a/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go +++ b/x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_integration_test.go @@ -27,6 +27,7 @@ func TestFetch(t *testing.T) { } assert.NotEmpty(t, events) + mbtest.TestMetricsetFieldsDocumented(t, metricSet, events) } func TestData(t *testing.T) { diff --git a/x-pack/metricbeat/module/aws/rds/rds_integration_test.go b/x-pack/metricbeat/module/aws/rds/rds_integration_test.go index 0be93854039d..f19d5a7dd054 100644 --- a/x-pack/metricbeat/module/aws/rds/rds_integration_test.go +++ b/x-pack/metricbeat/module/aws/rds/rds_integration_test.go @@ -26,24 +26,7 @@ func TestFetch(t *testing.T) { } assert.NotEmpty(t, events) - - for _, event := range events { - t.Logf("%s/%s event: %+v", metricSet.Module().Name(), metricSet.Name(), event) - - // RootField - mtest.CheckEventField("service.name", "string", event, t) - mtest.CheckEventField("cloud.provider", "string", event, t) - mtest.CheckEventField("cloud.provider", "string", event, t) - mtest.CheckEventField("cloud.region", "string", event, t) - mtest.CheckEventField("cloud.availability_zone", "string", event, t) - - // MetricSetField - mtest.CheckEventField("db_instance.arn", "string", event, t) - mtest.CheckEventField("db_instance.class", "string", event, t) - mtest.CheckEventField("queries", "float", event, t) - mtest.CheckEventField("latency.select", "float", event, t) - mtest.CheckEventField("login_failures", "float", event, t) - } + mbtest.TestMetricsetFieldsDocumented(t, metricSet, events) } func TestData(t *testing.T) { diff --git a/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go b/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go index e570cd5bb730..e410251090e3 100644 --- a/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go +++ b/x-pack/metricbeat/module/aws/s3_daily_storage/s3_daily_storage_integration_test.go @@ -27,14 +27,7 @@ func TestFetch(t *testing.T) { } assert.NotEmpty(t, events) - - for _, event := range events { - mtest.CheckEventField("cloud.region", "string", event, t) - mtest.CheckEventField("aws.dimensions.BucketName", "string", event, t) - mtest.CheckEventField("aws.dimensions.StorageType", "string", event, t) - mtest.CheckEventField("aws.s3.metrics.BucketSizeBytes.avg", "float", event, t) - mtest.CheckEventField("aws.s3.metrics.NumberOfObjects.avg", "float", event, t) - } + mbtest.TestMetricsetFieldsDocumented(t, metricSet, events) } func TestData(t *testing.T) { diff --git a/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go b/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go index 6836d8469756..cd11e95fd88a 100644 --- a/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go +++ b/x-pack/metricbeat/module/aws/s3_request/s3_request_integration_test.go @@ -18,7 +18,6 @@ import ( ) func TestFetch(t *testing.T) { - t.Skip("flaky test: https://github.com/elastic/beats/issues/21826") config := mtest.GetConfigForTest(t, "s3_request", "60s") metricSet := mbtest.NewReportingMetricSetV2Error(t, config) @@ -28,28 +27,7 @@ func TestFetch(t *testing.T) { } assert.NotEmpty(t, events) - - for _, event := range events { - mtest.CheckEventField("cloud.region", "string", event, t) - mtest.CheckEventField("aws.dimensions.BucketName", "string", event, t) - mtest.CheckEventField("aws.dimensions.StorageType", "string", event, t) - mtest.CheckEventField("s3.metrics.AllRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.GetRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.PutRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.DeleteRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.HeadRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.PostRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.SelectRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.SelectScannedBytes.avg", "float", event, t) - mtest.CheckEventField("s3.metrics.SelectReturnedBytes.avg", "float", event, t) - mtest.CheckEventField("s3.metrics.ListRequests.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.BytesDownloaded.avg", "float", event, t) - mtest.CheckEventField("s3.metrics.BytesUploaded.avg", "float", event, t) - mtest.CheckEventField("s3.metrics.4xxErrors.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.5xxErrors.avg", "int", event, t) - mtest.CheckEventField("s3.metrics.FirstByteLatency.avg", "float", event, t) - mtest.CheckEventField("s3.metrics.TotalRequestLatency.avg", "float", event, t) - } + mbtest.TestMetricsetFieldsDocumented(t, metricSet, events) } func TestData(t *testing.T) { diff --git a/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go b/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go index 3f1eddb9faa9..24f1c314b73d 100644 --- a/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go +++ b/x-pack/metricbeat/module/aws/sqs/sqs_integration_test.go @@ -27,23 +27,7 @@ func TestFetch(t *testing.T) { } assert.NotEmpty(t, events) - - for _, event := range events { - // RootField - mtest.CheckEventField("service.name", "string", event, t) - mtest.CheckEventField("cloud.region", "string", event, t) - // MetricSetField - mtest.CheckEventField("empty_receives", "float", event, t) - mtest.CheckEventField("messages.delayed", "float", event, t) - mtest.CheckEventField("messages.deleted", "float", event, t) - mtest.CheckEventField("messages.not_visible", "float", event, t) - mtest.CheckEventField("messages.received", "float", event, t) - mtest.CheckEventField("messages.sent", "float", event, t) - mtest.CheckEventField("messages.visible", "float", event, t) - mtest.CheckEventField("oldest_message_age.sec", "float", event, t) - mtest.CheckEventField("sent_message_size", "float", event, t) - mtest.CheckEventField("queue.name", "string", event, t) - } + mbtest.TestMetricsetFieldsDocumented(t, metricSet, events) } func TestData(t *testing.T) {