In order to access the cqlsh (Cassandra shell) command line tool on versions 8.0 and later, the username and password must be specified.
Option 1: Use environmental variables to log into Cassandra.
- Log into the vRealize Log Insight node as root via SSH or Console.
- To log into the Cassandra database, run the following command:
CASSANDRAUSER="$(/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/credentials-look-up| grep "user value=" | awk -F'"' '{print $2}')"; CASSANDRAPASSWORD="$(/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/credentials-look-up| grep "password value=" | awk -F '"' '{print $2}')"; /usr/lib/loginsight/application/lib/apache-cassandra-*/bin/cqlsh -u $CASSANDRAUSER -p $CASSANDRAPASSWORD
Option 2: Manually obtain username and password to log into Cassandra.
- Log into the Aria Operations for Logs node as root via SSH or Console.
- Run the following command to get the Cassandra credentials and note the user and password values:
/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/credentials-look-up
Note: You will see output similar to:
<cassandra-user value="lisuper" />
<cassandra-password value="l337nuFvPbsWXlYIx2MsVqo4RotfgAXx" />
- To log into the Cassandra database, run the appropriate command:
Aria Operations for Logs 8.8 and later
cqlsh-no-pass
nodetool-no-pass status
vRealize Log Insight 8.6
/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/cqlsh-no-pass
vRealize Log Insight 8.3 - 8.4
/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/cqlsh -u user -p password --cqlshrc=/storage/core/loginsight/cidata/cassandra/config/cqlshrc
Note: Replace user and password with the values noted in step 2.
Example: /usr/lib/loginsight/application/lib/apache-cassandra-*/bin/cqlsh -u lisuper -p l337nuFvPbsWXlYIx2MsVqo4RotfgAXx --cqlshrc=/storage/core/loginsight/cidata/cassandra/config/cqlshrc
vRealize Log Insight 4.7-8.2
/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/cqlsh -u user -p password
Note: Replace user and password with the values noted in step 2.
Example: /usr/lib/loginsight/application/lib/apache-cassandra-*/bin/cqlsh -u lisuper -p l337nuFvPbsWXlYIx2MsVqo4RotfgAXx
Alternatively, use the following command:
/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/cqlsh-no-pass