Skip to content

Commit bdfff66

Browse files
authored
Handling missing counters in application_pool metricset (#21071)
* mofidy doc * fix * changelog
1 parent fd0fe73 commit bdfff66

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

CHANGELOG.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
342342
- Update fields.yml in the azure module, missing metrics field. {pull}20918[20918]
343343
- The `elasticsearch/index` metricset only requests wildcard expansion for hidden indices if the monitored Elasticsearch cluster supports it. {pull}20938[20938]
344344
- Disable Kafka metricsets based on Jolokia by default. They require a different configuration. {pull}20989[20989]
345+
- Handle missing counters in the application_pool metricset. {pull}21071[21071]
345346

346347
*Packetbeat*
347348

x-pack/metricbeat/module/iis/application_pool/application_pool.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ func (m *MetricSet) Fetch(report mb.ReporterV2) error {
8484
break
8585
}
8686
}
87-
8887
return nil
8988
}
9089

x-pack/metricbeat/module/iis/application_pool/reader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ func (r *Reader) initAppPools() error {
101101
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 {
102102
r.log.Infow("Ignoring non existent counter", "error", err,
103103
logp.Namespace("application pool"), "query", value)
104-
continue
105104
} else {
106-
return errors.Wrapf(err, `failed to expand counter (query="%v")`, value)
105+
r.log.Error(err, `failed to expand counter path (query= "%v")`, value)
107106
}
107+
continue
108108
}
109109
newQueries = append(newQueries, childQueries...)
110110
// check if the pdhexpandcounterpath/pdhexpandwildcardpath functions have expanded the counter successfully.

0 commit comments

Comments
 (0)