From 49858c5265310c8cdd1694ae389965370fd97abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Mon, 16 Dec 2019 15:27:57 +0100 Subject: [PATCH] Add SyslogIdenfier to healthcheck systemd unit Adding this new field will allow to filter all healthcheck logs using the Idenfier value. For instance, using journalctl, you would be able to run this: `journalctl -t healthcheck_collectd' It will also allow to get a dedicated file out of (r)syslog if needed. Change-Id: Icdc5caf4cedc46291a807c39c0a31c74955a4a74 Closes-Bug: #1856573 --- .../tripleo-container-manage/templates/systemd-healthcheck.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/tripleo_ansible/roles/tripleo-container-manage/templates/systemd-healthcheck.j2 b/tripleo_ansible/roles/tripleo-container-manage/templates/systemd-healthcheck.j2 index ce0bdea1d..21330a7f9 100644 --- a/tripleo_ansible/roles/tripleo-container-manage/templates/systemd-healthcheck.j2 +++ b/tripleo_ansible/roles/tripleo-container-manage/templates/systemd-healthcheck.j2 @@ -5,5 +5,6 @@ Requisite=tripleo_{{ container_sysd_name }}.service [Service] Type=oneshot ExecStart=/usr/bin/podman exec {{ container_sysd_name }} {{ container_sysd_data.healthcheck.test }} +SyslogIdentifier=healthcheck_{{ container_sysd_name }} [Install] WantedBy=multi-user.target