forked from yindun/ansible-devops
更新 scripts/node-exporter.sh
This commit is contained in:
parent
59170b15c6
commit
bae2ac116b
|
|
@ -219,7 +219,7 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=$APP_USER
|
User=$APP_USER
|
||||||
ExecStart=$BINARY_DIR/${APP_NAME} --web.listen-address=$WEB_LISTEN_ADDRESS
|
ExecStart=$BINARY_DIR/${APP_NAME} --collector.textfile.directory=/var/lib/node_exporter/textfile_collector --web.listen-address=$WEB_LISTEN_ADDRESS
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
@ -227,6 +227,8 @@ WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# 启动服务
|
# 启动服务
|
||||||
|
run_cmd "mkdir -p /var/lib/node_exporter/textfile_collector" "开启textfile扩展"
|
||||||
|
run_cmd "chmod -R 755 /var/lib/node_exporter/textfile_collector"
|
||||||
run_cmd "systemctl daemon-reload" "重新加载systemd配置"
|
run_cmd "systemctl daemon-reload" "重新加载systemd配置"
|
||||||
run_cmd "systemctl enable ${APP_NAME}.service" "启用服务"
|
run_cmd "systemctl enable ${APP_NAME}.service" "启用服务"
|
||||||
run_cmd "systemctl restart ${APP_NAME}.service" "启动服务"
|
run_cmd "systemctl restart ${APP_NAME}.service" "启动服务"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue