No "dsnames" or "dstypes" in collectd data

55 views
Skip to first unread message

Stian Grytøyr

unread,
Sep 26, 2012, 9:17:09 AM9/26/12
to cube...@googlegroups.com
I’m trying to set up collectd (4.8.2 on Ubuntu 10.04.4) to forward to cube, but I am having some issues. It seems that cube expects the JSON data from collectd to have the keys "dsnames" and "dstypes", which it then tries to iterate over, but the data from collectd never contains these keys, so collector.js crashes.

Specifically, I’m talking about the following lines in lib/cube/collectd.js:

   25: else values.dsnames.forEach(function(d, i) { data[d] = value(i); });
   ...
   30: switch (values.dstypes[i]) {

The data I am receiving from collectd looks like this:

[{ values: [ 0 ],
  time: 1348664955000,
  interval: 10,
  host: 'willie.essens.no',
  plugin: 'tcpconns',
  plugin_instance: '25-local',
  type: 'tcp_connections',
  type_instance: 'CLOSING' }
{ values: [ 615, 717 ],
  time: 1348664955000,
  interval: 10,
  host: 'willie.essens.no',
  plugin: 'disk',
  plugin_instance: 'sdc',
  type: 'disk_time',
  type_instance: '' },
...
]

As you can see, the last one has multiple values, but no dsnames/dstypes. Any ideas what’s going on here? Do I need a newer collectd or is this a cube bug?

-- 
Best,
Stian

Stian Grytøyr

unread,
Sep 26, 2012, 11:21:04 AM9/26/12
to cube...@googlegroups.com
I finally found this: http://www.mail-archive.com/coll...@verplant.org/msg00516.html

... which is a discussion of the patch that introduces those two arrays in the JSON data. It is from March 2010, and seeing as how 4.9 was released in December 2009 I guess my 4.8.2 is just too old. I’ll try to get a newer collectd installed. Sorry for the noise.

-- 
Best,
Stian
Reply all
Reply to author
Forward
0 new messages