hoonmin / influxdb-collectd-proxy

A very simple proxy between collectd and influxdb.
MIT License
72 stars 26 forks source link

proxy startup fails #12

Closed digitalrinaldo closed 9 years ago

digitalrinaldo commented 10 years ago

When you use the options below to start the influxdb-collectd-proxy an error condition occurs.

bin/proxy --typesdb="./types.db" --database="collectd" --username="" --password=""

2014/09/20 06:10:57 failed to read types.db: open types.db: no such file or directory

The distribution includes typesdb.com, when I change to --typesdb="./typesdb" I get the following

--typesdb="./types.db"

panic: runtime error: index out of range

goroutine 16 [running]: runtime.panic(0x6ae100, 0x86f25c) /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5 main.ParseTypesDB(0x7fffb5ad9492, 0xc, 0x0, 0x0, 0x0) /opt/influxdb-collectd-proxy/typesdb.go:32 +0x816 main.init·1() /opt/influxdb-collectd-proxy/proxy.go:74 +0x392 main.init() /opt/influxdb-collectd-proxy/typesdb.go:56 +0x78

goroutine 17 [runnable]: runtime.MHeap_Scavenger() /usr/local/go/src/pkg/runtime/mheap.c:507 runtime.goexit() /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 18 [runnable]: bgsweep() /usr/local/go/src/pkg/runtime/mgc0.c:1976 runtime.goexit() /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 19 [runnable]: runfinq() /usr/local/go/src/pkg/runtime/mgc0.c:2606 runtime.goexit() /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 20 [runnable]: os/signal.loop() /usr/local/go/src/pkg/os/signal/signal_unix.go:19 created by os/signal.init·1 /usr/local/go/src/pkg/os/signal/signal_unix.go:27 +0x32

hoonmin commented 10 years ago

@digitalrinaldo Firstly thank you for trying influxdb-collectd-proxy. I guess you've missed types.db file itself. As the distribution does not contain types.db file, so you need to get one on your own to use --typesdb option.

CollectD uses a type database file, types.db and it contains key-value pairs. You can find it from the default CollectD installation ($COLLECTD_HOME/shared/collectd/types.db).

digitalrinaldo commented 10 years ago

Thanks that was it. I tried it and I am getting the following errors.

2014/09/29 00:22:42 failed to write series group to influxdb: json: unsupported value: NaN 2014/09/29 00:22:42 failed to write series group to influxdb: json: unsupported value: +Inf 2014/09/29 00:22:42 failed to write series group to influxdb: json: unsupported value: NaN 2014/09/29 00:22:42 failed to write series group to influxdb: json: unsupported value: NaN 2014/09/29 00:22:52 failed to write series group to influxdb: json: unsupported value: NaN 2014/09/29 00:22:52 failed to write series group to influxdb: json: unsupported value: NaN

hoonmin commented 9 years ago

Please refer #15