63 Configuring Subscriber-Based Tracing and Logging

Learn how to configure subscriber-based tracing and logging in Oracle Communications Billing and Revenue Management Elastic Charging Engine (ECE).

Topics in this document:

See also "Reading Log Files" and "Collecting Log Files for Sending to Oracle Technical Support".

About Subscriber-Based Tracing and Logging

You can selectively trace a particular subscriber's session based on the subscriber ID. You can specify a list of subscriber IDs to be traced. ECE then generates log files for the listed subscribers for each session. If a particular subscriber has multiple sessions, separate log files are generated for each session.

The trace file names are unique and are in the format of node_name.subscriber_ID.session_ID.log file. For example, ecs1.SUBSCRIBER1.SESSION1.log.

Note:

By default, ECE can trace and log a maximum of 100 subscriber IDs and 24 session IDs per subscriber at a time. However, if required, you can configure these parameters.

ECE does not archive or remove the log files that are generated. Make sure that you remove or archive the log files, periodically, to avoid running out of disk space.

To enable subscriber-based tracing, a new file named subscriber-trace.xml, is included in the ECE_home/config directory. You can update this file to add a list of subscriber IDs whose sessions need to be traced. See "Enabling or Updating Subscriber-Based Tracing and Logging" for more information.

You can also specify if you want to trace and log selective functions, such as alterations (discounts), charges, and distributions (charge sharing), for each subscriber specified in the list. To enable subscriber-based tracing and logging for selective functions, see "Enabling or Updating Subscriber-Based Tracing and Logging for Selective Functions".

By default, the session trace log files are stored in the ECE_home/logs directory. However, you can modify the location of the session trace files by updating the subscriberTraceLogDir parameter in the ECE_home/config/ece.properties file.

Note:

By default, the log level is set to DEBUG (recommended log level) to generate logs with detailed information. However, you can change the log levels by updating the logLevel parameter in the ECE_home/config/subscriber-trace.xml file.

Enabling or Updating Subscriber-Based Tracing and Logging

To enable or update subscriber-based tracing and logging:

  1. Open the ECE_home/config/subscriber-trace.xml file.

  2. Search for the subscriberTraceConfig section.

  3. Update the values for the following attributes if required:

    • logMaxSubscribers: Specify the maximum number of subscribers for whom you want to enable tracing. The default value is 100.

    • logMaxSubscribersessions: Specify the maximum number of sessions for which the logs need to be generated per subscriber. The default value is 24.

    • logExpiryWaitTime: Specify how long to wait, in seconds, before the logging session expires. The default value is 1.

    • logCleanupInterval: Specify the interval time, in seconds, for log cleanup. The default value is 2.

    • logLevel: Specify the log level you want to use for generating logs; for example, DEBUG or ERROR. The default value is DEBUG.

  4. In the subscriberList section, provide the list of subscriber IDs.

    The following is an example of the XML file that includes the subscriberList section:

    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <config> 
     <!-- 
        <subscriberTraceConfig
            logMaxSubscribers = "100" 
            logMaxSubscriberSessions = "24"
            logExpiryWaitTime  = "1"
            logCleanupInterval = "2"
            logLevel = "DEBUG" 
    config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.SubscriberTraceConfig">
            <subscriberList config-class="java.util.ArrayList">
                <subscriber id="6500000000" config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.SubscriberImpl"/>
                <subscriber id="6500000001"
    config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.SubscriberImpl"/>
            </subscriberList>
    </subscriberTraceConfig>
    </config>
  5. Save and close the file.

  6. On the machine where you have ECC installed, go to ECE_home/bin.

  7. Start ECC:

    ./ecc
  8. Run the following command, which deploys the ECE installation onto the server machines:

    sync

    The relevant ECE installation files are copied to the server machines in your ECE cluster.

  9. Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".

  10. Expand the ECE Logging node.

  11. Expand Configuration.

  12. Expand Operations.

  13. Select updateSubscriberTraceConfiguration.

  14. Click the updateSubscriberTraceConfiguration button.

  15. In the editor's MBean hierarchy, expand the ECE Subscriber Tracing node.

  16. Expand SubscriberTraceManager.

  17. Expand Attributes.

  18. Verify that the values that you specified in step 3 appears.

    Note:

    The attributes displayed here are read-only. You can update these attributes by editing the ECE_home/config/subscriber-trace.xml file.

Disabling Subscriber-Based Tracing and Logging

To disable subscriber-based tracing and logging:

  1. Open the ECE_home/config/subscriber-trace.xml file.

  2. Search for the subscriberTraceConfig section.

  3. Remove all the subscriber IDs from the subscriberList section. For example:

    <subscriber id="6500000001" config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.SubscriberImpl"/>
  4. Save and close the file.

  5. On the machine on which you have ECC installed, go to ECE_home/bin.

  6. Start ECC:

    ./ecc
  7. Run the following command, which deploys the ECE installation onto the server machines:

    sync

    The relevant ECE installation files are copied to the server machines in your ECE cluster.

  8. Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".

  9. Expand the ECE Logging node.

  10. Expand Configuration.

  11. Expand Operations.

  12. Select updateSubscriberTraceConfiguration.

  13. Click the updateSubscriberTraceConfiguration button.

Enabling or Updating Subscriber-Based Tracing and Logging for Selective Functions

Note:

You can enable subscriber-based tracing and logging only for the following selective functions: alterations, charges, and distributions.

