]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd: add systemd unit file for ceph-exporter 62270/head
authorShinya Hayashi <shinya-hayashi@cybozu.co.jp>
Mon, 5 Feb 2024 04:16:26 +0000 (04:16 +0000)
committerShinya Hayashi <shinya-hayashi@cybozu.co.jp>
Fri, 14 Mar 2025 01:40:37 +0000 (01:40 +0000)
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
(cherry picked from commit 32cbe079c60031f67ee91e2f74f39244a027eba6)

ceph.spec.in
debian/ceph-exporter.install
systemd/CMakeLists.txt
systemd/ceph-exporter.service.in [new file with mode: 0644]

index 4af3f04b39830ffb5d8e45c0247ce04d83343651..7afe28690bbe713927ad95f1c41fcf255af9c0a8 100644 (file)
@@ -2090,6 +2090,7 @@ fi
 
 %files -n ceph-exporter
 %{_bindir}/ceph-exporter
+%{_unitdir}/ceph-exporter.service
 
 %files -n rbd-fuse
 %{_bindir}/rbd-fuse
index 618cf9eadcc1e63d975eceb325dc79295b8a4f03..1ac0edcd2a18c5e43c47aa0f7afcf46d24b52cce 100644 (file)
@@ -1 +1,2 @@
+lib/systemd/system/ceph-exporter*
 usr/bin/ceph-exporter
index ad75ce61cd8d9239e843e8dc086925d93508e44b..366bab4195df831976198c6c577c47288ff9f7f2 100644 (file)
@@ -14,6 +14,7 @@ set(CEPH_SYSTEMD_ENV_DIR "/etc/sysconfig"
 set(SYSTEMD_ENV_FILE "${CEPH_SYSTEMD_ENV_DIR}/ceph")
 foreach(service
     ceph-crash
+    ceph-exporter
     ceph-fuse@
     ceph-mds@
     ceph-mgr@
diff --git a/systemd/ceph-exporter.service.in b/systemd/ceph-exporter.service.in
new file mode 100644 (file)
index 0000000..f4f6d05
--- /dev/null
@@ -0,0 +1,29 @@
+[Unit]
+Description=Ceph cluster exporter daemon
+PartOf=ceph.target
+After=network-online.target local-fs.target
+Before=ceph.target
+Wants=network-online.target local-fs.target ceph.target ceph-mon.target
+
+[Service]
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStart=/usr/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph
+LockPersonality=true
+NoNewPrivileges=true
+PrivateDevices=yes
+PrivateTmp=true
+ProtectControlGroups=true
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelLogs=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectSystem=full
+Restart=on-failure
+RestartSec=10
+RestrictSUIDSGID=true
+StartLimitBurst=3
+StartLimitInterval=30min
+
+[Install]
+WantedBy=multi-user.target ceph.target