summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorMartin Mágr <mmagr@redhat.com>2017-06-20 16:14:41 +0200
committerMartin Mágr <mmagr@redhat.com>2017-06-21 11:28:53 +0200
commit57ee25676916d08496c0cfb5fddb4ebf96a1aab0 (patch)
tree195b4db491e23a4079ef49e0b32afd2ac76426f8 /docker
parentf3b2e144302a9d7a4b95a26b3de3422de43393b0 (diff)
Make sensu-client log to file
This patch sets sensu-client service in container to log to file consistently with other docker services. Change-Id: Ic8929326cd73c4bc4515b592fed4826b9c1d516a
Diffstat (limited to 'docker')
-rw-r--r--docker/services/sensu-client.yaml12
1 files changed, 11 insertions, 1 deletions
diff --git a/docker/services/sensu-client.yaml b/docker/services/sensu-client.yaml
index e6bdf155..db6daf99 100644
--- a/docker/services/sensu-client.yaml
+++ b/docker/services/sensu-client.yaml
@@ -104,7 +104,11 @@ outputs:
- [ {get_param: DockerNamespace}, {get_param: DockerSensuClientImage} ]
kolla_config:
/var/lib/kolla/config_files/sensu-client.json:
- command: /usr/bin/sensu-client -d /etc/sensu/conf.d/
+ command: /usr/bin/sensu-client -d /etc/sensu/conf.d/ -l /var/log/sensu/sensu-client.log
+ permissions:
+ - path: /var/log/sensu
+ owner: sensu:sensu
+ recurse: true
docker_config:
step_3:
sensu_client:
@@ -123,8 +127,14 @@ outputs:
- /var/run/docker.sock:/var/run/docker.sock:rw
- /var/lib/kolla/config_files/sensu-client.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/sensu/etc/sensu/:/etc/sensu/:ro
+ - /var/log/containers/sensu:/var/log/sensu:rw
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/sensu
+ state: directory
upgrade_tasks:
- name: Stop and disable sensu-client service
tags: step2