Skip to content

Commit cb4ac19

Browse files
authored
Merge pull request #3062 from icey-yu/fix-pro
Fix: prometheus config
2 parents 28f00a8 + 3fec3b4 commit cb4ac19

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

config/prometheus.yml

+27-27
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ global:
88
alerting:
99
alertmanagers:
1010
- static_configs:
11-
- targets: [internal_ip:19093]
11+
- targets: [127.0.0.1:19093]
1212

1313
# Load rules once and periodically evaluate them according to the global evaluation_interval.
1414
rule_files:
@@ -25,95 +25,95 @@ scrape_configs:
2525
# prometheus fetches application services
2626
- job_name: node_exporter
2727
static_configs:
28-
- targets: [ internal_ip:20500 ]
28+
- targets: [ 127.0.0.1:19100 ]
2929

3030
- job_name: openimserver-openim-api
3131
http_sd_configs:
32-
- url: "http://internal_ip:10002/prometheus_discovery/api"
32+
- url: "http://127.0.0.1:10002/prometheus_discovery/api"
3333
# static_configs:
34-
# - targets: [ internal_ip:12002 ]
34+
# - targets: [ 127.0.0.1:12002 ]
3535
# labels:
3636
# namespace: default
3737

3838
- job_name: openimserver-openim-msggateway
3939
http_sd_configs:
40-
- url: "http://internal_ip:10002/prometheus_discovery/msg_gateway"
40+
- url: "http://127.0.0.1:10002/prometheus_discovery/msg_gateway"
4141
# static_configs:
42-
# - targets: [ internal_ip:12140 ]
43-
# # - targets: [ internal_ip:12140, internal_ip:12141, internal_ip:12142, internal_ip:12143, internal_ip:12144, internal_ip:12145, internal_ip:12146, internal_ip:12147, internal_ip:12148, internal_ip:12149, internal_ip:12150, internal_ip:12151, internal_ip:12152, internal_ip:12153, internal_ip:12154, internal_ip:12155 ]
42+
# - targets: [ 127.0.0.1:12140 ]
43+
# # - targets: [ 127.0.0.1:12140, 127.0.0.1:12141, 127.0.0.1:12142, 127.0.0.1:12143, 127.0.0.1:12144, 127.0.0.1:12145, 127.0.0.1:12146, 127.0.0.1:12147, 127.0.0.1:12148, 127.0.0.1:12149, 127.0.0.1:12150, 127.0.0.1:12151, 127.0.0.1:12152, 127.0.0.1:12153, 127.0.0.1:12154, 127.0.0.1:12155 ]
4444
# labels:
4545
# namespace: default
4646

4747
- job_name: openimserver-openim-msgtransfer
4848
http_sd_configs:
49-
- url: "http://internal_ip:10002/prometheus_discovery/msg_transfer"
49+
- url: "http://127.0.0.1:10002/prometheus_discovery/msg_transfer"
5050
# static_configs:
51-
# - targets: [ internal_ip:12020, internal_ip:12021, internal_ip:12022, internal_ip:12023, internal_ip:12024, internal_ip:12025, internal_ip:12026, internal_ip:12027 ]
52-
# # - targets: [ internal_ip:12020, internal_ip:12021, internal_ip:12022, internal_ip:12023, internal_ip:12024, internal_ip:12025, internal_ip:12026, internal_ip:12027, internal_ip:12028, internal_ip:12029, internal_ip:12030, internal_ip:12031, internal_ip:12032, internal_ip:12033, internal_ip:12034, internal_ip:12035 ]
51+
# - targets: [ 127.0.0.1:12020, 127.0.0.1:12021, 127.0.0.1:12022, 127.0.0.1:12023, 127.0.0.1:12024, 127.0.0.1:12025, 127.0.0.1:12026, 127.0.0.1:12027 ]
52+
# # - targets: [ 127.0.0.1:12020, 127.0.0.1:12021, 127.0.0.1:12022, 127.0.0.1:12023, 127.0.0.1:12024, 127.0.0.1:12025, 127.0.0.1:12026, 127.0.0.1:12027, 127.0.0.1:12028, 127.0.0.1:12029, 127.0.0.1:12030, 127.0.0.1:12031, 127.0.0.1:12032, 127.0.0.1:12033, 127.0.0.1:12034, 127.0.0.1:12035 ]
5353
# labels:
5454
# namespace: default
5555

