Griesbacher / nagflux

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

Panic: runtime error #2

Closed jframeau closed 8 years ago

jframeau commented 8 years ago

Hi,

sometimes nagflux crashes on some notification logs.

2015-12-23 18:11:13 Warn: Query failed while csv parsing:GET log\x10Columns: type time contact_name message\x10Filter: type ~ .*NOTIFICATION\x10Filter: time < 1450890493\x10Negate:\x10OutputFor mat: csv\x10\x10

2015-12-23 18:11:13 Warn: SERVICE NOTIFICATION;1450890539;basta;[1450890539] SERVICE NOTIFICATION: basta;SYNO BACKUP;HEALTH;OK;service-notify-by-email;OK - Synology "DS414slim" (s/n: "14A0MF N175700", "DSM 5.2-5644") is in good health 2015-12-23 18:11:13 Warn: line 1, column 142: bare " in non-quoted-field panic: runtime error: index out of range

I read Go language but didn't find out the problem.

OMD[basta]:~$ omd version OMD - Open Monitoring Distribution Version 2.10-labs-edition

jfr

Griesbacher commented 8 years ago

The problem is, the CSV output from Livestatus is not valid CSV. The quotes in the message should be escaped: https://en.wikipedia.org/wiki/Comma-separated_values#Example