Enable syslog integration for Cassandra in vRealize Operations 8.2 and later
search cancel

Enable syslog integration for Cassandra in vRealize Operations 8.2 and later

book

Article ID: 332363

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

This article provides steps on adding syslog integrations for Cassandra in vRealize Operations 8.2 and later.

Environment

VMware vRealize Operations 8.2.x

Resolution

To enable syslog integration in Cassandra, 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. Open /usr/lib/vmware-vcops/user/conf/cassandra/logback.xml in a text editor:
vi /usr/lib/vmware-vcops/user/conf/cassandra/logback.xml
  1. At the end of the last <appender> node in the <configuration> node section, add the following:
  <appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">
    <syslogHost>syslogServerHostName</syslogHost>
    <facility>AUTH</facility>
    <suffixPattern>%-5level [%thread] %date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC} %-5level [%thread] %F:%L - %msg%n </suffixPattern>
  </appender>
  1. Find the <root> node and add the following to the bottom of that section:
    <appender-ref ref="SYSLOG" />
  1. The <configuration> node should now look similar to the following.
Example:
<configuration scan="true">
  <jmxConfigurator />
  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${cassandra.logdir}/system.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>${cassandra.logdir}/system.log.%i.zip</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>20</maxIndex>
    </rollingPolicy>

    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>20MB</maxFileSize>
    </triggeringPolicy>
    <encoder>
      <pattern>%-5level [%thread] %date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC} %-5level [%thread] %F:%L - %msg%n</pattern>
      <!-- old-style log format
      <pattern>%5level [%thread] %date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC} %-5level [%thread] %F:%L - %msg%n</pattern>
      -->
    </encoder>
  </appender>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%-5level %date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC} %-5level [%thread] %F:%L - %msg%n</pattern>
    </encoder>
  </appender>

  <appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">
    <syslogHost>syslogServerHostName</syslogHost>
    <facility>AUTH</facility>
    <suffixPattern>%-5level [%thread] %date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC} %-5level [%thread] %F:%L - %msg%n </suffixPattern>
  </appender>

  <root level="INFO">
    <appender-ref ref="FILE" />
    <!--<appender-ref ref="STDOUT" />-->
    <appender-ref ref="SYSLOG" />
  </root>

  <logger name="com.thinkaurelius.thrift" level="ERROR"/>
  <logger name="org.apache.cassandra.service.MigrationManager" level="DEBUG"/>
  <logger name="org.apache.cassandra.service.MigrationTask" level="DEBUG"/>
  <!--<logger name="org.apache.cassandra.auth.PasswordAuthenticator" level="TRACE"/>-->
  1. Save and close the file by typing Esc followed by :q!.
  2. Repeat steps 1-6 on all other Analytic nodes in the vRealize Operations cluster.