Skip to content

Commit

Permalink
Fix service start type mapping in windows/service metricset (elastic#…
Browse files Browse the repository at this point in the history
…19551)

* fit service start type

* test

* changelog
  • Loading branch information
narph authored and melchiormoulin committed Oct 14, 2020
1 parent 6ee17e1 commit b80a992
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/windows/service/service_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ const (
ConfigPreshutdownInfo ConfigInformation = 7
ConfigRequiredPrivilegesInfo ConfigInformation = 6
ConfigServiceSidInfo ConfigInformation = 5
)

const (
StartTypeBoot ServiceStartType = iota
StartTypeSystem
StartTypeAutomatic
Expand Down

0 comments on commit b80a992

Please sign in to comment.