Difficulty: Easy
Estimated Time: 15 minutes

Audit logging is one of the important new features of Apache Cassandra™ 4.x. Logging is crucial for regulatory compliance, security compliance and debugging.

In this scenario you will learn how to:

  • Dynamically enable/disable audit logging using nodetool
  • Statically enable/disable audit logging in cassandra.yaml
  • Configure logging properties

Audit Logging

Step 1 of 5


In this step, you will verify that Cassandra has been installed and is running as a service. Next, you will connect using cqlsh and create a keyspace and table.

During startup, this scenario uses apt-get to install and start a single Cassandra node running as a service. This process may take a few minutes. Wait until you see Cassandra has started! before you continue.

Once Cassandra has started, click to verify the cluster status with nodetool.

nodetool status

Status: Look at the first two characters of the status. Each character has an individual meaning. The sequence UN means the node's status is Up and state is Normal.


Now that the node is running, you will create a keyspace and table. Start the CQL Shell (cqlsh) so you can issue CQL commands.


Create the music keyspace.

create KEYSPACE music WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};

Use the music keyspace.

use music;

Create the songs table.

   artist TEXT,
   title TEXT,
   year INT,
   PRIMARY KEY ((artist), title)

Type exit to close cqlsh.



In this step, you have verified that Cassandra is running and created the music keyspace and the songs table.