diff --git a/ceph.spec.in b/ceph.spec.in index 104f0a2d3a1..461963b71a4 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -2089,6 +2089,7 @@ fi %files -n ceph-exporter %{_bindir}/ceph-exporter +%{_unitdir}/ceph-exporter.service %files -n rbd-fuse %{_bindir}/rbd-fuse diff --git a/debian/ceph-exporter.install b/debian/ceph-exporter.install new file mode 100644 index 00000000000..1ac0edcd2a1 --- /dev/null +++ b/debian/ceph-exporter.install @@ -0,0 +1,2 @@ +lib/systemd/system/ceph-exporter* +usr/bin/ceph-exporter diff --git a/debian/control b/debian/control index 5038dc99e0f..b1910b624d7 100644 --- a/debian/control +++ b/debian/control @@ -355,6 +355,30 @@ Description: debugging symbols for ceph-mgr . This package contains the debugging symbols for ceph-mgr. +Package: ceph-exporter +Architecture: linux-any +Depends: ceph-base (= ${binary:Version}), +Description: metrics exporter for the ceph distributed storage system + Ceph is a massively scalable, open-source, distributed + storage system that runs on commodity hardware and delivers object, + block and file system storage. + . + This package contains the metrics exporter daemon, which is used to expose + the performance metrics. + +Package: ceph-exporter-dbg +Architecture: linux-any +Section: debug +Priority: extra +Depends: ceph-exporter (= ${binary:Version}), + ${misc:Depends}, +Description: debugging symbols for ceph-exporter + Ceph is a massively scalable, open-source, distributed + storage system that runs on commodity hardware and delivers object, + block and file system storage. + . + This package contains the debugging symbols for ceph-exporter. + Package: ceph-mon Architecture: linux-any Depends: ceph-base (= ${binary:Version}), diff --git a/debian/rules b/debian/rules index 442ea28d4e0..3fbed3f3a2e 100755 --- a/debian/rules +++ b/debian/rules @@ -106,6 +106,7 @@ override_dh_strip: dh_strip -pceph-mds --dbg-package=ceph-mds-dbg dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg dh_strip -pceph-mgr --dbg-package=ceph-mgr-dbg + dh_strip -pceph-exporter --dbg-package=ceph-exporter-dbg dh_strip -pceph-mon --dbg-package=ceph-mon-dbg dh_strip -pceph-osd --dbg-package=ceph-osd-dbg dh_strip -pceph-base --dbg-package=ceph-base-dbg diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt index ad75ce61cd8..366bab4195d 100644 --- a/systemd/CMakeLists.txt +++ b/systemd/CMakeLists.txt @@ -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 index 00000000000..f4f6d05c4b4 --- /dev/null +++ b/systemd/ceph-exporter.service.in @@ -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