42 Monitoring Business Operations Center

Learn how to use external applications, such as Prometheus and Grafana, to monitor Oracle Communications Business Operations Center.

Topics in this document:

About Monitoring Business Operations Center

You set up the monitoring of Business Operations Center by using the following external applications:

  • WebLogic Monitoring Exporter: Use this Oracle web application to scrape runtime information from Business Operations Center and then export the metric data into a format that can be processed by Prometheus. It exposes different WebLogic Mbeans metrics, such as memory usage and sessions count, that are required for monitoring and maintaining the Business Operations Center application.

  • Prometheus: Use this open-source toolkit to aggregate and store the Business Operations Center metric data from WebLogic Monitoring Exporter.

  • Grafana: Use this open-source tool to view on a graphical dashboard all Business Operations Center metric data stored in Prometheus.

Setting Up Monitoring in Business Operations Center

To set up monitoring in Business Operations Center:

  1. Deploy a standalone version of Prometheus. See "Installation" in the Prometheus documentation.

    For the list of compatible software versions, see "Business Operations Center Software Compatibility" in BRM Compatibility Matrix.

  2. Install Grafana. See "Install Grafana" in the Grafana documentation.

    For the list of compatible software versions, see "Business Operations Center Software Compatibility" in BRM Compatibility Matrix.

  3. Configure WebLogic Monitoring Exporter to scrape metric data from Business Operations Center. See "Configuring WebLogic Monitoring Exporter for Business Operations Center".

  4. Configure Prometheus to collect metric data. See "Configuring Prometheus for Business Operations Center".

  5. Configure Grafana for displaying Business Operations Center metric data. See "Creating Grafana Dashboards for Business Operations Center".

Configuring WebLogic Monitoring Exporter for Business Operations Center

To configure WebLogic Monitoring Exporter to scrape metric data for Business Operations Center:

  1. Download the latest supported version of WebLogic Monitoring Exporter (getN.N.sh) from https://github.com/oracle/weblogic-monitoring-exporter/releases, where N.N is the version number.

    For the list of supported versions, see "Business Operations Center Software Compatibility" in BRM Compatibility Matrix.

  2. Edit the wls-exporter-config.yaml file to include the Business Operations Center metrics that you want scraped. For the list of supported metrics, see "WebLogic-Based Application Metrics".

  3. Run the following command:

    bash getN.N.sh wls-exporter-config.yaml

    The wls-exporter.war is downloaded to your current directory.

  4. Deploy the wls-exporter.war in the WebLogic Domain through the Admin Console, setting the target as all servers to be monitored.

WebLogic Monitoring Exporter is deployed on your servers and begins scraping metric data for Business Operations Center.

Example 42-1 Scraping Metrics for Business Operations Center

The following shows sample wls-exporter-config.yaml entries for setting up WebLogic Monitoring Exporter to scrape metrics from Business Operations Center:

metricsNameSnakeCase: true
queries:
- key: name
  keyName: location
  prefix: wls_server_
  applicationRuntimes:
    key: name
    keyName: app
    componentRuntimes:
      prefix: wls_webapp_config_
      type: WebAppComponentRuntime
      key: name
      values: [deploymentState, contextRoot, sourceInfo, sessionsOpenedTotalCount, openSessionsCurrentCount, openSessionsHighCount]
      servlets:
        prefix: wls_servlet_
        key: servletName
- JVMRuntime:
    prefix: wls_jvm_
    key: name
- executeQueueRuntimes:
    prefix: wls_socketmuxer_
    key: name
    values: [pendingRequestCurrentCount]
- workManagerRuntimes:
    prefix: wls_workmanager_
    key: name
    values: [stuckThreadCount, pendingRequests, completedRequests]
- threadPoolRuntime:
    prefix: wls_threadpool_
    key: name
    values: [executeThreadTotalCount, queueLength, stuckThreadCount, hoggingThreadCount]
