# Monitoring

# Orchestra

# Prerequisites

  • Docker Engine
  • Docker Compose
  • Orchestra

# Install

Since 2.7 orchestra exposes a new end point for metrics by the http protocol with the following default settings:

# MONITORING CONFIG
management.endpoints.enabled-by-default=false
endpoints.health.sensitive=false
management.security.enabled = false
management.server.port=7001
management.endpoint.metrics.enabled=true
management.metrics.enable.http=true
management.metrics.enable.orchestra=true
management.endpoint.prometheus.enabled=true
management.endpoints.web.exposure.include=health,prometheus,metrics
management.endpoint.health.show-components=always
management.endpoint.health.show-details=always

To disable it you need to change the configuration in this way:

# MONITORING CONFIG
management.endpoints.enabled-by-default=false
endpoints.health.sensitive=false
management.security.enabled = false
management.server.port=7001
management.endpoints.jmx.exposure.exclude=*
management.endpoints.web.exposure.exclude=*
management.endpoint.metrics.enabled=false
management.metrics.enable.http=false
management.metrics.enable.orchestra=false
management.endpoint.prometheus.enabled=false
management.endpoint.health.show-components=always
management.endpoint.health.show-details=always

If you keep both the exclude property takes precedence over the include property

Once orchestra is running you can verify it at http://xxx.xxx.xxx:7001/actuator, the following output will be provided:

{
        "_links": {
            "self": {
                "href": "http://xxx.xxx.xxx:7001/actuator",
                "templated": false
            },
            "prometheus": {
                "href": "http://xxx.xxx.xxx:7001/actuator/prometheus",
                "templated": false
            },
            "metrics-requiredMetricName": {
                "href": "http://xxx.xxx.xxx:7001/actuator/metrics/{requiredMetricName}",
                "templated": true
            },
            "metrics": {
                "href": "http://xxx.xxx.xxx:7001/actuator/metrics",
                "templated": false
            }
        }
    }

Create a folder ie orchestra-monitoring, and put the following files, replacing xxx.xxx.xxx with the ip address or the domain name where orchestra is running:

prometheus.yml

# my global config
global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).
# Rules and alerts are read from the specified file(s)
# rule_files:
#  - rules.yml
# Alerting specifies settings related to the Alertmanager
#alerting:
#  alertmanagers:
#    - static_configs:
#        - targets:
#            # Alertmanager's default port is 9093
#            - docker.for.mac.localhost:9093
    # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
    #rule_files:
    # - "first_rules.yml"
    # - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  #- job_name: 'prometheus'
  #  # metrics_path defaults to '/metrics'
  #  # scheme defaults to 'http'.
  #  static_configs:
  #  - targets: ['127.0.0.1:9090']
  - job_name: 'orchestra'
    metrics_path: '/actuator/prometheus'
    scrape_interval: 5s
    static_configs:
      - targets: ['xxx.xxx.xxx:7001']

docker-compose.yml

version: '3.7'
services:
  prometheus:
    image: prom/prometheus:v2.24.0
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    ports:
      - 9090:9090
    networks:
      - "monitoring-network"
  grafana:
    image: grafana/grafana:7.3.6
    volumes:
      - ./data:/var/lib/grafana
    ports:
      - 3000:3000
    networks:
      - "monitoring-network"
    depends_on:
      - prometheus
networks:
  monitoring-network:
    driver: bridge

Run the following command:

docker-compose up -d

After a while, prometheus and grafana will be ready on port 9090 and 3000 respectively

# Configure Grafana

Connect to http://xxx.xxx.xxx:3000 and login with the following credentials:

user: admin
password: admin

The first time you will be invite to change your admin password; once logged in you need to add and configure a data source to be able to fetch data from prometheus

add datasource

and then configure it like this

configure datasource

Now you can import dashboards, downloading the following files:

Orchestra Workflows Dashboard Orchestra App Dashboard

and upload by the following grafana section

import dashboard

The two dashboards will start to plot data, giving you informations like number of messages, errors, active workflows, system load and more

app dashboard workflows dashboard