45 Monitoring Pipeline Configuration Center

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

Topics in this document:

About Monitoring Pipeline Configuration Center

You set up the monitoring of Pipeline Configuration Center by using the following external applications:

  • WebLogic Monitoring Exporter: Use this Oracle web application to scrape runtime information from Pipeline Configuration 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 Pipeline Configuration Center application.
  • Prometheus: Use this open-source toolkit to aggregate and store the Pipeline Configuration Center metric data from WebLogic Monitoring Exporter.
  • Grafana: Use this open-source tool to view on a graphical dashboard all Pipeline Configuration Center metric data stored in Prometheus.

Setting Up Monitoring in Pipeline Configuration Center

To set up monitoring in Pipeline Configuration Center:

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

    For the list of compatible software versions, see "Pipeline Configuration 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 "Pipeline Configuration Center Software Compatibility" in BRM Compatibility Matrix.

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

  4. Configure Prometheus to collect metric data. See "Configuring Prometheus for Pipeline Configuration Center".

  5. Configure Grafana for displaying Pipeline Configuration Center metric data. See "Creating Grafana Dashboards for Pipeline Configuration Center".

Configuring WebLogic Monitoring Exporter for Pipeline Configuration Center

To configure WebLogic Monitoring Exporter to scrape metric data for Pipeline Configuration 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 "Pipeline Configuration Center Software Compatibility" in BRM Compatibility Matrix.

  2. Edit the wls-exporter-config.yaml file to include the Pipeline Configuration 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.

  5. Verify that metrics are getting exported by running the following cURL command:

    curl -X GET -i -u WL_userName:WL_password http://localhost:8080/metrics

    where WL_userName and WL_password is the user name and password for WebLogic Server.

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

Example 45-1 Configuring WebLogic Monitoring Exporter to Scrape Metrics

The following shows sample wls-exporter-config.yaml entries for setting up WebLogic Monitoring Exporter to scrape metrics from Pipeline Configuration 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 Pipeline Configuration Center

To configure a standalone version of Prometheus for Pipeline Configuration Center:

  1. Configure Prometheus to collect your Pipeline Configuration 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 Pipeline Configuration Center application is deployed in the pcc-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-pcc'    
        scrape_interval: 1s    
        metrics_path: /wls-exporter/metrics    
        scheme: http    
        static_configs:    
        - targets: ['<Hostname>:7001']      
          labels:        
            weblogic_domainName: pcc_domain        
            weblogic_domainUID: pcc_domain        
            weblogic_serverName: admin-server    
        - targets: ['<Hostname>:7003']      
          labels:        
            weblogic_clusterName: cluster-1        
            weblogic_domainName: pcc_domain        
            weblogic_domainUID: pcc_domain        
            weblogic_serverName: managed-server1    
        - targets: ['<Hostname>:7005']      
          labels:        
            weblogic_clusterName: cluster-1        
            weblogic_domainName: pcc_domain        
            weblogic_domainUID: pcc_domain        
            weblogic_serverName: managed-server2    
        basic_auth:      
          username: username      
          password: password

    where username and password are 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 Pipeline Configuration Center

Create a dashboard in Grafana for displaying your Pipeline Configuration Center metric data. You can alternatively use the sample dashboard JSON model that is included with the Pipeline Configuration 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/pcc-dashboard.json dashboard file into Grafana, where Domain_home is the WebLogic Server domain home directory in which Pipeline Configuration 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 than two minutes:

avg(avg_over_time(wls_jvm_process_cpu_load{weblogic_domainUID="pcc-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