Browse Source

修改insert、query的配置和相关脚本

sensordb2 1 year ago
parent
commit
4f652062e0

+ 6 - 1
conf/application-insert.yml

@@ -23,4 +23,9 @@ logging:
     name: logs/insert-server.log  # 日志文件绝对路径及名称
   level:
     root: info #日志级别 root表示所有包,也可以单独配置具体包 fatal>error>warn>info>debug>trace>off
-    db: info
+    db: info
+
+server:
+  port: 8088
+  servlet:
+    context-path: /api/v1

+ 1 - 1
conf/application-query.yml

@@ -12,4 +12,4 @@ ip:
   broadcast: 192.168.66.255
 
 server:
-  port: 8080
+  port: 8089

+ 7 - 0
shell/manage/common.sh

@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+#HOST=127.0.0.1
+HOST=39.104.63.130
+PORT=8088
+
+echo host:$host port:$PORT

+ 3 - 2
shell/manage/disableLogStatistic.sh

@@ -1,7 +1,8 @@
 #!/bin/bash
 
-HOST=127.0.0.1
-PORT=8081
+ROOT=$(cd `dirname $0`/../../; pwd)
+source $ROOT/shell/manage/common.sh
+
 echo start to disable log statistic
 #curl http://$HOST:$PORT/api/v1/manage/logShowStatistic?mode=enable
 curl http://$HOST:$PORT/api/v1/manage/logShowStatistic?mode=disable

+ 3 - 2
shell/manage/enableLogStatistic.sh

@@ -1,7 +1,8 @@
 #!/bin/bash
 
-HOST=127.0.0.1
-PORT=8081
+ROOT=$(cd `dirname $0`/../../; pwd)
+source $ROOT/shell/manage/common.sh
+
 echo start to enable log statistic
 curl http://$HOST:$PORT/api/v1/manage/logShowStatistic?mode=enable
 #curl http://$HOST:$PORT/api/v1/manage/logShowStatistic?mode=disable

+ 3 - 2
shell/manage/probe.sh

@@ -1,7 +1,8 @@
 #!/bin/bash
 
-HOST=127.0.0.1
-PORT=8081
+ROOT=$(cd `dirname $0`/../../; pwd)
+source $ROOT/shell/manage/common.sh
+
 echo start to probe
 curl http://$HOST:$PORT/api/v1/manage/probe
 echo "end"

+ 3 - 1
shell/manage/scan.sh

@@ -1,6 +1,8 @@
 #!/bin/bash
 
-HOST=127.0.0.1
+ROOT=$(cd `dirname $0`/../../; pwd)
+source $ROOT/shell/manage/common.sh
+
 PORT=8081
 echo start to scan
 curl http://$HOST:$PORT/api/v1/manage/scan

+ 3 - 2
shell/manage/statistic.sh

@@ -1,7 +1,8 @@
 #!/bin/bash
 
-HOST=127.0.0.1
-PORT=8081
+ROOT=$(cd `dirname $0`/../../; pwd)
+source $ROOT/shell/manage/common.sh
+
 echo start to query insert statistic
 curl http://$HOST:$PORT/api/v1/manage/statistic
 echo "end"

+ 4 - 3
shell/manage/unlisten.sh

@@ -1,7 +1,8 @@
 #!/bin/bash
 
-HOST=127.0.0.1
-PORT=8081
+ROOT=$(cd `dirname $0`/../../; pwd)
+source $ROOT/shell/manage/common.sh
+
 echo start to unlisten
-curl http://$HOST:$PORT/manage/api/v1/unlisten?probeIP=192.168.66.10
+curl http://$HOST:$PORT/api/v1/manage/api/v1/unlisten?probeIP=192.168.66.10
 echo "end"