Monitoring with Grafana

Relution provides a variety of metrics that can be visualised using Grafana. Below we have provided a basic configuration for a Docker setup and two dashboards. These configurations can be adapted to individual needs. To monitor a remote server, see the configuration at the bottom of this page.


Enabling Prometheus metrics in Relution

As of Relution 26.4, Relution only exposes the health endpoint by default for security reasons; the Prometheus endpoint (/actuator/prometheus) is disabled. To make the metrics available, the following section must be added to the application.yml configuration file of the Relution server:

management:
  endpoints:
    web:
      exposure:
        include:
          - health
          - prometheus

A restart of the Relution server is required for the change to take effect.


Local service configuration

This configuration implements Prometheus and Grafana in an on-premises Relution setup in a Docker environment.

To monitor a server without direct access, for example, see the configuration below.

Necessary files and directories

As mentioned, the configurations are available, can be downloaded details →.

Files

  • docker-compose.yml
    • Contains the configurations of the Docker containers Prometheus and Grafana.
  • prometheus.yml
    • Contains the configuration of Prometheus.
  • .env
    • Contains the variables GF_SECURITY_ADMIN_USER and GF_SECURITY_ADMIN_PASSWORD. For productive operation it is recommended to change the password.

Subfolder

  • Dashboards Sample dashboards: The configuration files for two sample dashboards are included. These dashboards are automatically imported into the Grafana Docker container.

  • Provisioning Base configurations: The configuration files for the Prometheus data source and the two sample dashboards are included. These configurations can be adapted as required.

Integration of the docker-compose.yml

The docker-compose.yml described here can be used in two ways:

  • Standalone The file can be used as a standalone file.

  • Content The content of the file can be included in an existing docker-compose.yml.

In our example, the content of the file is included in the existing docker-compose.yml. In this case, it is important that the files and directories of the volumes are in the appropriate place and have the correct permissions. In our docker-compose.yml the containers mariadb, relution and nginx are present, so lines two to four have only been inserted for orientation.

Show full configuration example
services: # already present
 # mariadb:  already present
 # relution:  already present
 # nginx:  already present

  prometheus:
    image: prom/prometheus:${DOCKER_PROMETHEUS:-latest}
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    networks:
      relution-network:
    ports:
      - "${PORT_PROMETHEUS:-9090}:9090"
    expose:
      - "9090"
    logging:
      driver: "json-file"
      options:
        max-size: "${DOCKER_PROMETHEUS_LOGSIZE:-8m}"
        max-file: "4"
        compress: "true"

  grafana:
    image: grafana/grafana:${DOCKER_GRAFANA:-latest}
    volumes:
      - ./provisioning:/etc/grafana/provisioning
      - ./dashboards:/var/lib/grafana/dashboards
    depends_on:
      - prometheus
    environment:
 # set the placeholder in dashboard, to the actual name of datasource
      DS_PROMETHEUS: "Prometheus"
 # set grafana default admin user
      GF_SECURITY_ADMIN_USER: "${GF_SECURITY_ADMIN_USER}"
 # set grafana default admin password
      GF_SECURITY_ADMIN_PASSWORD: "${GF_SECURITY_ADMIN_PASSWORD}"
    networks:
      relution-network:
    ports:
      - "${PORT_GRAFANA:-3000}:3000"
    expose:
      - "3000"
    logging:
      driver: "json-file"
      options:
        max-size: "${DOCKER_GRAFANA_LOGSIZE:-8m}"
        max-file: "4"
        compress: "true"

In the docker-compose.yml the ports for Prometheus and Grafana are set to 9090 and 3000 respectively. This section can be inserted into the existing docker-compose.yml for the example.

Adjusting the .env file

For security, it is recommended to adjust the password parameter.

GF_SECURITY_ADMIN_USER=admin
GF_SECURITY_ADMIN_PASSWORD=password

Adjusting the prometheus.yml file

global:
 # Default scrape interval
  scrape_interval: 15s

scrape_configs:
 # Job to scrape Prometheus metrics
  - job_name: "prometheus"
    scrape_interval: 5s
    static_configs:
      - targets: ["localhost:9090"]

  - job_name: "relution"
 # Job to scrape application metrics
    metrics_path: "/actuator/prometheus"
    scrape_interval: 5s
    static_configs:
 # Call the docker host inside container
      - targets: ["relution:8099"]

In our concrete setup, the last line must contain the name of the container and the port 8099, in this case relution:8099. With the command docker ps, the name and port of the container used can be checked and then adjusted if necessary. When the containers are shut down and started with docker compose down and docker compose up -d, the Grafana UI is accessible under the IP of the server on port 3000. Two dashboards are now available.

Dashboards

Relution Server Dashboard:

Grafana Dashboard

Default Spring Boot Dashboard:

Grafana Dashboard


Remote Server Configuration

In this scenario, Grafana is also operated within a Docker container. Specific adjustments are required to correctly read the metrics. The primary difference from the local configuration is that this setup communicates with the Relution instance via HTTPS.

Preparation in Relution

Before starting the containers, a corresponding user must exist in Relution:

  • Organization: The user must be created within the Global Organization.
  • Permissions: Assign the Health Check (or System State) permission to the user.
  • Authentication: Access must be configured via Basic Authentication.
  • User accounts using OIDC (Single Sign-On) will not work for this purpose.
  • Multi-Factor Authentication (MFA) must be disabled for this specific account.

Download and Extraction

Download the prepared configuration files:
Download Grafana Setup →

Extract the archive into a directory of choice on the target server.

Adjusting Configuration Files

File: compose.yml

Adjust the environment variables for administrative access to the Grafana interface:

  • GF_SECURITY_ADMIN_USER: The desired administrator username.
  • GF_SECURITY_ADMIN_PASSWORD: A secure password for the Grafana login.

File: prometheus.yml

This file defines the connection to the Relution interface. Replace the placeholders with the following data:

ParameterDescription
$SERVER_URLThe external URL of the Relution server (Important: without the https:// prefix).
usernameThe username of the Relution user created under Preparation in Relution.
passwordThe corresponding password for that user.

Deployment

Once the configuration is complete, the containers can be started. Run the following command in the directory:

docker compose up -d

Access Notes:

  • Grafana is accessible via port 3000 by default.
  • Depending on server hardening, access is possible directly via IP/domain or securely via an SSH tunnel.

To access Grafana securely via an SSH tunnel, port forwarding can be used. This is particularly useful if port 3000 is closed in the server’s firewall.

Establish the SSH Tunnel

Run the following command in a local terminal (Windows PowerShell, macOS, or Linux):

ssh -L 3000:localhost:3000 username@your-server-ip

Parameter Explanation:

  • -L 3000:localhost:3000: This forwards port 3000 of the local machine to port 3000 of the remote server.
  • username: The SSH user on the server.
  • your-server-ip: The IP address or hostname of the remote server.

Accessing the Interface

  1. Keep the terminal window with the active SSH connection open.
  2. Open a web browser.
  3. Enter the following in the address bar: http://localhost:3000
  4. Log in using the credentials defined in the compose.yml file (GF_SECURITY_ADMIN_USER and GF_SECURITY_ADMIN_PASSWORD).
Top