This commit is contained in:
dami
2025-08-02 15:08:50 +08:00
parent 4e2b2e1f54
commit e1292620c7
3 changed files with 8 additions and 45 deletions
+3 -43
View File
@@ -9,13 +9,13 @@ clients:
- url: http://127.0.0.1:3100/loki/api/v1/push #修改为loki服务器IP
scrape_configs:
- job_name: fap
- job_name: web
static_configs:
- targets:
- localhost
labels:
job: "HSJ_fap"
__path__: /opt/cwy8.32/product/module/P/FAP/nohup.out
job: "web"
__path__: {$LOG_PATH}/web_nohup.out
- job_name: portal
static_configs:
@@ -24,43 +24,3 @@ scrape_configs:
labels:
job: "HSJ_portal"
__path__: /opt/cwy8.32/product/module/P/PORTAL/nohup.out
- job_name: cwy
static_configs:
- targets:
- localhost
labels:
job: "HSJ_cwy"
__path__: /opt/cwy8.32/product/module/A/CWY/nohup.out
- job_name: fasp_register
static_configs:
- targets:
- localhost
labels:
job: "HSJ_fasp_register"
__path__: /opt/cwy8.32/product/module/A/FASP/register-nohup.out
- job_name: fasp_gateway
static_configs:
- targets:
- localhost
labels:
job: "HSJ_fasp_gateway"
__path__: /opt/cwy8.32/product/module/A/FASP/gateway-nohup.out
- job_name: fasp_base
static_configs:
- targets:
- localhost
labels:
job: "HSJ_fasp_base"
__path__: /opt/cwy8.32/product/module/A/FASP/base-nohup.out
- job_name: fasp_web
static_configs:
- targets:
- localhost
labels:
job: "HSJ_fasp_web"
__path__: /opt/cwy8.32/product/module/A/FASP/web-nohup.out
+2
View File
@@ -106,6 +106,8 @@ def contentReplace(content):
service_path = mw.getServerDir()
content = content.replace('{$ROOT_PATH}', mw.getFatherDir())
content = content.replace('{$SERVER_PATH}', service_path)
content = content.replace('{$APP_PATH}', service_path+"/loki")
content = content.replace('{$LOG_PATH}', service_path+"/loki/logs")
return content
+3 -2
View File
@@ -36,6 +36,7 @@ Install_App()
mkdir -p ${SourceDir}
mkdir -p ${InstallDir}
mkdir -p ${InstallDir}/bin
mkdir -p ${InstallDir}/logs
mkdir -p ${InstallDir}/data/{chunks,rules,boltdb-shipper-active,boltdb-shipper-cache}
if [ ! -f ${SourceDir}/${FILE_TGZ} ];then
@@ -72,8 +73,8 @@ Uninstall_App()
# MemoryLimit=1G
# CPUQuota=200%
# curl -v -H "Content-Type: application/json" -XPOST "http://localhost:3100/loki/api/v1/push" \
# -d "{\"streams\": [{\"stream\": {\"test\": \"test\"}, \"values\": [[\"$timestamp\", \"test message\"]]}]}"
curl -v -H "Content-Type: application/json" -XPOST "http://localhost:3100/loki/api/v1/push" \
-d "{\"streams\": [{\"stream\": {\"test\": \"test\"}, \"values\": [[\"$timestamp\", \"test message\"]]}]}"
action=${1}
if [ "${1}" == 'install' ];then