From 505dc92a63292c763b274e8dd02d852bbe0ace8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Mon, 16 Dec 2019 15:37: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. This is the reflection of Icdc5caf4cedc46291a807c39c0a31c74955a4a74 Change-Id: I6861baa287f2a8288b87be26aacecbcc061cd96f Closes-Bug: #1856573 --- paunch/utils/systemd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/paunch/utils/systemd.py b/paunch/utils/systemd.py index fbdddaa..4c357af 100644 --- a/paunch/utils/systemd.py +++ b/paunch/utils/systemd.py @@ -195,6 +195,7 @@ Requisite=%(service)s.service [Service] Type=oneshot ExecStart=/usr/bin/podman exec %(name)s %(test)s +SyslogIdentifier=healthcheck_%(name)s [Install] WantedBy=multi-user.target """ % s_config)