- JTARuntime:
    prefix: wls_jta_
    key: name

Configuring Prometheus for Business Operations Center

To configure a standalone version of Prometheus for Business Operations Center:

  1. Configure Prometheus to collect your Business Operations Center metrics exposed by WebLogic Monitoring Exporter.

    To do so, add a scraping configuration to your prometheus.yaml file that is similar to the one shown below for each managed server and admin server in your cluster. In the following example, the Business Operations Center application is deployed in the boc-domain WebLogic domain and the server topology is:

    • The admin-server is on port 7001

    • A cluster named cluster-1 with two managed servers

    • managed-server1 is on port 7003

    • managed-server2 is on port 7005

    scrape_configs:  
      - job_name: 'wls-metric-boc'    
        scrape_interval: 1s    
        metrics_path: /wls-exporter/metrics    
        scheme: http    
        static_configs:    
        - targets: ['localhost:7001']      
          labels:        
            weblogic_domainName: boc_domain        
            weblogic_domainUID: boc_domain        
            weblogic_serverName: admin-server    
        - targets: ['localhost:7003']      
          labels:        
            weblogic_clusterName: cluster-1        
            weblogic_domainName: boc_domain        
            weblogic_domainUID: boc_domain        
            weblogic_serverName: managed-server1    
        - targets: ['localhost:7005']      
          labels:        
            weblogic_clusterName: cluster-1        
            weblogic_domainName: boc_domain        
            weblogic_domainUID: boc_domain        
            weblogic_serverName: managed-server2    
        basic_auth:      
          username: username      
          password: password

    where username and password is your WebLogic Server user name and password.

  2. Configure the alert rules in Prometheus.

    To do so, add alert rules that are similar to the ones shown below to your prometheus-rules.yaml file. For examples of expressions that you can use for memory and CPU usage, see "Sample Expressions for CPU and Memory Usage".

    groups:  
      - name: alertmanager.rules    
        rules:      
          - alert: ClusterWarning        
            annotations:          
              message: WLS cluster has less than 2 managed servers running for more than 1 minute.        
            expr: sum by(weblogic_domainUID, weblogic_clusterName, weblogic_serverName) (up{weblogic_domainUID=~'.+'}) < 2        
            for: 1m        
            labels:          
              severity: critical
  3. Configure Prometheus Alertmanager to raise alerts.

    To do so, add alert configurations that are similar to the ones shown below to your prometheus.yaml file.

    # Alertmanager configuration
    alerting:
      alertmanagers:
      - static_configs:
        - targets:
           - localhost:9093
    # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
    rule_files:
      - "prometheus-rules.yaml"
  4. Stop and restart Prometheus.

Creating Grafana Dashboards for Business Operations Center

Create a dashboard in Grafana for displaying your Business Operations Center metric data. You can alternatively use the sample dashboard JSON model that is included with the Business Operations Center package.

Note:

For the sample dashboard to work properly, the datasource name for the WebLogic Domain must be Prometheus.

To use the sample dashboard, import the Domain_home/samples/monitoring/boc-dashboard.json dashboard file into Grafana, where Domain_home is the WebLogic Server domain home directory in which Business Operations Center is deployed. For information about importing dashboards into Grafana, see "Export and Import" in the Grafana Dashboards documentation.

Sample Expressions for CPU and Memory Usage

You can use the following sample expressions in your Prometheus alert rules that are based on current CPU and memory usage.

To raise an alert when the average CPU usage across all managed servers is greater than 70% for more that two minutes:

avg(avg_over_time(wls_jvm_process_cpu_load{weblogic_domainUID="boc-domain",weblogic_serverName=~"managed-server.*"}[2m]))*100 > 70

To raise an alert when the average memory usage across all managed servers is greater than 70% for more than two minutes:

100 - avg(avg_over_time(wls_jvm_heap_free_percent{weblogic_domainUID="app-domain",weblogic_serverName=~"managed-server.*"}[2m])) > 70