collector: don't prepend path if already absolute
Fixes #199 Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
This commit is contained in:
parent
6874424d25
commit
91ea20628e
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue