Griesbacher / nagflux

A connector which copies performancedata from Nagios / Icinga(2) / Naemon to InfluxDB
GNU General Public License v2.0
65 stars 30 forks source link

panic: counter cannot decrease in value #36

Closed Thiagor-it closed 7 years ago

Thiagor-it commented 7 years ago

Hello!

Well i'm using OMD-Labs and everthing went smoothly until 5 days ago when sudenly naglfux stopped writing data to influxdb. There is some erros on naglux's logs but i can't seem to understand whats happening, maybe you can help me.

Here is the log part just after a service reset:

2017-04-24 10:18:37 Info: Started Nagflux v0.2.7 2017-04-24 10:18:37 Info: Is InfluxDB running: true 2017-04-24 10:18:37 Info: Could not detect livestatus version, waiting for 1m0s, three times(0)... 2017-04-24 10:19:32 Info: Livestatus version: 1.0.4 2017-04-24 10:19:32 Warn: Could not detect livestatus type, with version: 1.0.4 asuming Nagios 2017-04-24 10:19:32 Info: Nagios Spoolfile Folder: /omd/sites/bennercloud/var/pn p4nagios/spool 2017-04-24 10:19:32 Info: Nagflux Spoolfile Folder: /omd/sites/bennercloud/var/n agflux panic: counter cannot decrease in value

goroutine 38 [running]: panic(0x703100, 0xc422107dc0) /opt/projects/omd/rpm.topdir/BUILD/omd-2.20-labs-edition/packages/go-1.7 /go-1.7.3/src/runtime/panic.go:500 +0x1a1 github.com/griesbacher/nagflux/vendor/github.com/prometheus/client_golang/promet heus.(counter).Add(0xc420109c00, 0xc079600000000000) /opt/projects/omd/rpm.topdir/BUILD/omd-2.20-labs-edition/packages/nagflu x/go/src/github.com/griesbacher/nagflux/vendor/github.com/prometheus/client_gola ng/prometheus/counter.go:71 +0xb3 github.com/griesbacher/nagflux/collector/spoolfile.(NagiosSpoolfileWorker).run( 0xc42015e540) /opt/projects/omd/rpm.topdir/BUILD/omd-2.20-labs-edition/packages/nagflu x/go/src/github.com/griesbacher/nagflux/collector/spoolfile/nagiosSpoolfileWorke r.go:112 +0x981 created by github.com/griesbacher/nagflux/collector/spoolfile.NagiosSpoolfileWor kerGenerator.func1 /opt/projects/omd/rpm.topdir/BUILD/omd-2.20-labs-edition/packages/nagflu x/go/src/github.com/griesbacher/nagflux/collector/spoolfile/nagiosSpoolfileWorke r.go:61 +0x121

Thanks, Thiago!

Griesbacher commented 7 years ago

Hi Thiago,

this was a bug, which should be fixed in version 0.4.0 which was added to OMD on 17.03.2017. Give that version a try ;-) but beware there were some config changes coming along with these new versions.

Best Regards, Philip

Thiagor-it commented 7 years ago

Hello Griesbacher,

Thanks for your answer, i will look into this, but can i upgrade only nagflux on OMD? Sorry for the inconvenience but can you point me the way?

Thanks, Thiago!

Griesbacher commented 7 years ago

No you can not upgrade only one program. You could replace the binary but that's hacky and not to recommanded. So you should upgrade the whole OMD Site.

Thiagor-it commented 7 years ago

Ok, everthing is fine now, thanks for the help! =)

Griesbacher commented 7 years ago

You're welcome