Deploying rsyslog configuration


#1

Hey,

I am working on a long-term goal to improve logging of Foreman and all other components including Katello. In Foreman 1.22, all major components except Pulp can be configured to send logs via either journald or syslog/JSON and I am finalizing rsyslog configuration file that unifies all fields so it can be either saved to file or sent over network to ElasticSearch or other database.

Initially I thought this would be only documentation, but the rsyslog config file is getting complex (400 lines) and it’s subideal to attach such a complex config file to configuration. I suggested that we add rsyslog into our installer however we did not like adding another component into our puppet codebase. This also creates problem of maintaining syslog-ng for debian-based deployments.

So I would like to gather feedback on how to proceed here. I am thinking on creating new package or subpackge foreman-rsyslog which would hold the four rsyslog configuration files so it’s easier to track and maintain updates of it. However I still feel this is something that we should do via our installer.

Opinions?


#2

Adding a new package to deploy some configuration files seems like bypassing our installer. I know we try to manage the service completely or not at all (puppet modules approach) so I understand we don’t want to start maintaining elastic search puppet module, but I think the installer should be capable of --“config rsyslog logging”. If there’s a strong pushback for doing it via puppet modules, the last resort I think is installer hook, though it still feels as a hack. If we decide bundling config files into RPM, the RPM installation should be still driven from the installer.

I’d vote for putting this to puppet module, only available on supported platforms and opt-in. I’m interested in opinions from the main installer maintainer @ekohl, but everyone else is welcome in the discussion too of course.