Configure server logging with TLS
You can use the logging RHEL system role to configure logging on RHEL servers and set them to receive logs from a remote logging system by using TLS encryption.
Before you begin
- You have prepared the control node and the managed nodes.
- You are logged in to the control node as a user who can run playbooks on the managed nodes.
- The account you use to connect to the managed nodes has
sudopermissions for these nodes. - The managed nodes are enrolled in an IdM domain.
- If the logging server runs RHEL 9.2 or later with FIPS mode enabled, clients must support the Extended Master Secret (EMS) extension or use TLS 1.3. TLS 1.2 connections without EMS fail. For more information, see the Red Hat Knowledgebase solution TLS extension "Extended Master Secret" enforced.
About this task
The role creates a private key and a certificate. Next, it configures TLS on all hosts in the server group in the Ansible inventory.
You do not have to call the certificate RHEL system role in the playbook to create the certificate. The logging RHEL system role calls it automatically.
In order for the CA to be able to sign the created certificate, the managed nodes must be enrolled in an IdM domain.
Procedure
Results
- On the client system, send a test message:
# logger test - On the server system, view the
/var/log/remote/<hostname>/log to verify the test message arrived:# cat /var/log/remote/<hostname>/*.logWhere
<hostname>is the host name of the client system. The log must contain thetestmessage.