Installation
  • 23 Apr 2024
  • 4 Minutes to read
  • Dark
    Light
  • PDF

Installation

  • Dark
    Light
  • PDF

Article Summary

This article explains how to setup and configure the extended monitoring plugin (Composer monitor) to process metrics and logs on a single host - for all available Composer instances.

Composer monitor can be installed on a host that already runs a Composer instance - or on a completely separate host.

The complete setup will be performed in two steps:

1 - Configure Composer

Composer will be configured to include labels in log entries and metrics - to allow centralized filtering and searching.
Composer will also be configured to send log entries to the Composer monitor's log entry collection endpoint.

Please follow the necessary steps below, described separately for Composer Desktop and Composer Runtime.

Composer Desktop Application

  • Go to Edit -> Settings in the main menu and select the General tab
  • Set a unique System Label for Composer. (Such as Composer test Instance #1 in the example below).
  • Check the Add System Label, Hostname, and Version to Log and Metrics checkbox.

windows-composer-setup3

  • Go to the Metrics tab
  • Check the Enable Prometheus Endpoint checkbox.

windows-composer-setup-metrics.PNG

Note

The default Prometheus port is 8015. If you use a different port, make sure this is set in composerInstances.yml in Step 2 - Configure Composer Monitor as well.

  • Check the Push logs to Loki checkbox.
  • Change the Loki endpoint to the IP where Composer monitor is / will be hosted.

windows-composer-setup-loki.PNG

Note

The Composer monitor host must have port 3100 enabled to be able to receive logs.

Restart Composer

Make sure to restart Composer for these settings to take effect.

Composer Runtime Application

For the Composer Runtime application, the following settings must be enabled/set in the settings.xml file in the Composer runtime directory:

  • Set a unique SystemLabel - this will uniqely identify this host's Composer instance
  • Set EnablePrometheus: true - this will enable the Prometheus (metrics) endpoint
  • Set AddSystemLabelToLogEntries: true - this will add system label to logs and metrics
  • Set EnablePushLogsToLoki: true - this will send logs to Composer monitor
  • Change LokiEndPointAddress to the ip.to.composer.monitor:3100 - this configures where to send the logs

2 - Setup Composer monitor

Composer monitor will be set up to gather metrics from all running Composer instances.

Prerequisites

Composer Monitor runs in Docker, which requires that your system has Docker Desktop / Docker + Docker Compose installed. Please verify that your Docker setup meets the specified requirements, if already installed and configured.

Also make sure you add your extended monitoring license file to each Composer instance.

Windows

  • Install Docker Desktop
  • Start the Docker Desktop application and ensure the setting to Start Docker Desktop when you log in is checked (to ensure this setup runs automatically, even after future restarts)

docker-windows

Linux

Extract the Composer monitor archive contents

Extract the contents of the Composer monitor archive. Anywhere is fine, but consider the location permanent in that the files are kept and are subject to be updated in further Composer Monitor releases.

Configure Composer instances

The archive contains a configuration file called composerInstances.yml. By default, it assumes that Composer Monitor is set up on a host that already runs a Composer instance.

To add other Composer instance targets, append the list in the following format "http://ip.to.host:<prometheus_port>,"

If you are running the optional server stats exporter (Linux only, see below) - add these as well in the following format: http://ip.to.host:9100.

Example:

  • Add two new Composer instance targets
  • Add one server stats (Linux only) target
- targets: [
  "http://host.docker.internal:8015",  # Gather metrics from THIS host.
  "http://20.20.50.1:8015",            # Gather metrics from 20.20.50.1.
  "http://20.20.50.2:8015",            # Gather metrics from 20.20.50.2.
  "http://20.20.50.2.9100",            # Gather server stats from 20.20.50.2
]
Prometheus port

8015 is the default Prometheus port in Composer. It is possible to use a different port - but that must be configured in Composer as well in Step 1 - Configure Composer.

Optional: Include server stats (Linux only)

If you are running Composer on a Linux host, download and run this docker-compose.yml file and save it anywhere on that host. This will include incredibly extensive stats for everything related to CPU, Memory, Disk and I/O to monitor the Composer hosts themselves, as well.

Run it:

docker compose up -d

Stop it:

docker compose down

Run Composer Monitor

Depending on how Docker is installed, use either command below that works:

docker compose up -d

or

docker-compose up -d

The Composer Monitor Docker container should be kept running in the background.

Access Composer Monitor

While the Composer Monitor Docker container is running, the Grafana dashboards are available at http://localhost:3010 (or the IP of the current host)

The home dashboard will, after an initial startup delay, show a list of all specified Composer targets in composerInstances.yml and their connection status.

It will also show any configured server stats targets. If at least one Linux server is running the stats exporter, the Server dashboard will provide in-depth details.

image.png

A successful configuration will show

StatusExtended monitoring
ConnectedEnabled

When a specified Composer target:

  • Is sending metrics.
  • Has a valid license installed, with extended monitoring capabilities.
Note

This view will update automatically (periodically). The example above shows 4 specified Cmposer targets and 3 server targets, but only one of each has been completely setup (and is sending data).

Stop Composer Monitor

If you need to stop Composer Monitor, depending on how Docker is installed, use either command below that works:

docker compose down

or

docker-compose down

Was this article helpful?

What's Next