Actian Monitor > Using Actian Monitor > Monitoring Multiple Database Instances with Actian Monitor > Configure a Shared Monitoring Stack for Additional Database Instances
Was this helpful?
Configure a Shared Monitoring Stack for Additional Database Instances
Note:  A dedicated install mode for additional instances is under active development and will be documented separately once available. In this release, setting up an additional instance-only monitor still requires the manual configuration described below.
1. Install one full stack but do not start. This is the instance that hosts the shared Prometheus and Grafana dashboard. See Installing Actian Monitor on Linux or Installing Actian Monitor on Windows for details.
Keep the shared Prometheus port published. The prometheus service in docker-compose.yaml is published by default on port 9090:
ports:
- "9090:9090"
Leave this as a published port and do not remove it. Each additional instance runs as its own separate compose project with its own separate docker or podman network and cannot reach the shared prometheus service by container name (prometheus:9090), even when both are on the same machine. It must connect through the published host port.
If the additional instance is on a different machine, make sure the host firewall allows inbound connections to this port from that machine.
2. Install each additional DBMS instance into its own installation directory. Use the same installer and installation steps as a normal install. Each instance still requires its own --instance-id, --hostname, JDBC and SSH configuration, and -TenantLabel so it can be distinguished on the shared dashboard. See Installing Actian Monitor on Linux or Installing Actian Monitor on Windows for details on installer options.
3. In the installed directory for instance created in step 1, open the docker-compose.yaml file and locate the alloy section:
alloy:
image: grafana/alloy:v1.3.1
container_name: alloy
command: ["run", "/etc/alloy/config.alloy", "--storage.path=/var/lib/alloy/data", "--server.http.listen-addr=0.0.0.0:12345" ]
restart: unless-stopped
volumes:
- ./config/config.alloy:/etc/alloy/config.alloy
depends_on:
prometheus:
condition: service_started
expose:
- "4317"
ports:
- "12345:12345"
Update the expose and ports sections to the following code:
ports:
- "12345:12345"
- "4317:4317"
This allows other Actian Monitor containers to access alloy’s 4317 port. After saving the file, start the instance docker compose stack and verify that it operates normally.
4. For each additional instance, edit the docker-compose.yaml file in the installed instance directory.
a. Remove the entire alloy, prometheus, and grafana service definitions.
b. If all Actian Monitor instances run on the same machine, remove the ports section from the actianmonitor service:
ports:
- "43034:43034"
- "32226:32226"
c. Change the container names to include the instance ID or some other unique identifier:
container_name: actianmonitorI2
container_name: otel-agentI2
d. Remove the alloy condition from the otel-agent service:
alloy:
condition: service_started
The following is the updated file format:
actianmonitor:
image: actian/actianmonitor:1.1.0-SNAPSHOT
container_name: actianmonitorI2
restart: unless-stopped
volumes:
- ./config/actianmonitor.yaml:/home/actian/actianmonitor.yaml
- ./config/actianmonitor-logback.xml:/home/actian/logback.xml
- ./logs:/home/actian/logs
- ./ssh:/home/actian/ssh
#- ./config/actianmonitor-custom-metrics.yaml:/home/actian/custom-metrics.yaml
healthcheck:
test: curl --fail http://actianmonitor:43034/v1/version || exit 1
interval: 60s
timeout: 30s
retries: 20
start_period: 60s
environment:
MONITOR_OPTS: ""
 
otel-agent:
image: actian/otel-agent:1.1.0-SNAPSHOT
container_name: otel-agentI2
restart: unless-stopped
volumes:
- ./config/otelagent.yaml:/home/actian/OTELAgent.yaml
- ./config/otelagent-log4j.xml:/home/actian/log4j2.xml
- ./logs:/home/actian/logs
depends_on:
actianmonitor:
condition: service_healthy
5. For each additional instance (that is, all instances except the instance created in step 1), edit config/otelagent.yaml and make the following changes:
a. Change the otel endpoint from http://alloy:4317 to http://<machine name or IP>:4317. Do not use localhost or 127.0.0.1. For example,
otel:
endpoint: "http://192.168.0.3:4317"
b. Change the ema endpoint from http://actianmonitor:43034/v1 to the container name as per Step 4c:
ema:
endpoint: "http://actianmonitorI2:43034/v1"
6. Start the additional instance normally with “docker compose up -d” or “podman compose up -d”. Only the actianmonitor and otel-agent are started. Their metrics appear on the shared Grafana dashboard, distinguished by instance ID or tenant label.
Configuration-Specific Considerations
Co-resident monitoring (monitor next to each database) or dedicated monitoring machine (monitor instances not on any database host): Follow the procedure described in Configure a Shared Monitoring Stack for Additional Database Instances. For the hostname or IP address in step 5, specify the hostname or IP address of the machine running the shared full stack from step 1. If the instances are on different machines, ensure that the firewall allows connections to the published Prometheus port, 9090.
Multiple Monitor instances on the same machine: Follow the procedure described in Configure a Shared Monitoring Stack for Additional Database Instances. For the hostname or IP address in step 5, specify the hostname or IP address of the machine running the shared full stack from step 1. Do not use localhost, because it refers to the additional instance’s container rather than the host machine.
Assign unique host ports to each additional instance in its docker-compose.yaml. Change only the host port, which is the first number in each port mapping. Leave the container port unchanged. Assign unique host ports for the actianmonitor ports (43034 and 32226 by default) and the alloy port (12345 by default). The otel-agent service does not require a published port. Keep ports 3000 and 9090 reserved for Grafana and Prometheus in the shared full-stack installation. Do not start a second unmodified full stack on the same machine. See the warning in Prerequisites.
Hybrid deployment: Apply these steps to each additional instance, regardless of where its DBMS or the shared monitoring stack is installed. In step 5, specify the address of the shared Prometheus server. If multiple instances run on the same machine, assign unique host ports to each instance.
 
Last modified date: 09/11/2026