diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 6f219db6f7f..105e48ee125 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -267,6 +267,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] - Set tags correctly if the dimension value is ARN {issue}19111[19111] {pull}19433[19433] - 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] - Fix config example in the perfmon configuration files. {pull}19539[19539] - Add missing info about the rest of the azure metricsets in the documentation. {pull}19601[19601] - Fix k8s scheduler compatibility issue. {pull}19699[19699] 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"], 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