# Ensure Logging Is Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235532-ensure-logging-is-configured
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Profile Applicability: **•** **Level 1**

Description:  
Proper logging configuration ensures that system events, security incidents, and application activities are recorded consistently. Effective logging supports monitoring, auditing, and forensic investigations.

Rationale:  
 Comprehensive logging enables timely detection and response to security events, helping maintain system integrity and compliance.

Impact:  
 Pros:

-   Enhances security monitoring and incident response.  
    
-   Provides audit trails for accountability and compliance.  
    

Cons:

-   Improper configuration may generate excessive logs or miss critical events.  
    

Default Value:  
 Logging may be partially configured or disabled depending on system defaults.

Pre-requisites:

-   Root or sudo privileges to configure logging services and files.  
    

Remediation:

### Test Plan:

Using Linux command line:

Review logging service configuration files (e.g., /etc/rsyslog.conf, /etc/rsyslog.d/\*):

cat /etc/rsyslog.conf

1.  Verify log rotation settings (e.g., /etc/logrotate.conf and /etc/logrotate.d/\*).  
    
2.  Confirm logs are being written to expected locations (e.g., /var/log/).  
    

### Implementation Plan:

Using Linux command line:

1.  Configure rsyslog or another syslog daemon with appropriate rules to capture required logs.
    
2.  Set up log rotation policies to manage log size and retention.  
    

Restart logging services to apply changes:

systemctl restart rsyslog

3.  Verify logs are generated and rotated correctly.  
    

### Backout Plan:

Using Linux command line:

1.  Revert configuration changes if issues arise.  
    
2.  Restart logging services and confirm proper operation.  
    

References:

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   rsyslog Documentation  
    
-   logrotate Manual

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
