Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix service start type mapping in windows/service metricset #19551

Merged
merged 5 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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