

<def-group>
  <definition class="compliance" id="journald_forward_to_syslog" version="1">
    <metadata>
        <title>Ensure journald is configured to send logs to rsyslog</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>Ensure 'ForwardToSyslog' is configured with value 'yes' in /etc/systemd/journald.conf</description>
    </metadata>
    <criteria comment="The respective application or service is configured correctly"
    operator="OR"><criterion comment="Check the ForwardToSyslog in /etc/systemd/journald.conf"
  test_ref="test_journald_forward_to_syslog" />
    </criteria>
  </definition>

  

  
<ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="tests the value of ForwardToSyslog setting in the /etc/systemd/journald.conf file"
  id="test_journald_forward_to_syslog" version="1">
  <ind:object object_ref="obj_journald_forward_to_syslog" />
  <ind:state state_ref="state_journald_forward_to_syslog" />
</ind:textfilecontent54_test>
  
<ind:textfilecontent54_object id="obj_journald_forward_to_syslog" version="1">
  <ind:filepath>/etc/systemd/journald.conf</ind:filepath>
  <ind:pattern operation="pattern match">^[ \t]*ForwardToSyslog=(.+?)[ \t]*(?:$|#)</ind:pattern>
  <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
<ind:textfilecontent54_state id="state_journald_forward_to_syslog" version="1">
  <ind:subexpression datatype="string" operation="pattern match">^yes$</ind:subexpression>
</ind:textfilecontent54_state>

</def-group>
