unifios-utilities/on-boot-script/examples/udm-files/on_boot.d/50-start-node-exporter.sh
2021-11-16 07:50:21 -08:00

11 lines
357 B
Bash
Executable File

#!/bin/sh
CONTAINER=node-exporter
# Starts a Prometheus node-exporter container that is deleted after it is stopped.
if podman container exists "${CONTAINER}"; then
podman start "${CONTAINER}"
else
podman run -d --rm --name "${CONTAINER}" --net="host" --pid="host" -v "/:/host:ro,rslave" quay.io/prometheus/node-exporter:latest --path.rootfs=/host
fi