[0.30] iis: missing metrics if app-include is set. (#2103) (#2141)

This commit is contained in:
Jan-Otto Kröpke
2025-07-20 08:15:50 +02:00
committed by GitHub
parent 7fa029a403
commit 0f7f8f2583
2 changed files with 0 additions and 16 deletions

View File

@@ -505,10 +505,6 @@ func (c *Collector) collectW3SVCW3WPv7(ch chan<- prometheus.Metric) error {
deduplicateIISNames(c.perfDataObjectW3SVCW3WP)
for _, data := range c.perfDataObjectW3SVCW3WP {
if c.config.AppExclude.MatchString(data.Name) || !c.config.AppInclude.MatchString(data.Name) {
continue
}
// Extract the apppool name from the format <PID>_<NAME>
pid := workerProcessNameExtractor.ReplaceAllString(data.Name, "$1")

View File

@@ -62,8 +62,6 @@ type collectorWebServiceCache struct {
}
type perfDataCounterServiceCache struct {
Name string
ServiceCacheActiveFlushedEntries float64 `perfdata:"Active Flushed Entries"`
ServiceCacheCurrentFileCacheMemoryUsage float64 `perfdata:"Current File Cache Memory Usage"`
ServiceCacheMaximumFileCacheMemoryUsage float64 `perfdata:"Maximum File Cache Memory Usage"`
@@ -100,10 +98,6 @@ type perfDataCounterServiceCache struct {
ServiceCacheOutputCacheFlushesTotal float64 `perfdata:"Output Cache Total Flushes"`
}
func (p perfDataCounterServiceCache) GetName() string {
return p.Name
}
func (c *Collector) buildWebServiceCache() error {
var err error
@@ -291,13 +285,7 @@ func (c *Collector) collectWebServiceCache(ch chan<- prometheus.Metric) error {
return fmt.Errorf("failed to collect Web Service Cache metrics: %w", err)
}
deduplicateIISNames(c.perfDataObjectServiceCache)
for _, data := range c.perfDataObjectServiceCache {
if c.config.SiteExclude.MatchString(data.Name) || !c.config.SiteInclude.MatchString(data.Name) {
continue
}
ch <- prometheus.MustNewConstMetric(
c.serviceCacheActiveFlushedEntries,
prometheus.GaugeValue,