From c772d15461ec2a8b4745ec1e99f569a8f3dd610b Mon Sep 17 00:00:00 2001 From: Mariana Date: Wed, 1 Jul 2020 15:24:15 +0200 Subject: [PATCH 1/3] fit service start type --- metricbeat/module/windows/service/service_status.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metricbeat/module/windows/service/service_status.go b/metricbeat/module/windows/service/service_status.go index 8bef03126ad..1882b1a94f1 100644 --- a/metricbeat/module/windows/service/service_status.go +++ b/metricbeat/module/windows/service/service_status.go @@ -55,7 +55,9 @@ const ( ConfigPreshutdownInfo ConfigInformation = 7 ConfigRequiredPrivilegesInfo ConfigInformation = 6 ConfigServiceSidInfo ConfigInformation = 5 +) +const ( StartTypeBoot ServiceStartType = iota StartTypeSystem StartTypeAutomatic From 9b2adee670b1bb46151415ca612ead082e1fdbc6 Mon Sep 17 00:00:00 2001 From: Mariana Date: Wed, 1 Jul 2020 15:31:59 +0200 Subject: [PATCH 2/3] test --- metricbeat/module/windows/service/service_integration_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/metricbeat/module/windows/service/service_integration_test.go b/metricbeat/module/windows/service/service_integration_test.go index fe1e987fc89..bd7fc91c411 100644 --- a/metricbeat/module/windows/service/service_integration_test.go +++ b/metricbeat/module/windows/service/service_integration_test.go @@ -86,6 +86,7 @@ func TestReadService(t *testing.T) { assert.Equal(t, w.ProcessId, s["pid"], "PID of service %v does not match", w.DisplayName) } + assert.NotEmpty(t, s["start_type"]) // For some services DisplayName and Name are the same. It seems to be a bug from the wmi query. if w.DisplayName != w.Name { assert.Equal(t, w.DisplayName, s["display_name"], From 396a1dd766f7e11681a9e56f7501f35862c47577 Mon Sep 17 00:00:00 2001 From: Mariana Date: Wed, 1 Jul 2020 15:35:10 +0200 Subject: [PATCH 3/3] changelog --- CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 6bcd7474392..b2ae2cd0231 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -260,6 +260,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Stop counterCache only when already started {pull}19103[19103] - Add param `aws_partition` to support aws-cn, aws-us-gov regions. {issue}18850[18850] {pull}19423[19423] - Fix bug incorrect parsing of float numbers as integers in Couchbase module {issue}18949[18949] {pull}19055[19055] +- Fix mapping of service start type in the service metricset, windows module. {pull}19551[19551] *Packetbeat*