jhmartin / collectd-sensu

Output plugin for Collectd to send data to a local Sensu client.
Apache License 2.0
7 stars 3 forks source link

lexical error: invalid char in json text #1

Open mathiasewald opened 9 years ago

mathiasewald commented 9 years ago

Hi, I installed the plugin into collectd and configured it as suggested. Looking at my sensu-client.log I can see that tons of metric arrive from collectd but I get an error message saying

"parse_error":"lexical error: invalid char in json text.\n

This is the full line:

{"timestamp":"2015-04-18T10:02:33.574059+0200","level":"warn","message":"discarding data buffer for sender and closing connection","data":"sk.sda5.disk_merged.read\\t339\\t1429344152\\nkvm00.disk.sda5.disk_merged.write\\t1700412\\t1429344152\\nkvm00.disk.dm-0.disk_octets.read\\t484443136\\t1429344152\\nkvm00.disk.dm-0.disk_octets.write\\t65734569984\\t1429344152\\nkvm00.disk.dm-0.disk_ops.read\\t20810\\t1429344152\\nkvm00.disk.dm-0.disk_ops.write\\t13131003\\t1429344152\\nkvm00.disk.sda1.disk_merged.read\\t3870\\t1429344152\\nkvm00.disk.sda1.disk_merged.write\\t1\\t1429344152\\nkvm00.disk.dm-1.disk_ops.read\\t234\\t1429344152\\nkvm00.disk.dm-1.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.dm-1.disk_time.read\\t248\\t1429344152\\nkvm00.disk.dm-1.disk_time.write\\t0\\t1429344152\\nkvm00.disk.dm-1.disk_octets.read\\t958464\\t1429344152\\nkvm00.disk.dm-1.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdf.disk_octets.read\\t974848\\t1429344152\\nkvm00.disk.sdf.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.dm-1.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.dm-1.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdf.disk_ops.read\\t140\\t1429344152\\nkvm00.disk.sdf.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdf.disk_time.read\\t105\\t1429344152\\nkvm00.disk.sdf.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdf.disk_merged.read\\t98\\t1429344152\\nkvm00.disk.sdf.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sda5.disk_time.read\\t566\\t1429344152\\nkvm00.disk.sda5.disk_time.write\\t12398\\t1429344152\\nkvm00.disk.sdk.disk_ops.read\\t16987\\t1429344152\\nkvm00.disk.sdk.disk_ops.write\\t11204\\t1429344152\\nkvm00.disk.sdk.disk_time.read\\t115\\t1429344152\\nkvm00.disk.sdk.disk_time.write\\t2273\\t1429344152\\nkvm00.disk.sdk.disk_merged.read\\t4529\\t1429344152\\nkvm00.disk.sdk.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdk1.disk_ops.read\\t15408\\t1429344152\\nkvm00.disk.sdk1.disk_ops.write\\t11204\\t1429344152\\nkvm00.disk.sdk1.disk_octets.read\\t278538240\\t1429344152\\nkvm00.disk.sdk1.disk_octets.write\\t226422784\\t1429344152\\nkvm00.disk.dm-0.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.dm-0.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.dm-0.disk_time.read\\t576\\t1429344152\\nkvm00.disk.dm-0.disk_time.write\\t11197\\t1429344152\\nkvm00.disk.sdk1.disk_time.read\\t126\\t1429344152\\nkvm00.disk.sdk1.disk_time.write\\t2273\\t1429344152\\nkvm00.disk.sdk1.disk_merged.read\\t4356\\t1429344152\\nkvm00.disk.sdk1.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdk.disk_octets.read\\t286562816\\t1429344152\\nkvm00.disk.sdk.disk_octets.write\\t226422784\\t1429344152\\nkvm00.disk.sdk2.disk_octets.read\\t5120\\t1429344152\\nkvm00.disk.sdk2.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdk2.disk_ops.read\\t5\\t1429344152\\nkvm00.disk.sdk2.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdk2.disk_time.read\\t24\\t1429344152\\nkvm00.disk.sdk2.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdk5.disk_octets.read\\t3801088\\t1429344152\\nkvm00.disk.sdk5.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdk5.disk_ops.read\\t790\\t1429344152\\nkvm00.disk.sdk5.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdk2.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.sdk2.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdk5.disk_time.read\\t15\\t1429344152\\nkvm00.disk.sdk5.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdk5.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.sdk5.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdh.disk_octets.read\\t137266176\\t1429344152\\nkvm00.disk.sdh.disk_octets.write\\t240136192\\t1429344152\\nkvm00.disk.sdh.disk_ops.read\\t4030\\t1429344152\\nkvm00.disk.sdh.disk_ops.write\\t36511\\t1429344152\\nkvm00.disk.sdh.disk_merged.read\\t29478\\t1429344152\\nkvm00.disk.sdh.disk_merged.write\\t22116\\t1429344152\\nkvm00.disk.sdh1.disk_merged.read\\t28895\\t1429344152\\nkvm00.disk.sdh1.disk_merged.write\\t22116\\t1429344152\\nkvm00.disk.sdh1.disk_time.read\\t100\\t1429344152\\nkvm00.disk.sdh1.disk_time.write\\t30\\t1429344152\\nkvm00.disk.sdh1.disk_ops.read\\t3598\\t1429344152\\nkvm00.disk.sdh1.disk_ops.write\\t36511\\t1429344152\\nkvm00.disk.sdh.disk_time.read\\t93\\t1429344152\\nkvm00.disk.sdh.disk_time.write\\t30\\t1429344152\\nkvm00.disk.sdh2.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.sdh2.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdh2.disk_octets.read\\t1024\\t1429344152\\nkvm00.disk.sdh2.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdh2.disk_ops.read\\t1\\t1429344152\\nkvm00.disk.sdh2.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdh2.disk_time.read\\t240\\t1429344152\\nkvm00.disk.sdh2.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdh1.disk_octets.read\\t133111808\\t1429344152\\nkvm00.disk.sdh1.disk_octets.write\\t240136192\\t1429344152\\nkvm00.disk.sdh5.disk_ops.read\\t125\\t1429344152\\nkvm00.disk.sdh5.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdh5.disk_octets.read\\t1773568\\t1429344152\\nkvm00.disk.sdh5.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdh5.disk_time.read\\t34\\t1429344152\\nkvm00.disk.sdh5.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdh5.disk_merged.read\\t308\\t1429344152\\nkvm00.disk.sdh5.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdn.disk_octets.read\\t507495424\\t1429344152\\nkvm00.disk.sdn.disk_octets.write\\t188416\\t1429344152\\nkvm00.disk.sdn.disk_time.read\\t39\\t1429344152\\nkvm00.disk.sdn.disk_time.write\\t4\\t1429344152\\nkvm00.disk.sdn.disk_ops.read\\t4890\\t1429344152\\nkvm00.disk.sdn.disk_ops.write\\t46\\t1429344152\\nkvm00.disk.sdn.disk_merged.read\\t119011\\t1429344152\\nkvm00.disk.sdn.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdn1.disk_octets.read\\t138567680\\t1429344152\\nkvm00.disk.sdn1.disk_octets.write\\t188416\\t1429344152\\nkvm00.disk.sdn1.disk_time.read\\t39\\t1429344152\\nkvm00.disk.sdn1.disk_time.write\\t4\\t1429344152\\nkvm00.disk.sdn1.disk_merged.read\\t32251\\t1429344152\\nkvm00.disk.sdn1.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdn2.disk_octets.read\\t1024\\t1429344152\\nkvm00.disk.sdn2.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdn2.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.sdn2.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdn2.disk_time.read\\t400\\t1429344152\\nkvm00.disk.sdn2.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdn5.disk_octets.read\\t372736\\t1429344152\\nkvm00.disk.sdn5.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdn5.disk_time.read\\t43\\t1429344152\\nkvm00.disk.sdn5.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdn2.disk_ops.read\\t1\\t1429344152\\nkvm00.disk.sdn2.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdj.disk_octets.read\\t166081024\\t1429344152\\nkvm00.disk.sdj.disk_octets.write\\t1525361664\\t1429344152\\nkvm00.disk.sdj.disk_time.read\\t70\\t1429344152\\nkvm00.disk.sdj.disk_time.write\\t53\\t1429344152\\nkvm00.disk.sdj.disk_ops.read\\t19442\\t1429344152\\nkvm00.disk.sdj.disk_ops.write\\t85695\\t1429344152\\nkvm00.disk.sdn5.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.sdn5.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdj1.disk_octets.read\\t165139968\\t1429344152\\nkvm00.disk.sdj1.disk_octets.write\\t1525361664\\t1429344152\\nkvm00.disk.sdn5.disk_ops.read\\t91\\t1429344152\\nkvm00.disk.sdn5.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdj.disk_merged.read\\t714\\t1429344152\\nkvm00.disk.sdj.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdj1.disk_ops.read\\t19176\\t1429344152\\nkvm00.disk.sdj1.disk_ops.write\\t85695\\t1429344152\\nkvm00.disk.sdn1.disk_ops.read\\t1579\\t1429344152\\nkvm00.disk.sdn1.disk_ops.write\\t46\\t1429344152\\nkvm00.disk.sdj1.disk_time.read\\t71\\t1429344152\\nkvm00.disk.sdj1.disk_time.write\\t53\\t1429344152\\nkvm00.disk.sdm.disk_ops.read\\t93079\\t1429344152\\nkvm00.disk.sdm.disk_ops.write\\t273583\\t1429344152\\nkvm00.disk.sdj1.disk_merged.read\\t640\\t1429344152\\nkvm00.disk.sdj1.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdm1.disk_ops.read\\t92932\\t1429344152\\nkvm00.disk.sdm1.disk_ops.write\\t273583\\t1429344152\\nkvm00.disk.sdm.disk_merged.read\\t745\\t1429344152\\nkvm00.disk.sdm.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdm.disk_octets.read\\t1331474944\\t1429344152\\nkvm00.disk.sdm.disk_octets.write\\t3709540864\\t1429344152\\nkvm00.disk.sdm1.disk_octets.read\\t1330491392\\t1429344152\\nkvm00.disk.sdm1.disk_octets.write\\t3709540864\\t1429344152\\nkvm00.disk.sdm1.disk_merged.read\\t623\\t1429344152\\nkvm00.disk.sdm1.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdi.disk_octets.read\\t7042521600\\t1429344152\\nkvm00.disk.sdi.disk_octets.write\\t3091610624\\t1429344152\\nkvm00.disk.sdi.disk_ops.read\\t303520\\t1429344152\\nkvm00.disk.sdi.disk_ops.write\\t324013\\t1429344152\\nkvm00.disk.sdi.disk_merged.read\\t708\\t1429344152\\nkvm00.disk.sdi.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdi1.disk_ops.read\\t303229\\t1429344152\\nkvm00.disk.sdi1.disk_ops.write\\t324013\\t1429344152\\nkvm00.disk.sdm.disk_time.read\\t24\\t1429344152\\nkvm00.disk.sdm.disk_time.write\\t1272\\t1429344152\\nkvm00.disk.sdi1.disk_octets.read\\t7041567744\\t1429344152\\nkvm00.disk.sdi1.disk_octets.write\\t3091610624\\t1429344152\\nkvm00.disk.sdi.disk_time.read\\t16\\t1429344152\\nkvm00.disk.sdi.disk_time.write\\t24\\t1429344152\\nkvm00.disk.sdg.disk_octets.read\\t180962304\\t1429344152\\nkvm00.disk.sdg.disk_octets.write\\t312684544\\t1429344152\\nkvm00.disk.sdi1.disk_merged.read\\t634\\t1429344152\\nkvm00.disk.sdi1.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdg.disk_time.read\\t140\\t1429344152\\nkvm00.disk.sdg.disk_time.write\\t14\\t1429344152\\nkvm00.disk.sdg.disk_merged.read\\t39699\\t1429344152\\nkvm00.disk.sdg.disk_merged.write\\t37799\\t1429344152\\nkvm00.disk.sdg1.disk_ops.read\\t284\\t1429344152\\nkvm00.disk.sdg1.disk_ops.write\\t6\\t1429344152\\nkvm00.disk.sdg1.disk_time.read\\t148\\t1429344152\\nkvm00.disk.sdg1.disk_time.write\\t13\\t1429344152\\nkvm00.disk.sdg.disk_ops.read\\t4455\\t1429344152\\nkvm00.disk.sdg.disk_ops.write\\t38540\\t1429344152\\nkvm00.disk.sdi1.disk_time.read\\t16\\t1429344152\\nkvm00.disk.sdi1.disk_time.write\\t24\\t1429344152\\nkvm00.disk.sdg1.disk_merged.read\\t4086\\t1429344152\\nkvm00.disk.sdg1.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdg2.disk_octets.read\\t1024\\t1429344152\\nkvm00.disk.sdg2.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdg2.disk_ops.read\\t1\\t1429344152\\nkvm00.disk.sdg2.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdg1.disk_octets.read\\t17899520\\t1429344152\\nkvm00.disk.sdg1.disk_octets.write\\t24576\\t1429344152\\nkvm00.disk.sdg2.disk_time.read\\t200\\t1429344152\\nkvm00.disk.sdg2.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdg5.disk_octets.read\\t162168832\\t1429344152\\nkvm00.disk.sdg5.disk_octets.write\\t312659968\\t1429344152\\nkvm00.disk.sdm1.disk_time.read\\t24\\t1429344152\\nkvm00.disk.sdm1.disk_time.write\\t1272\\t1429344152\\nkvm00.disk.sdg5.disk_time.read\\t144\\t1429344152\\nkvm00.disk.sdg5.disk_time.write\\t14\\t1429344152\\nkvm00.disk.sdg5.disk_merged.read\\t35574\\t1429344152\\nkvm00.disk.sdg5.disk_merged.write\\t37799\\t1429344152\\nkvm00.disk.sdl.disk_ops.read\\t152434\\t1429344152\\nkvm00.disk.sdl.disk_ops.write\\t208093\\t1429344152\\nkvm00.disk.sdl.disk_time.read\\t60\\t1429344152\\nkvm00.disk.sdl.disk_time.write\\t872\\t1429344152\\nkvm00.disk.sdg5.disk_ops.read\\t3991\\t1429344152\\nkvm00.disk.sdg5.disk_ops.write\\t38534\\t1429344152\\nkvm00.disk.sdl1.disk_ops.read\\t112403\\t1429344152\\nkvm00.disk.sdl1.disk_ops.write\\t206965\\t1429344152\\nkvm00.disk.sdl.disk_merged.read\\t23590\\t1429344152\\nkvm00.disk.sdl.disk_merged.write\\t1297\\t1429344152\\nkvm00.disk.sdl1.disk_octets.read\\t4170520576\\t1429344152\\nkvm00.disk.sdl1.disk_octets.write\\t11340062720\\t1429344152\\nkvm00.disk.sdg2.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.sdg2.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdl1.disk_time.read\\t66\\t1429344152\\nkvm00.disk.sdl1.disk_time.write\\t869\\t1429344152\\nkvm00.disk.sdl2.disk_octets.read\\t5120\\t1429344152\\nkvm00.disk.sdl2.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.sdl2.disk_time.read\\t88\\t1429344152\\nkvm00.disk.sdl2.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdl1.disk_merged.read\\t23446\\t1429344152\\nkvm00.disk.sdl1.disk_merged.write\\t79\\t1429344152\\nkvm00.disk.sdl5.disk_ops.read\\t39265\\t1429344152\\nkvm00.disk.sdl5.disk_ops.write\\t1128\\t1429344152\\nkvm00.disk.sdl5.disk_time.read\\t41\\t1429344152\\nkvm00.disk.sdl5.disk_time.write\\t1238\\t1429344152\\nkvm00.disk.sdl2.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.sdl2.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdl2.disk_ops.read\\t5\\t1429344152\\nkvm00.disk.sdl2.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.sdl5.disk_octets.read\\t164302848\\t1429344152\\nkvm00.disk.sdl5.disk_octets.write\\t189661184\\t1429344152\\nkvm00.disk.sdl5.disk_merged.read\\t19\\t1429344152\\nkvm00.disk.sdl5.disk_merged.write\\t1218\\t1429344152\\nkvm00.disk.dm-2.disk_octets.read\\t512000\\t1429344152\\nkvm00.disk.dm-2.disk_octets.write\\t0\\t1429344152\\nkvm00.disk.dm-2.disk_time.read\\t27\\t1429344152\\nkvm00.disk.dm-2.disk_time.write\\t0\\t1429344152\\nkvm00.disk.dm-2.disk_ops.read\\t125\\t1429344152\\nkvm00.disk.dm-2.disk_ops.write\\t0\\t1429344152\\nkvm00.disk.dm-3.disk_time.read\\t26\\t1429344152\\nkvm00.disk.dm-3.disk_time.write\\t0\\t1429344152\\nkvm00.disk.sdl.disk_octets.read\\t4338748416\\t1429344152\\nkvm00.disk.sdl.disk_octets.write\\t11529723904\\t1429344152\\nkvm00.disk.dm-2.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.dm-2.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.dm-3.disk_merged.read\\t0\\t1429344152\\nkvm00.disk.dm-3.disk_merged.write\\t0\\t1429344152\\nkvm00.disk.sdo.disk_time.read\\t1655\\t1429344152\\nkvm00.disk.sdo.disk_time.write\\t7998\\t1429344152\\nkvm00.disk.sdo.disk_octets.read\\t3283699200\\t1429344152\\nkvm00.disk.sdo.disk_octets.write\\t50387683328\\t1429344152\\nkvm00.interface.br-dmz.if_octets.rx\\t2316932\\t1429344152\\nkvm00.interface.br-dmz.if_octets.tx\\t774\\t1429344152\\nkvm00.disk.sdo.disk_ops.read\\t177883\\t1429344152\\nkvm00.disk.sdo.disk_ops.write\\t6639441\\t1429344152\\nkvm00.disk.sdo.disk_merged.read\\t21204\\t1429344152\\nkvm00.disk.sdo.disk_merged.write\\t88722\\t1429344152\\nkvm00.interface.br-dmz.if_errors.rx\\t0\\t1429344152\\nkvm00.interface.br-dmz.if_errors.tx\\t0\\t1429344152\\nkvm00.interface.br-officewifi.if_packets.rx\\t1455231\\t1429344152\\nkvm00.interface.br-officewifi.if_packets.tx\\t8\\t1429344152\\nkvm00.interface.br-officewifi.if_octets.rx\\t96600172\\t1429344152\\nkvm00.interface.br-officewifi.if_octets.tx\\t648\\t1429344152\\nkvm00.interface.br-guestwifi.if_octets.rx\\t2676660\\t1429344152\\nkvm00.interface.br-guestwifi.if_octets.tx\\t648\\t1429344152\", \"handler\": \"graphite\", \"type\": \"metric\", \"name\": \"collectd\"}","parse_error":"lexical error: invalid char in json text.\n                                       sk.sda5.disk_merged.read\\t339\\t\n                     (right here) ------^\n"}

Not sure if this is related to the plugin or a sensu issue, so I will try you first :)

jhmartin commented 9 years ago

This looks vagely like metrics are being passed in graphite format to the sensu port without going through the collectd/sensu plugin first -- I think it is complaining that the input is not in json format. Can you post your configuration, and preferably the output of 'tcpdump -i lo -A -s 0 port YOURSENSUPORT' , assuming you are pointing collectd at 127.0.0.1?

mathiasewald commented 9 years ago

Hi, here is my configuration:

collectd.conf: http://pastebin.com/hk5UUaFy tcpdump: http://pastebin.com/4UcJ8Lra

Please not that - as the sens way is currently not working - I am using collectd to send the data directly to graphite.

cheers Mathias