aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorMartin Mágr <mmagr@redhat.com>2017-06-20 16:02:27 +0200
committerMartin Mágr <mmagr@redhat.com>2017-06-22 17:08:27 +0200
commite873d56d7631dcb9b811cbbaec0b0da592983822 (patch)
tree1cdc78aadb109dd0b6c3497f1cc9a2f86de36900 /docker
parentdfd4e12b22e09bb95272541461f10578a511ee90 (diff)
Make collectd log to file
- sets collectd service in container to log to file consistently with other docker services. - corrects configuration mounts Depends-On: I50289ad6657852d37abbf12938128ff9ab9e3bac Change-Id: Ibf9efbe249d67d0fa1e50fbd7dd9902a64d5a273
Diffstat (limited to 'docker')
-rw-r--r--docker/services/collectd.yaml20
1 files changed, 17 insertions, 3 deletions
diff --git a/docker/services/collectd.yaml b/docker/services/collectd.yaml
index 7354898b..6c58a589 100644
--- a/docker/services/collectd.yaml
+++ b/docker/services/collectd.yaml
@@ -55,7 +55,11 @@ outputs:
description: Role data for the collectd role.
value:
service_name: {get_attr: [CollectdBase, role_data, service_name]}
- config_settings: {get_attr: [CollectdBase, role_data, config_settings]}
+ config_settings:
+ map_merge:
+ - get_attr: [CollectdBase, role_data, config_settings]
+ - tripleo::profile::base::metrics::collectd::enable_file_logging: true
+ collectd::plugin::logfile::log_file: /var/log/collectd/collectd.log
step_config: &step_config
get_attr: [CollectdBase, role_data, step_config]
service_config_settings: {get_attr: [CollectdBase, role_data, service_config_settings]}
@@ -71,6 +75,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/collectd.json:
command: /usr/sbin/collectd -f
+ permissions:
+ - path: /var/log/collectd
+ owner: collectd:collectd
+ recurse: true
docker_config:
step_3:
collectd:
@@ -84,11 +92,17 @@ outputs:
-
- /var/run/docker.sock:/var/run/docker.sock:rw
- /var/lib/kolla/config_files/collectd.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/collectd/etc/collectd/:/etc/collectd/:ro
+ - /var/lib/config-data/collectd/etc/collectd.conf:/etc/collectd.conf:ro
+ - /var/lib/config-data/collectd/etc/collectd.d:/etc/collectd.d:ro
+ - /var/log/containers/collectd:/var/log/collectd:rw
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/collectd
+ state: directory
upgrade_tasks:
- name: Stop and disable collectd service
tags: step2
service: name=collectd.service state=stopped enabled=no
-