From b28477137c0aacdb8c358a7ced27a4a888c89392 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 11 Feb 2023 21:09:57 +0900 Subject: [PATCH] Deploy `/etc/systemd/system/prometheus.service`. --- .../files/etc/systemd/system/prometheus.service | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cookbooks/prometheus/files/etc/systemd/system/prometheus.service diff --git a/cookbooks/prometheus/files/etc/systemd/system/prometheus.service b/cookbooks/prometheus/files/etc/systemd/system/prometheus.service new file mode 100644 index 0000000..8aa3070 --- /dev/null +++ b/cookbooks/prometheus/files/etc/systemd/system/prometheus.service @@ -0,0 +1,13 @@ +[Unit] +Description=Prometheus Server +Documentation=https://prometheus.io/docs/introduction/overview/ +After=network-online.target + +[Service] +Restart=on-failure +ExecStart=/usr/local/bin/prometheus \ + --config.file=/etc/prometheus.d/prometheus.yml \ + --storage.tsdb.path=/var/opt/prometheus/ + +[Install] +WantedBy=multi-user.target