4.1.1.2 Ensure Logging Service is Running

Information

Some form of logging for the OS should be used. On COS Stackdriver-logging agent or fluent-bit logging agent are provided and can be activated simply by following the guides. It is not require to use these for logging but they are simple to set up and will work well.

If no logging is running, their will be less of a trail for audit if things go wrong. It is a good practice to have logging enabled for better visibility.

Solution

This remediation is only if you want to use one of the supported logging services described.

Stackdriver-logging Agent

Run the following command to enable stackdriver-logging :

# systemctl start stackdriver-logging

Fluent-bit Logging

Run the following command to enable fluent-bit :

# systemctl start fluent-bit

Works for Both

Simply update the instance metadata to enable logging as follows:

# gcloud compute instances add-metadata <instance-name>
--zone <compute-zone>
--metadata google-logging-enabled=true

See Also

https://workbench.cisecurity.org/benchmarks/12218