Closed d-zalewski closed 7 years ago
If the file which is referred in the log message is the file you uploaded, it seams the perfdata file is interpreted as nagflux file. Maybe the file is stored in the wrong folders. You could try to separate the NagiosSpoolfileFolder, and the NagfluxSpoolfileFolder which are currently within each other.
I've changed the folder location as suggested and I can see nagflux picksup the data but I'm getting following errors back from influxdb
I got golang-github-influxdb-influxdb-client-0.8.5-0.1.git9485e99.el6.x86_64 installed and influxdb server is runing 0.13. Do I need a newer version of a client?
2016-09-08 11:53:08 Warn: Influx status: 400 Bad Request - {"error":"partial write:\nunable to parse 'metrics,host=SRV1,service=Disk\\ Usage\\ -\\ Other\\ Drives,command=check_nrpe,performanceLabel=D:\\\\,warn-fill=none,crit-fill=none,unit=G value=9.72899,warn=28.498,crit=29.398,min=0.0,max=29.998 1473331470000': invalid tag format\nunable to parse 'metrics,host=SRV2,service=Disk\\ Usage\\ -\\ Other\\ Drives,command=check_nrpe,performanceLabel=E:\\\\,warn-fill=none,crit-fill=none,unit=G max=99.997,value=80.906,warn=94.997,crit=97.997,min=0.0 1473331470000': invalid tag format\nunable to parse 'metrics,host=SRV2,service=Disk\\ Usage\\ -\\ Other\\ Drives,command=check_nrpe,performanceLabel=F:\\\\,crit-fill=none,warn-fill=none,unit=G value=3.198,warn=18.997,crit=19.597,min=0.0,max=19.997 1473331470000': invalid tag format\nunable to parse 'metrics,host=SRV3,service=Disk\\ Usage\\ -\\ Other\\ Drives,command=check_nrpe,performanceLabel=E:\\\\,warn-fill=none,crit-fill=none,unit=M warn=9726.096,crit=10033.236,min=0.0,max=10237.996,value=160.063 1473331470000': invalid tag format\nunable to parse 'metrics,host=SRV4,service=Disk\\ Usage\\ -\\ Other\\ Drives,command=check_nrpe,performanceLabel=D:\\\\,warn-fill=none,crit-fill=none,unit=G value=2.955,warn=56.998,crit=58.798,min=0.0,max=59.998 1473331470000': invalid tag format\nunable to parse 'met
Also in the nagflux error dump file I got:
One of the values is not clean..
metrics,host=SRV1,service=Disk\ Usage\ -\ Other\ Drives,command=check_nrpe,performanceLabel=E:\\,warn-fill=none,crit-fill=none,unit=M value=171.457,warn=9726.096,crit=10033.236,min=0.0,max=10237.996 1473256540000
metrics,host=SRV2,service=Disk\ Usage\ -\ Other\ Drives,command=check_nrpe,performanceLabel=D:\\,crit-fill=none,warn-fill=none,unit=G crit=58.798,min=0.0,max=59.998,value=14.575,warn=56.998 1473256540000
metrics,host=SRV3,service=Disk\ Usage\ -\ Other\ Drives,command=check_nrpe,performanceLabel=E:\\,warn-fill=none,crit-fill=none,unit=G warn=56.997,crit=58.797,min=0.0,max=59.997,value=52.464 1473256540000
metrics,host=SRV4,service=Disk\ Usage\ -\ Other\ Drives,command=check_nrpe,performanceLabel=D:\\,crit-fill=none,warn-fill=none,unit=M warn=58366.096,crit=60209.236,min=0.0,max=61437.996,value=511.996 1473256540000
Btw. the influxdb go client is not necessary for nagflux. This is an Influxdb bug, the current Influxdb can not handle backspaces as last char in a tag: https://github.com/influxdata/influxdb/issues/6672 - 'performanceLabel=E:\' e.g.
But the rest of your data should be in the database
Apparently it was fixed and merged to master on 26th of May.
https://github.com/influxdata/influxdb/commit/6f25d97de4cc1328241807423f0467bc5ef03e55
Its included in the changelog for 1.0 https://github.com/influxdata/influxdb/blob/master/CHANGELOG.md
I just tried 1.0GA from https://dl.influxdata.com/influxdb/releases/influxdb-1.0.0.x86_64.rpm and still getting same errors.
Backslash issue was fixed back in 0.9.3 https://github.com/influxdata/influxdb/issues/3704
metrics,host=srv1,service=Disk\ Usage\ -\ Other\ Drives,command=check_nrpe,performanceLabel=E:\\,warn-fill=none,crit-fill=none,unit=G value=65.712,warn=104.497,crit=107.797,min=0.0,max=109.997 1473331480000
In addition to that I'm getting:
2016-09-08 15:46:25 Warn: NagiosSpoolfileCollector: Could not write to buffer
2016-09-08 15:46:25 Warn: NagiosSpoolfileWorker: Could not write to buffer
2016-09-08 15:45:47 Warn: Post http://10.x.x.x:8086/write?precision=ms&db=nagflux: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
2016-09-08 15:45:47 Warn: Post http://10.x.x.x:8086/write?precision=ms&db=nagflux: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
I noted the wrong InfluxDB issue, in your case there's no trailing whitespace it's the trailing backslash and this bug is still open: https://github.com/influxdata/influxdb/issues/6008.
Regarding your second problem with the timeouts, I can't tell you anything it seams that your connection to the Influxdb seems to be too slow? That could be anything.
I'll close that one due to inactivity
Naglfux crashes and fails to process host perfdata. Occasionaly I'm getting:
doesn't contain all of these fields: [table time]
servmon1:root:/etc/nagflux> go version go version go1.5.1 linux/amd64
Nagios 4.1.1
I've attached my naglux config and host perfdata file it failed to process.
config.gcfg.txt host-perfdata.1473250552.txt
Nagios perfdata definition and process command:
perfdata.cfg.txt