smallchill 5 лет назад
Родитель
Сommit
6ba2e472dc

+ 3 - 3
blade-ops/blade-swagger/src/main/resources/application-prod.yml

@@ -2,11 +2,11 @@ knife4j:
   cloud:
     routes:
       - name: 授权模块
-        uri: 192.168.0.157
+        uri: 192.168.0.157:88
         location: /blade-auth/v2/api-docs
       - name: 工作台模块
-        uri: 192.168.0.157
+        uri: 192.168.0.157:88
         location: /blade-desk/v2/api-docs
       - name: 系统模块
-        uri: 192.168.0.157
+        uri: 192.168.0.157:88
         location: /blade-system/v2/api-docs

+ 3 - 3
blade-ops/blade-swagger/src/main/resources/application-test.yml

@@ -2,11 +2,11 @@ knife4j:
   cloud:
     routes:
       - name: 授权模块
-        uri: 192.168.0.157
+        uri: 192.168.0.157:88
         location: /blade-auth/v2/api-docs
       - name: 工作台模块
-        uri: 192.168.0.157
+        uri: 192.168.0.157:88
         location: /blade-desk/v2/api-docs
       - name: 系统模块
-        uri: 192.168.0.157
+        uri: 192.168.0.157:88
         location: /blade-system/v2/api-docs

+ 10 - 3
script/docker/app/deploy.sh

@@ -1,7 +1,7 @@
 
 #使用说明,用来提示输入参数
 usage() {
-	echo "Usage: sh 执行脚本.sh [port|mount|base|modules|monitor|stop|rm|rmiNoneTag]"
+	echo "Usage: sh 执行脚本.sh [port|mount|base|monitor|modules|prometheus|stop|rm|rmiNoneTag]"
 	exit 1
 }
 
@@ -39,6 +39,7 @@ port(){
 
 ##放置挂载文件
 mount(){
+	#挂载配置文件
 	if test ! -f "/docker/nginx/api/nginx.conf" ;then
 		mkdir -p /docker/nginx/api
 		cp nginx/api/nginx.conf /docker/nginx/api/nginx.conf
@@ -60,6 +61,9 @@ mount(){
 		mkdir -p /docker/grafana
 		cp prometheus/config/grafana.ini /docker/grafana/grafana.ini
 	fi
+	#增加目录权限
+	chmod -R 777 /docker/prometheus
+	chmod -R 777 /docker/grafana
 }
 
 #启动基础模块
@@ -108,11 +112,14 @@ case "$1" in
 "base")
 	base
 ;;
+"monitor")
+	monitor
+;;
 "modules")
 	modules
 ;;
-"monitor")
-	monitor
+"prometheus")
+	prometheus
 ;;
 "stop")
 	stop

+ 2 - 2
script/docker/app/docker-compose.yml

@@ -273,7 +273,7 @@ services:
     restart: always
     networks:
       blade_net:
-        ipv4_address: 172.30.0.91
+        ipv4_address: 172.30.0.93
 
   mysqld-exporter:
     image: prom/mysqld-exporter:v0.12.1
@@ -308,7 +308,7 @@ services:
       - /sys:/sys:ro
       - /var/lib/docker/:/var/lib/docker:ro
       - /dev/disk/:/dev/disk:ro
-    command: "--detach=true"
+    command: "detach=true"
     privileged: true
     restart: always
     networks:

+ 2 - 2
script/docker/app/nginx/web/nginx.conf

@@ -33,7 +33,6 @@ http {
     upstream gateway {
                  server 172.30.0.81;
                  server 172.30.0.82;
-                 server 172.30.0.83;
              }
 
 
@@ -43,7 +42,8 @@ http {
       root         /usr/share/nginx/html;
 
       location / {
-
+           root   html;
+           index  index.html;
       }
 
       location ^~ /oauth/redirect {

+ 2 - 2
script/docker/app/prometheus/config/prometheus.yml

@@ -26,7 +26,7 @@ scrape_configs:
   # 监控 linux
   - job_name: linux
     static_configs:
-      - targets: ['172.30.0.91:9100'] #填写node-exporter的docker服务ip:端口或者宿主机ip:映射的端口
+      - targets: ['172.30.0.93:9100'] #填写node-exporter的docker服务ip:端口或者宿主机ip:映射的端口
         labels:
           instance: localhost #实例名称或ip
   # 监控 mysql
@@ -38,7 +38,7 @@ scrape_configs:
   # 监控 cadvisor
   - job_name: "docker"
     static_configs:
-      - targets: ['172.30.0.180:18080'] #填写cadvisor服务ip:端口
+      - targets: ['172.30.0.180:8080'] #填写cadvisor服务ip:端口
   # 监控 nacos
   - job_name: "nacos"
     metrics_path: '/nacos/actuator/prometheus'

+ 1 - 1
script/docker/app/prometheus/dashboard/bladex-linux.json

@@ -3835,7 +3835,7 @@
     ]
   },
   "timezone": "browser",
-  "title": "BladeX监控大屏-服务器",
+  "title": "BladeX监控大屏-Linux",
   "uid": "bladex-linux",
   "version": 1
 }