]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd: add systemd unit file for ceph-exporter 55409/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>
Wed, 6 Mar 2024 07:24:15 +0000 (07:24 +0000)
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
ceph.spec.in
debian/ceph-exporter.install
systemd/CMakeLists.txt
systemd/ceph-exporter.service.in [new file with mode: 0644]

index 58ccf067997a771c504faaf4084d5292c25bf8c7..ff2bb741c6d265bf04ab280eadca235ec72a3677 100644 (file)
@@ -2052,6 +2052,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