diff --git a/collector/iis.go b/collector/iis.go index 461b0d0d..e8a7a6a1 100644 --- a/collector/iis.go +++ b/collector/iis.go @@ -1340,11 +1340,7 @@ func (c *IISCollector) collectW3SVC_W3WP(ctx *ScrapeContext, ch chan<- prometheu // Extract the apppool name from the format _ pid := workerProcessNameExtractor.ReplaceAllString(app.Name, "$1") name := workerProcessNameExtractor.ReplaceAllString(app.Name, "$2") - if name == "" { - log.Error("no instances found in W3SVC_W3WP - skipping collection") - break - } - if name == "_Total" || + if name == "" || name == "_Total" || c.appBlacklistPattern.MatchString(name) || !c.appWhitelistPattern.MatchString(name) { continue @@ -1596,11 +1592,7 @@ func (c *IISCollector) collectW3SVC_W3WP(ctx *ScrapeContext, ch chan<- prometheu // Extract the apppool name from the format _ pid := workerProcessNameExtractor.ReplaceAllString(app.Name, "$1") name := workerProcessNameExtractor.ReplaceAllString(app.Name, "$2") - if name == "" { - log.Error("no instances found in W3SVC_W3WP_IIS8 - skipping collection") - break - } - if name == "_Total" || + if name == "" || name == "_Total" || c.appBlacklistPattern.MatchString(name) || !c.appWhitelistPattern.MatchString(name) { continue