From 77912d58352f3f1cb95ad8ddd4bedeed5302f6fe Mon Sep 17 00:00:00 2001 From: xiaoz Date: Wed, 5 Jan 2022 10:58:37 +0800 Subject: [PATCH] fix bug --- node_exporter.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node_exporter.sh b/node_exporter.sh index df13ff0..bfceb77 100644 --- a/node_exporter.sh +++ b/node_exporter.sh @@ -32,7 +32,7 @@ depend(){ then INSTANCE=$(echo $HOSTNAME)_${myip} else - INSTANCE=${HOSTNAME}_${myip} + INSTANCE=${INSTANCE}_${myip} fi } #下载 @@ -101,6 +101,7 @@ install_success(){ echo "----------------------------" #推送数据到普罗米修斯以自动注册 curl -u 'xiaoz:HAKrmCM6' -X POST -d "instance=${INSTANCE}" https://prometheus.rss.ink/api/v1/push_data + echo "\n" echo "Installation is complete, please visit http://${myip}:29100" }