Skip to content

Commit

Permalink
process: fix metric labels for multiple process instances
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Dec 3, 2024
1 parent 109c34f commit 78dc810
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/collector/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {

for name, process := range perfData {
// Duplicate processes are suffixed #, and an index number. Remove those.
name, _, _ = strings.Cut(name, "#")
name, _, _ = strings.Cut(name, ":") // Process V2
name, _, _ = strings.Cut(name, "#") // Process

if c.config.ProcessExclude.MatchString(name) || !c.config.ProcessInclude.MatchString(name) {
continue
Expand Down

0 comments on commit 78dc810

Please sign in to comment.