]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd: add systemd unit file for ceph-exporter
authorShinya Hayashi <shinya-hayashi@cybozu.co.jp>
Mon, 5 Feb 2024 04:16:26 +0000 (04:16 +0000)
committerYuri Weinstein <yweinste@redhat.com>
Tue, 23 Apr 2024 18:53:57 +0000 (18:53 +0000)
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
(cherry picked from commit 32cbe079c60031f67ee91e2f74f39244a027eba6)
(cherry picked from commit 5f7da9d127c6179b7db0b62e82cae46f137129bc)

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

index 758f04682000beabb702dda386a51b9df5ffef01..f073a9c2895179d9fff59da76514f4bb6f9e3203 100644 (file)
@@ -2042,6 +2042,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