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

Cherry-pick #21071 to 7.x: Handling missing counters in application_pool metricset #21133

Merged
merged 1 commit into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -392,6 +392,7 @@ field. You can revert this change by configuring tags for the module and omittin
- Update fields.yml in the azure module, missing metrics field. {pull}20918[20918]
- 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