node-exporter/entrypoint.sh

7 lines
251 B
Bash
Raw Normal View History

2022-06-02 15:15:59 -04:00
#!/bin/sh -e
2022-06-02 13:19:11 -04:00
2022-06-02 15:09:23 -04:00
NODE_NAME=$(cat "/host/etc/hostname")
2022-06-02 15:15:59 -04:00
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
2022-06-02 13:19:11 -04:00
set -- /bin/node_exporter "$@"
exec "$@"