Merge "Fix collectd decoder for Xenial compute nodes"
diff --git a/heka/_common.sls b/heka/_common.sls
index 1753840..9f71c31 100644
--- a/heka/_common.sls
+++ b/heka/_common.sls
@@ -7,15 +7,24 @@
/usr/share/lma_collector:
file.recurse:
- source: salt://heka/files/lua
+ - user: root
+ - group: heka
+ - file_mode: 640
+ - dir_mode: 750
+ - require:
+ - user: heka_user
/usr/share/lma_collector/common/extra_fields.lua:
file.managed:
- source: salt://heka/files/extra_fields.lua
- user: root
- - mode: 644
+ - group: heka
+ - mode: 640
- defaults:
extra_fields: {{ server.extra_fields }}
- template: jinja
+ - require:
+ - user: heka_user
heka_user:
user.present:
diff --git a/heka/_service.sls b/heka/_service.sls
index 359e716..70d80ce 100644
--- a/heka/_service.sls
+++ b/heka/_service.sls
@@ -13,6 +13,7 @@
file.directory:
- name: /var/cache/{{ service_name }}
- user: heka
+ - group: heka
- mode: 750
- makedirs: true
diff --git a/heka/files/lua/decoders/collectd.lua b/heka/files/lua/decoders/collectd.lua
index 36daee0..3988c17 100644
--- a/heka/files/lua/decoders/collectd.lua
+++ b/heka/files/lua/decoders/collectd.lua
@@ -137,6 +137,8 @@
elseif metric_source == 'disk' then
if sample['type'] == 'disk_io_time' then
msg['Fields']['name'] = 'disk' .. sep .. sample['dsnames'][i]
+ elseif sample['type'] == 'pending_operations' then
+ msg['Fields']['name'] = 'disk' .. sep .. sample['type']
else
msg['Fields']['name'] = metric_name
end