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,
plugin: 'tcpconns',
plugin_instance: '25-local',
type: 'tcp_connections',
type_instance: 'CLOSING' }
{ values: [ 615, 717 ],
time: 1348664955000,
interval: 10,
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