grafana/carbon-relay-ng

carbon-relay-ng doesn't run on OSX

fitzoh opened this issue · 0 comments

Running on OSX (10.14.2) carbon-relay-ng fails on initialization while attempting to initialize the process reporter.

It's apparently looking for /proc, which does not exist on OSX.

[FATAL] stats: could not initialize process reporter: could not read /proc: stat /proc: no such file or directory

carbon-relay-ng code in question:

_, err = statsmt.NewProcessReporter()
if err != nil {
log.Fatalf("stats: could not initialize process reporter: %v", err)
}

func NewProcessReporter() (*ProcessReporter, error) {
p := ProcessReporter{}
pid := os.Getpid()
var err error
p.proc, err = procfs.NewProc(pid)
if err != nil {
return nil, err
}
return Register.GetOrAdd("process", &p).(*ProcessReporter), nil
}