Skip to content
TIBCO BusinessWorks 6 Prometheus Metrics Exporter
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
META-INF
OSGI-INF
lib
src/io/macronova/tibco/bw6/prometheus/event/subscriber
.classpath
.gitignore
.project
LICENSE
README.md
build.properties

README.md

TIBCO BusinessWorks 6 Prometheus Metrics Exporter

Grafana Dashboard

Project allows to expose common performance metrics of BW6 processes and JVM. Statistics can be further pulled by Prometheus from HTTP endpoint. Applied naming convention:

  • JVM metrics follow default Prometheus implementation from io.prometheus:simpleclient_hotspot:0.5.0 JAR.
  • BW6 process latency histogram: process__${process-name}__latency_seconds.
  • BW6 activity duration histogram: activity__${process-name}__${activity-name}__latency_seconds.

Build Project

  1. Clone Git repository and import project into TIBCO BusinessStudio.
  2. Export the project as a plug-in by right clicking on its name and selecting Export > Export... > Plug-in Development > Deployable plug-ins and fragments.
  3. In the Export wizard, ensure that Event Bus subscriber project has been selected, and specify a location to export binaries.
  4. Click Finish.

Configuration

Plug-in enables users to limit exposed metrics to given set of applications, processes and activities. Below configuration file presents all available options.

{
  "httpPort": "1234",
  "includeApplications": [
    "samples.bwce.prometheus.application"
  ],
  "includeProcesses": [
    "samples.bwce.prometheus.*"
  ],
  "includeActivities": [
    "samples.bwce.prometheus.*#JDBC.*",
    "samples.bwce.prometheus.*#HDFS.*"
  ],
  "processHistogramBuckets": [
    0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
  ],
  "activityHistogramBuckets": [
    0.002, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1
  ],
  "processHistogramOverrides": [
    { "name": "samples.bwce.prometheus.batch.*", "buckets": [ 0.5, 1, 2, 5, 10, 60, 300, 600 ] },
    { "name": "samples.bwce.prometheus.report.*", "buckets": [ 1, 2, 5, 10, 60, 300, 600 ] }
  ],
  "activityHistogramOverrides": [
    { "name": "samples.bwce.prometheus.batch.*#JDBC.*", "buckets": [ 0.1, 0.25, 0.5, 1, 2, 5, 10 ] },
    { "name": "samples.bwce.prometheus.batch.*#HDFS.*", "buckets": [ 0.5, 1, 2, 5, 10 ] }
  ],
}
Property Name Default Description
httpPort 1234 HTTP server listen port number.
includeApplications All Array of regular expressions matching applications which metrics should be published.
includeProcesses All Array of regular expressions matching BW processes which metrics should be published.
includeActivities None Array of regular expressions matching BW activities which metrics should be published. Name of every activity is represented as: ${process-name}#${activity-name}. By default activity-level metrics are disabled.
processHistogramBuckets 0.005 .. 10 List of histogram buckets for BW6 processes. Default value: 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10. Consult Prometheus documentation.
activityHistogramBuckets 0.005 .. 10 List of histogram buckets for BW6 activities. Default value: 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10. Consult Prometheus documentation.
processHistogramOverrides None Provides ability to override histogram buckets for processes matching given regular expression.
activityHistogramOverrides None Provides ability to override histogram buckets for activities matching given regular expression.

Users need to configure JVM system property prometheus-metrics-config which defines fully qualified path to described JSON configuration manifest.

You may decide to accept default values (exposing metrics of all processes, but none activities, for all applications on HTTP port 1234) and skip any configuration activities.

Installation on BW6

  1. Clone and build project from source as described in above section or copy one of the releases available on GitHub.
  2. Copy JAR to ${BW_HOME}/system/hotfix/shared.
  3. Create configuration manifest as described in Configuration paragraph (or skip to accept default values).
  • Update AppSpace or AppNode configuration to include JVM system property prometheus-metrics-config referencing appropriate file.
    java.extended.properties="-Dprometheus-metrics-config=/opt/tibco/bw650/config/prometheus-reporter.json"
    
  • If you deploy multiple AppNodes on the same machine, separate configuration for every AppNode is required to prevent HTTP port collision.
  1. For changes to take effect, restart modified AppNodes or AppSpaces.

Installation on BWCE

  1. Create customized base Docker image that includes Prometheus Metrics Exporter plug-in.
  • Clone and build project from source as described in above section or copy one of the releases available on GitHub to new folder.
  • Create Dockerfile with below content.
    FROM tibco/bwce:latest
    COPY *.jar /resources/addons/jars/
    
  • Build base BWCE-Prometheus image.
    $ docker build -t tibco/bwce-prometheus:latest .
  1. Edit Dockerfile of your BWCE project.
  • Update base Docker image to tibco/bwce-prometheus:latest.
  • Add EXPOSE directive to expose Prometheus HTTP endpoint.
    FROM tibco/bwce-prometheus:latest
    EXPOSE 1234
    
  1. If you wish to change default plug-in configuration, create file config/prometheus-reporter.json inside your BWCE project. Edit Dockerfile to copy mentioned file inside Docker image and add required JVM system property.
ENV BW_JAVA_OPTS="-Dprometheus-metrics-config=/resources/addons/config/prometheus-reporter.json ${BW_JAVA_OPTS}"
COPY config/* /resources/addons/config/

Tutorial

Looking for quick start? Read our five minute tutorial.

You can’t perform that action at this time.