Browse OpenIMSDK Guides
Guides

Monitoring and Alerting

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

Copy

Monitoring architecture

ComponentPurposeDeployment method
PrometheusCollects and stores OpenIMServer time-series metricsEnabled manually via profile
AlertmanagerDeduplicates, groups, and routes operational alertsEnabled manually via profile
GrafanaVisualizes metrics through customizable dashboardsEnabled manually via profile
node-exporterCollects host-level system metrics (CPU, RAM, disk, network)Enabled manually via profile

Start the monitoring stack

Start containers with Docker Compose

OpenIMServer uses Prometheus, Alertmanager, Grafana, and node-exporter for infrastructure and application observability. Standard docker compose up -d invocations do not start these services by default. Explicitly enable the m (monitoring) profile:

docker compose --profile m up -d
Windows deployments: This Compose profile relies on host networking suitable for Linux. When running under Windows Docker Desktop, adjust the network mode and port forwarding in docker-compose.yml, and replace 127.0.0.1 scrape targets in prometheus.yml with your host machine's LAN IP address.

Import OpenIMServer dashboards into Grafana

Sign in to Grafana

  1. Log in to the OpenIM Admin Console, then select Data Monitoring in the left sidebar.
  2. Sign in to Grafana using the default credentials (admin / admin).
  3. Alternatively, navigate directly to http://your_ip:13000 in your browser (replace your_ip with your server host IP).

Grafana login page

Add Prometheus as a data source

  1. In the Grafana left navigation menu, open Connections > Add new connection.
  2. Search for Prometheus and select it.
  3. In the Prometheus server URL field, enter http://your_ip:19090 (where 19090 is the Prometheus default port).
  4. Click Save & test to confirm connectivity.

Add Prometheus data source

Configure Prometheus data source

Import the OpenIMServer dashboard

  1. Navigate to Dashboards, click New, and select Import.

Create Grafana dashboard

  1. Import the OpenIMServer dashboard using either method:
  2. Copy the raw JSON from Demo.json and paste it into Import via dashboard JSON model.
  3. Click Upload dashboard JSON file and select open-im-server/config/grafana-template/Demo.json.
  4. Click Load.

Load OpenIMServer dashboard

  1. Select the Prometheus data source created in the previous step, then click Import.

OpenIMServer metrics dashboard

OpenIMServer core performance metrics and service statuses are now visualized.

Import node-exporter host metrics

  1. Open Dashboards, click New, and select Import.

Import node-exporter dashboard

  1. Enter dashboard ID 1860 into Grafana.com dashboard URL or ID, then click Load.
  2. Select your Prometheus data source and click Import.

Load dashboard 1860

Once imported, host-level metrics including CPU utilization, memory pressure, disk I/O, and network throughput are displayed:

node-exporter metrics