|
| 1 | +documentation_complete: true |
| 2 | + |
| 3 | +title: 'Ensure journald and rsyslog Are Not Active Together' |
| 4 | + |
| 5 | +description: |- |
| 6 | + Ensure that exactly one logging system is active. Running both rsyslog and |
| 7 | + systemd-journald simultaneously can lead to duplicate logging, resource |
| 8 | + contention, and configuration conflicts. Running neither service means no |
| 9 | + logging is occurring, which is also a violation. |
| 10 | + <pre> |
| 11 | + systemctl is-active rsyslog systemd-journald |
| 12 | + </pre> |
| 13 | + The command should return exactly one <tt>active</tt> service. Both services |
| 14 | + should not be active at the same time, and at least one must be active. |
| 15 | +
|
| 16 | +rationale: |- |
| 17 | + Running multiple logging systems concurrently can cause conflicts, resource |
| 18 | + contention, and inconsistent logging behavior. Systems should use either |
| 19 | + rsyslog or systemd-journald, but not both simultaneously. This ensures |
| 20 | + predictable logging behavior and prevents potential issues with log |
| 21 | + duplication or loss. |
| 22 | +
|
| 23 | +severity: medium |
| 24 | + |
| 25 | +identifiers: |
| 26 | + cce@rhel10: CCE-90723-8 |
| 27 | + |
| 28 | +platform: machine |
| 29 | + |
| 30 | +warnings: |
| 31 | + - general: |- |
| 32 | + This rule does not come with a remediation. The choice of logging |
| 33 | + system (rsyslog vs systemd-journald) is an architectural decision |
| 34 | + that should be made based on organizational requirements. Use |
| 35 | + service_rsyslog_enabled/disabled or service_systemd-journald_enabled |
| 36 | + rules to configure the desired logging system. |
| 37 | +
|
| 38 | +ocil_clause: 'both rsyslog and systemd-journald services are active, or neither service is active' |
| 39 | + |
| 40 | +ocil: |- |
| 41 | + To verify that exactly one logging system is active, run the following command: |
| 42 | + <pre>systemctl is-active rsyslog systemd-journald | grep -c active</pre> |
| 43 | + The output should be exactly 1. If the output is 0, no logging is active. |
| 44 | + If the output is 2, both logging systems are active simultaneously. Both |
| 45 | + cases are findings. |
0 commit comments