Skip to content

Commit

Permalink
Handling missing counters in application_pool metricset (elastic#21071)
Browse files Browse the repository at this point in the history
* mofidy doc

* fix

* changelog

(cherry picked from commit bdfff66)
  • Loading branch information
narph committed Sep 17, 2020
1 parent 0b96355 commit 4c79a4b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fix overflow on Prometheus rates when new buckets are added on the go. {pull}17753[17753]
- Add a switch to the driver definition on SQL module to use pretty names {pull}17378[17378]
- The `elasticsearch/index` metricset only requests wildcard expansion for hidden indices if the monitored Elasticsearch cluster supports it. {pull}20938[20938]
- Disable Kafka metricsets based on Jolokia by default. They require a different configuration. {pull}20989[20989]
- Handle missing counters in the application_pool metricset. {pull}21071[21071]

*Packetbeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func (m *MetricSet) Fetch(report mb.ReporterV2) error {
break
}
}

return nil
}

Expand Down
4 changes: 2 additions & 2 deletions x-pack/metricbeat/module/iis/application_pool/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ func (r *Reader) initAppPools() error {
if err == pdh.PDH_CSTATUS_NO_COUNTER || err == pdh.PDH_CSTATUS_NO_COUNTERNAME || err == pdh.PDH_CSTATUS_NO_INSTANCE || err == pdh.PDH_CSTATUS_NO_OBJECT {
r.log.Infow("Ignoring non existent counter", "error", err,
logp.Namespace("application pool"), "query", value)
continue
} else {
return errors.Wrapf(err, `failed to expand counter (query="%v")`, value)
r.log.Error(err, `failed to expand counter path (query= "%v")`, value)
}
continue
}
newQueries = append(newQueries, childQueries...)
// check if the pdhexpandcounterpath/pdhexpandwildcardpath functions have expanded the counter successfully.
Expand Down

0 comments on commit 4c79a4b

Please sign in to comment.