monitoring-lite/monitoring/node-exporter-entrypoint.sh
decentral1se 4b2b931eb8
init
2022-03-17 11:15:51 +01:00

10 lines
274 B
Bash

#!/bin/sh -e
NODE_NAME=$(cat /etc/nodename)
mkdir -p /etc/node-exporter
echo "node_meta{node_id=\"$NODE_ID\", container_label_com_docker_swarm_node_id=\"$NODE_ID\", node_name=\"$NODE_NAME\"} 1" > /etc/node-exporter/node-meta.prom
set -- /bin/node_exporter "$@"
exec "$@"