mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-20 11:46:36 +00:00
process: fix metric labels for multiple process instances (#1803)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -362,7 +362,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
|||||||
|
|
||||||
for name, process := range perfData {
|
for name, process := range perfData {
|
||||||
// Duplicate processes are suffixed #, and an index number. Remove those.
|
// Duplicate processes are suffixed #, and an index number. Remove those.
|
||||||
name, _, _ = strings.Cut(name, "#")
|
name, _, _ = strings.Cut(name, ":")
|
||||||
|
|
||||||
if c.config.ProcessExclude.MatchString(name) || !c.config.ProcessInclude.MatchString(name) {
|
if c.config.ProcessExclude.MatchString(name) || !c.config.ProcessInclude.MatchString(name) {
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user