To enable or update subscriber-based tracing and logging for selective functions:

  1. Open the ECE_home/config/subscriber-trace.xml file.

  2. Go to the subscriberTraceConfig section.

  3. Update the values for the following attributes, if required:

    • logMaxSubscribers. Specify the maximum number of subscribers for whom you want to enable tracing. The default value is 100.

    • logMaxSubscribersessions. Specify the maximum number of sessions for which the logs to be generated per subscriber. The default value is 24.

    • logLevel. Specify the log level you want to use for generating logs; for example, DEBUG or ERROR. The default value is DEBUG.

  4. In the subscriberList section, provide the list of subscriber IDs:

    The following is an example of the XML file that includes the subscriberList section:

    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <config> 
     <!-- 
        <subscriberTraceConfig
            logMaxSubscribers = "100" 
            logMaxSubscriberSessions = "24"
            logExpiryWaitTime  = "1"
            logCleanupInterval = "2"
            logLevel = "DEBUG" 
    config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.SubscriberTraceConfig">
            <subscriberList config-class="java.util.ArrayList">
                <subscriber id="811000000000" config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.SubscriberImpl"/>
            </subscriberList>
    </subscriberTraceConfig>
    </config>
  5. Search for the ComponentLoggerList section.

  6. Do the following:

    1. To enable subscriber-based tracing and logging for the alteration function, uncomment the following componentLogger blocks in the componentLoggerList section:

      <componentLoggerList config-class="java.util.ArrayList">
                  <!-- Add specific logger name and log level to overwrite the out of the box default logger level
                       For example, the following configuration overwrite the logger named "oracle.communication.brm.charging.subscribertrace.configuration"
                       to have log level "ALL" and the logger named "oracle.communication.brm.charging.ratedevent.publisher to have"
                       log level "OFF".
                       The logger level can only be "ALL", "DEBUG", "ERROR", "FATAL", "INFO", "OFF", "TRACE", "WARN"
                       -->
                  <componentLogger
                          loggerName="ALL"
                          loggerLevel="ERROR"
                           config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.ComponentLoggerImpl"/>
                 <componentLogger
                         loggerName="oracle.communication.brm.charging.rating.alteration"
                         loggerLevel="DEBUG"
      
                         config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.ComponentLoggerImpl"/>
      </componentLoggerList> 
    2. To enable subscriber-based tracing and logging for the charging function, uncomment the following componentLogger blocks in the componentLoggerList section:

      <componentLoggerList config-class="java.util.ArrayList">
                  <!-- Add specific logger name and log level to overwrite the out of the box default logger level
                       For example, the following configuration overwrite the logger named "oracle.communication.brm.charging.subscribertrace.configuration"
                       to have log level "ALL" and the logger named "oracle.communication.brm.charging.ratedevent.publisher to have"
                       log level "OFF".
                       The logger level can only be "ALL", "DEBUG", "ERROR", "FATAL", "INFO", "OFF", "TRACE", "WARN"
                       -->
                  <componentLogger
                          loggerName="ALL"
                          loggerLevel="ERROR"
                           config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.ComponentLoggerImpl"/>
                  <componentLogger
                           loggerName="oracle.communication.brm.charging.rating.charge"
                           loggerLevel="DEBUG"
                           config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.ComponentLoggerImpl"/> 
      </componentLoggerList> 
    3. To enable subscriber-based tracing and logging for the distribution (charge sharing) function, uncomment the following componentLogger blocks in the componentLoggerList section:

      <componentLoggerList config-class="java.util.ArrayList">
                  <!-- Add specific logger name and log level to overwrite the out of the box default logger level
                       For example, the following configuration overwrite the logger named "oracle.communication.brm.charging.subscribertrace.configuration"
                       to have log level "ALL" and the logger named "oracle.communication.brm.charging.ratedevent.publisher to have"
                       log level "OFF".
                       The logger level can only be "ALL", "DEBUG", "ERROR", "FATAL", "INFO", "OFF", "TRACE", "WARN"
                       -->
                  <componentLogger
                          loggerName="ALL"
                          loggerLevel="ERROR"
                           config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.ComponentLoggerImpl"/>
                  <componentLogger
                          loggerName="oracle.communication.brm.charging.rating.distribution"
                          loggerLevel="DEBUG"
                          config-class="oracle.communication.brm.charging.subscribertrace.configuration.internal.ComponentLoggerImpl"/> 
      </componentLoggerList> 
  7. Save and close the file.

  8. On the machine where you have ECC installed, go to ECE_home/bin.

  9. Start ECC:

    ./ecc
  10. Run the following command, which deploys the ECE installation onto the server machines:

    sync

    The sync command copies the relevant files of the ECE installation onto the server machines in the ECE cluster.

  11. Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".

  12. Expand the ECE Logging node.

  13. Expand Configuration.

  14. Expand Operations.

  15. Select updateSubscriberTraceConfiguration.

  16. Click the updateSubscriberTraceConfiguration button.

  17. In the editor's MBean hierarchy, expand the ECE Subscriber Tracing node.

  18. Expand SubscriberTraceManager.

  19. Expand Attributes.

  20. Verify that the values that you specified in step 3 appears.

    Note:

    The attributes displayed here are READ ONLY. You can update these attributes by editing the ECE_home/config/subscriber-trace.xml file.

Collecting Subscriber-Based Log Files

You can use the infoCollector command to collect subscriber-based tracing log files from your ECE system.

To collect subscriber-based log files, run the infocollector command with the following parameters:

infoCollector [-td dir] [-t "SUBSCRIPTION|SUBSCRIPTION.SESSION IDENTIFIER", "..."]

where:

  • -td dir collects all trace files from the provided directory or location. For example:

    infoCollector -td ECE_home/trace01
  • -t "SUBSCRIPTION|SUBSCRIPTION.SESSION IDENTIFIER", "..." adds all trace files to the collection that match the subscription session identifiers. For example:

    infoCollector -t "0048100700.Session01", "0048100702"

The infoCollector command does not collect files from systems on which ECC is running. For example, it does not collect files from the network mediation system.