Browse OpenIM Guides
Guides

Monitoring and Alerting

Enable Prometheus, Alertmanager, Grafana, and node-exporter.

Copy

Components

ComponentPurposeDeployment
PrometheusCollects and stores metricsEnable manually
AlertmanagerManages and sends alertsEnable manually
GrafanaDisplays monitoring dashboardsEnable manually
node-exporterCollects node and server metricsEnable manually

Start monitoring

Start the components

OpenIM uses Prometheus, Alertmanager, Grafana, and node-exporter for monitoring and alerting. A regular docker compose up -d does not start them. Enable the monitoring profile with:

docker compose --profile m up -d
This procedure does not apply to Windows. To enable monitoring on Windows, update the network mode and port mappings for the monitoring services in docker-compose.yml, then replace 127.0.0.1 in prometheus.yml with the private-network IP.

Import OpenIM metrics into Grafana

Sign in to Grafana

Sign in to the admin console, select data monitoring in the left navigation, then sign in to Grafana with the default username admin and password admin.

You can also open your_ip:13000 directly, replacing your_ip with the deployment server IP.

Grafana login

Add a Prometheus data source

In the left navigation, open Connections/Add new connection, search for prometheus, and add the data source. Enter http://your_ip:19090 as the Prometheus URL (19090 is the default port), then select Save and Test.

Add a Prometheus data source

Configure the Prometheus data source

Import the dashboard

Open Dashboards, select Create Dashboard, and then select Import dashboard.

Create a Grafana dashboard

Import the default OpenIM dashboard in either of these ways:

  1. Copy the contents of Demo.json into Import via dashboard JSON model.
  2. Select Upload dashboard JSON file and upload open-im-server/config/grafana-template/Demo.json.

Select Load.

Load the OpenIM dashboard

Select the data source you just added, then select Import.

OpenIM metrics dashboard

The main OpenIM monitoring metrics are now configured.

Import node-exporter metrics into Grafana

Open Dashboard, then select Import from the New menu.

Import a dashboard

Enter 1860 in Grafana.com dashboard URL or ID, select Load, and then select Import.

Load dashboard 1860

The node-exporter metrics appear in the imported dashboard.

node-exporter metrics