Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add node_exporter in docker-compose #2979

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ETCD_IMAGE=quay.io/coreos/etcd:v3.5.13
PROMETHEUS_IMAGE=prom/prometheus:v2.45.6
ALERTMANAGER_IMAGE=prom/alertmanager:v0.27.0
GRAFANA_IMAGE=grafana/grafana:11.0.1
NODE_EXPORTER_IMAGE=prom/node-exporter:v1.7.0

OPENIM_WEB_FRONT_IMAGE=openim/openim-web-front:release-v3.8.1
OPENIM_ADMIN_FRONT_IMAGE=openim/openim-admin-front:release-v1.8.3
Expand Down
2 changes: 1 addition & 1 deletion config/openim-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ prometheus:
autoSetPorts: true
# Prometheus listening ports, must match the number of api.ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 12002 ]
ports:
# This address can be accessed via a browser
grafanaURL:
5 changes: 2 additions & 3 deletions config/openim-msggateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10140, 10141, 10142, 10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155 ]
ports:

prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154, 12155 ]

ports:
# IP address that the RPC/WebSocket service listens on; setting to 0.0.0.0 listens on both internal and external IPs. If left blank, it automatically uses the internal network IP
listenIP: 0.0.0.0

Expand Down
2 changes: 1 addition & 1 deletion config/openim-msgtransfer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ prometheus:
autoSetPorts: true
# List of ports that Prometheus listens on; each port corresponds to an instance of monitoring. Ensure these are managed accordingly
# It will only take effect when autoSetPorts is set to false.
ports: [ 12020, 12021, 12022, 12023, 12024, 12025, 12026, 12027, 12028, 12029, 12030, 12031, 12032, 12033, 12034, 12035 ]
ports:
4 changes: 2 additions & 2 deletions config/openim-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182, 10183, 10184, 10185 ]
ports:


prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12170, 12171, 12172, 12173, 12174, 12175, 12176, 12177, 12178, 12179, 12180, 12182, 12183, 12184, 12185, 12186 ]
ports:

maxConcurrentWorkers: 3
#Use geTui for offline push notifications, or choose fcm or jpns; corresponding configuration settings must be specified.
Expand Down
4 changes: 2 additions & 2 deletions config/openim-rpc-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10200 ]
ports:

prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12200 ]
ports:

tokenPolicy:
# Token validity period, in days
Expand Down
4 changes: 2 additions & 2 deletions config/openim-rpc-conversation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10220 ]
ports:

prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12220 ]
ports:
4 changes: 2 additions & 2 deletions config/openim-rpc-friend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10240 ]
ports:

prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12240 ]
ports:
4 changes: 2 additions & 2 deletions config/openim-rpc-group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10260 ]
ports:

prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12260 ]
ports:


enableHistoryForNewMembers: true
4 changes: 2 additions & 2 deletions config/openim-rpc-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10280 ]
ports:

prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12280 ]
ports:


# Does sending messages require friend verification
Expand Down
4 changes: 2 additions & 2 deletions config/openim-rpc-third.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10300 ]
ports:

prometheus:
# Enable or disable Prometheus monitoring
enable: true
# List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup
# It will only take effect when autoSetPorts is set to false.
ports: [ 12300 ]
ports:


object:
Expand Down
4 changes: 2 additions & 2 deletions config/openim-rpc-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ rpc:
autoSetPorts: true
# List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 10320 ]
ports:

prometheus:
# Whether to enable prometheus
enable: true
# Prometheus listening ports, must be consistent with the number of rpc.ports
# It will only take effect when autoSetPorts is set to false.
ports: [ 12320 ]
ports:
2 changes: 1 addition & 1 deletion config/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ scrape_configs:
# prometheus fetches application services
- job_name: node_exporter
static_configs:
- targets: [ 127.0.0.1:20500 ]
- targets: [ 127.0.0.1:19100 ]

- job_name: openimserver-openim-api
http_sd_configs:
Expand Down
1 change: 1 addition & 0 deletions config/share.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ imAdminUserID: [ imAdmin ]
# 1: For Android, iOS, Windows, Mac, and web platforms, only one instance can be online at a time
multiLogin:
policy: 1
# max num of tokens in one end
maxNumOneEnd: 30
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,21 @@ services:
volumes:
- ${DATA_DIR:-./}/components/grafana:/var/lib/grafana
network_mode: host

node-exporter:
image: ${NODE_EXPORTER_IMAGE}
container_name: node-exporter
restart: always
profiles:
- m
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.rootfs=/rootfs'
- '--web.listen-address=:19100'
network_mode: host

Loading