Skip to content

Commit

Permalink
fix: Solved the problem that the value of label command in command_ex…
Browse files Browse the repository at this point in the history
…ec_count metrics starts with "\n"
  • Loading branch information
pourer committed Jul 25, 2020
1 parent 9c09260 commit ec68336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/metrics/command_exec_count.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var collectCommandExecCountMetrics = map[string]MetricConfig{
Parser: &regexParser{
name: "command_exec_count_command",
source: "commands_count",
reg: regexp.MustCompile(`(?P<command>[^:]+):(?P<count>[\d]*)`),
reg: regexp.MustCompile(`(\r|\n)*(?P<command>[^:]+):(?P<count>[\d]*)`),
Parser: &normalParser{},
},
},
Expand Down

0 comments on commit ec68336

Please sign in to comment.