

<def-group>
  <definition class="compliance" id="journald_compress" version="1">
    <metadata>
        <title>Ensure journald is configured to compress large log files</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>Ensure 'Compress' 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 Compress in /etc/systemd/journald.conf"
  test_ref="test_journald_compress" />
    </criteria>
  </definition>

  

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

</def-group>
