add container number to node exporter
This commit is contained in:
1 parent
3514f3e489
commit
1d2c57dc02
1 file changed
+3
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
OUT=/docker/monitoring/node_exporter/textfile_collector/custom.prom
|
||||
TS=$(date +%s%3N)
|
||||
|
||||
DOCKER_CONTAINER_NUM=44
|
||||
{
|
||||
# Docker container states
|
||||
docker ps -a --format '{{.Names}}' | while read -r name; do
|
||||
@@ -13,6 +13,8 @@ TS=$(date +%s%3N)
|
||||
fi
|
||||
done
|
||||
|
||||
echo docker_container_number $DOCKER_CONTAINER_NUM
|
||||
|
||||
# Public IP information
|
||||
IP_JSON=$(curl -fsSL http://ip-api.com/json)
|
||||
|
||||
|
||||
Reference in new issue
Block a user