Skip to content

Commit

Permalink
Cherry-pick elastic#21071 to 7.9: Handling missing counters in applic…
Browse files Browse the repository at this point in the history
…ation_pool metricset (elastic#21132)

* Handling missing counters in application_pool metricset  (elastic#21071)

* mofidy doc

* fix

* changelog

(cherry picked from commit d2dbc78)

* fix chnagelog
  • Loading branch information
narph authored Sep 17, 2020
1 parent e0ef0d3 commit 6cfd4eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ 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]
- 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 6cfd4eb

Please sign in to comment.