5656
- job_name: openimserver-openim-push
5757
http_sd_configs:
58-
- url: "http://internal_ip:10002/prometheus_discovery/push"
58+
- url: "http://127.0.0.1:10002/prometheus_discovery/push"
5959
# static_configs:
60-
# - targets: [ internal_ip:12170, internal_ip:12171, internal_ip:12172, internal_ip:12173, internal_ip:12174, internal_ip:12175, internal_ip:12176, internal_ip:12177 ]
61-
## - targets: [ internal_ip:12170, internal_ip:12171, internal_ip:12172, internal_ip:12173, internal_ip:12174, internal_ip:12175, internal_ip:12176, internal_ip:12177, internal_ip:12178, internal_ip:12179, internal_ip:12180, internal_ip:12182, internal_ip:12183, internal_ip:12184, internal_ip:12185, internal_ip:12186 ]
60+
# - targets: [ 127.0.0.1:12170, 127.0.0.1:12171, 127.0.0.1:12172, 127.0.0.1:12173, 127.0.0.1:12174, 127.0.0.1:12175, 127.0.0.1:12176, 127.0.0.1:12177 ]
61+
## - targets: [ 127.0.0.1:12170, 127.0.0.1:12171, 127.0.0.1:12172, 127.0.0.1:12173, 127.0.0.1:12174, 127.0.0.1:12175, 127.0.0.1:12176, 127.0.0.1:12177, 127.0.0.1:12178, 127.0.0.1:12179, 127.0.0.1:12180, 127.0.0.1:12182, 127.0.0.1:12183, 127.0.0.1:12184, 127.0.0.1:12185, 127.0.0.1:12186 ]
6262
# labels:
6363
# namespace: default
6464

6565
- job_name: openimserver-openim-rpc-auth
6666
http_sd_configs:
67-
- url: "http://internal_ip:10002/prometheus_discovery/auth"
67+
- url: "http://127.0.0.1:10002/prometheus_discovery/auth"
6868
# static_configs:
69-
# - targets: [ internal_ip:12200 ]
69+
# - targets: [ 127.0.0.1:12200 ]
7070
# labels:
7171
# namespace: default
7272

7373
- job_name: openimserver-openim-rpc-conversation
7474
http_sd_configs:
75-
- url: "http://internal_ip:10002/prometheus_discovery/conversation"
75+
- url: "http://127.0.0.1:10002/prometheus_discovery/conversation"
7676
# static_configs:
77-
# - targets: [ internal_ip:12220 ]
77+
# - targets: [ 127.0.0.1:12220 ]
7878
# labels:
7979
# namespace: default
8080

8181
- job_name: openimserver-openim-rpc-friend
8282
http_sd_configs:
83-
- url: "http://internal_ip:10002/prometheus_discovery/friend"
83+
- url: "http://127.0.0.1:10002/prometheus_discovery/friend"
8484
# static_configs:
85-
# - targets: [ internal_ip:12240 ]
85+
# - targets: [ 127.0.0.1:12240 ]
8686
# labels:
8787
# namespace: default
8888

8989
- job_name: openimserver-openim-rpc-group
9090
http_sd_configs:
91-
- url: "http://internal_ip:10002/prometheus_discovery/group"
91+
- url: "http://127.0.0.1:10002/prometheus_discovery/group"
9292
# static_configs:
93-
# - targets: [ internal_ip:12260 ]
93+
# - targets: [ 127.0.0.1:12260 ]
9494
# labels:
9595
# namespace: default.
9696

9797
- job_name: openimserver-openim-rpc-msg
9898
http_sd_configs:
99-
- url: "http://internal_ip:10002/prometheus_discovery/msg"
99+
- url: "http://127.0.0.1:10002/prometheus_discovery/msg"
100100
# static_configs:
101-
# - targets: [ internal_ip:12280 ]
101+
# - targets: [ 127.0.0.1:12280 ]
102102
# labels:
103103
# namespace: default
104104

105105
- job_name: openimserver-openim-rpc-third
106106
http_sd_configs:
107-
- url: "http://internal_ip:10002/prometheus_discovery/third"
107+
- url: "http://127.0.0.1:10002/prometheus_discovery/third"
108108
# static_configs:
109-
# - targets: [ internal_ip:12300 ]
109+
# - targets: [ 127.0.0.1:12300 ]
110110
# labels:
111111
# namespace: default
112112

113113
- job_name: openimserver-openim-rpc-user
114114
http_sd_configs:
115-
- url: "http://internal_ip:10002/prometheus_discovery/user"
115+
- url: "http://127.0.0.1:10002/prometheus_discovery/user"
116116
# static_configs:
117-
# - targets: [ internal_ip:12320 ]
117+
# - targets: [ 127.0.0.1:12320 ]
118118
# labels:
119119
# namespace: default

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,5 @@ services:
209209
- '--path.procfs=/host/proc'
210210
- '--path.sysfs=/host/sys'
211211
- '--path.rootfs=/rootfs'
212-
- '--web.listen-address=:{NODE_EXPORTER_PORT}'
212+
- '--web.listen-address=:${NODE_EXPORTER_PORT}'
213213
network_mode: host

0 commit comments

Comments
 (0)