Skip to content

Commit

Permalink
Add check when retrieving the worker process id using performance cou…
Browse files Browse the repository at this point in the history
…nters (elastic#23647)

* fix for test

* add check

* changelog

(cherry picked from commit 3220d46)
  • Loading branch information
narph committed Jan 26, 2021
1 parent 74f205b commit e3e0d4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Change vsphere.datastore.capacity.used.pct value to betweeen 0 and 1. {pull}23148[23148]
- Update config in `windows.yml` file. {issue}23027[23027]{pull}23327[23327]
- 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]

*Packetbeat*

Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/iis/application_pool/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func getw3wpProceses() (map[int]string, error) {
func getProcessIds(counterValues map[string][]pdh.CounterValue) []WorkerProcess {
var workers []WorkerProcess
for key, values := range counterValues {
if strings.Contains(key, "\\ID Process") {
if strings.Contains(key, "\\ID Process") && values[0].Measurement != nil {
workers = append(workers, WorkerProcess{instanceName: values[0].Instance, processId: int(values[0].Measurement.(float64))})
}
}
Expand Down

0 comments on commit e3e0d4f

Please sign in to comment.