Fix collectd decoder for Xenial compute nodes
Xenial ships collectd 5.5 which has renamed the libvirt plugin to virt.
Change-Id: I36b4f53a755b1498d5c89db55183df088ad6630f
diff --git a/heka/files/lua/decoders/collectd.lua b/heka/files/lua/decoders/collectd.lua
index 7978bd2..36daee0 100644
--- a/heka/files/lua/decoders/collectd.lua
+++ b/heka/files/lua/decoders/collectd.lua
@@ -457,7 +457,7 @@
msg['Fields']['name'] = 'logged_users'
msg['Fields']['hostname'] = sample['host']
table.insert(msg['Fields']['tag_fields'], 'hostname')
- elseif metric_source == 'libvirt' then
+ elseif metric_source == 'libvirt' or metric_source == 'virt' then
-- collectd sends the instance's ID in the 'host' field
msg['Fields']['instance_id'] = sample['host']
table.insert(msg['Fields']['tag_fields'], 'instance_id')