How to set the Cassandra database log level to ALL in vRealize Operations 8.2
search cancel

How to set the Cassandra database log level to ALL in vRealize Operations 8.2

book

Article ID: 332365

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

By default, vRealize Operation's Cassandra database's log level value is set to INFO.
For security purposes, this can be changed to ALL.

Environment

VMware vRealize Operations 8.2.x

Resolution

To change the log level to ALL, complete the steps below.
  1. Log into the Primary node as root via SSH or Console, pressing ALT+F1 in a Console to log in.
  2. Run the following command to set the Cassandra database log level to ALL:
sed -i 's/^\(\s*\)<root level=".*">\(\s*\)$/\1<root level="ALL">\2/' /usr/lib/vmware-vcops/user/conf/cassandra/logback.xml
  1. Restart the Cassandra service:
service cassandra restart
  1. Repeat steps 1-3 on all other Analytic nodes in the vRealize Operations cluster.


Additional Information

To change the log level back to INFO, complete the steps below.
  1. Log into the Primary node as root via SSH or Console, pressing ALT+F1 in a Console to log in.
  2. Run the following command to set the Cassandra database log level to INFO:
sed -i 's/^\(\s*\)<root level=".*">\(\s*\)$/\1<root level="INFO">\2/' /usr/lib/vmware-vcops/user/conf/cassandra/logback.xml
  1. Restart the Cassandra service:
service cassandra restart
  1. Repeat steps 1-3 on all other Analytic nodes in the vRealize Operations cluster.

The valid values for setting the log level include ALL for logging information at all levels, TRACE through ERROR, and OFF for no logging.
TRACE creates the most verbose log, and ERROR, the least.
  • ALL
  • TRACE
  • DEBUG
  • INFO (Default)
  • WARN
  • ERROR
  • OFF
Note: When set to TRACE or DEBUG output appears only in the debug.log. When set to INFO the debug.log is disabled.

It is also possible to change the default log file size of 20mb and the default archived logs max count from 20.
  1. Log into the Primary node as root via SSH or Console, pressing ALT+F1 in a Console to log in.
  2. Open /usr/lib/vmware-vcops/user/conf/cassandra/logback.xml in a text editor.
  3. Change the <maxIndex> and <maxFileSize> tags to the desired values.
Examples:
<maxIndex>10</maxIndex>
<maxFileSize>30MB</maxFileSize>
  1. Save and close the file.
  2. Repeat steps 1-4 on all other Analytic nodes in the vRealize Operations cluster.


Impact/Risks:
Even if ALL is recommended from a security perspective, it can generate a huge number of logs and put setups under a large load, up to breaking the regular working processes.

Example: In a small single node setup with ~500 objects and ~5800 metrics, Cassandra logs count would increase from 0-10 kb to min150 kb per minute and max 9800 kb per minute.

Setting the log level to ALL will increases risk of the /storage/log partition filling up.
See Safely cleaning up log files in vRealize Operations if you need to clear space.