Skip to content

Commit

Permalink
collector: don't prepend path if already absolute
Browse files Browse the repository at this point in the history
Fixes #199

Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
  • Loading branch information
bitfehler committed Jul 9, 2024
1 parent 6874424 commit 91ea206
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ func (c metaCollector) Collect(ch chan<- prometheus.Metric) {
var up int
level.Debug(logger).Log("msg", "Running collector", "target", target.host, "collector", collector.Name())

fqcmd := path.Join(*executablesPath, collector.Cmd())
fqcmd := collector.Cmd()
if !path.IsAbs(fqcmd) {
fqcmd = path.Join(*executablesPath, collector.Cmd())
}
args := collector.Args()
cfg := config.GetFreeipmiConfig()

Expand Down

0 comments on commit 91ea206

Please sign in to comment.