Spotfire® Server and Environment - Installation and Administration

Enabling the JMX logging appender

To monitor the server by using TIBCO Hawk or another Java Management Extensions (JMX)-compliant monitoring tool, you can enable an extra log appender so that the server outputs log events as JMX notifications.

Before you begin

You must have write access to the server where Spotfire Server is installed.

About this task

Perform this task on the computer where Spotfire Server is installed.

Procedure

  1. Open the following file in a text editor or an XML editor: <server installation dir>/tomcat/spotfire-config/log4j2.xml.
  2. Add a new appender definition to the <Appenders> section of the log4j2.xml file.
    For example:
    <Jmx name="Jmx" description="description of the log">
        <PatternLayout pattern="[%X{thread.info}] %c{3}: %m%n" />
      </Jmx>

    where the values of the name, description, and pattern attributes can be changed, and the description attribute is optional.

  3. In the <Loggers> section of the file, locate the loggers for which you want to enable JMX functionality and then add a reference to the JMX appender. See the fourth line of the following example code.
    For example:
     <Logger name="com.spotfire" level="DEBUG" additivity="false">
        <AppenderRef ref="serverlog"/>
        <AppenderRef ref="Console"/>
        <AppenderRef ref="Jmx"/>
      </Logger>
    Note: You can configure multiple JMX appenders, but each one must have a different value for the name attribute.
  4. Save and close the file.
  5. Restart the server service.