mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-12 13:36:37 +00:00
fix: iis metrics greater than IIS v7
The IIS >= 8 metrics was updated two times by application and caused a fatal error. The purpose of this fix is to update metrics one time by application. Signed-off-by: Aymeric Daurelle <aymeric.daurelle@cdiscount.com>
This commit is contained in:
committed by
Aymeric
parent
4891acba2d
commit
803a0a9a70
@@ -1574,6 +1574,8 @@ func (c *IISCollector) collectW3SVC_W3WP(ctx *ScrapeContext, ch chan<- prometheu
|
||||
pid,
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
if c.iis_version.major >= 8 {
|
||||
var W3SVC_W3WP_IIS8 []perflibW3SVC_W3WP_IIS8
|
||||
if err := unmarshalObject(ctx.perfObjects["W3SVC_W3WP"], &W3SVC_W3WP_IIS8); err != nil {
|
||||
@@ -1656,7 +1658,6 @@ func (c *IISCollector) collectW3SVC_W3WP(ctx *ScrapeContext, ch chan<- prometheu
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user