File golang-github-digitalocean-ceph_exporter.spec of Package golang-github-digitalocean-ceph_exporter

# spec file for package golang-github-digitalocean-ceph_exporter
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via


Name:           golang-github-digitalocean-ceph_exporter
Version:        1.1.0+git20170923.66a684f
Release:        0
License:        Apache-2.0
Summary:        Prometheus exporter for ceph cluster metrics
Group:          System/Management
Source:         ceph_exporter-%{version}.tar.xz
Source1:        prometheus-ceph_exporter.service
BuildRequires:  fdupes
BuildRequires:  librados-devel
BuildRequires:  librbd-devel
BuildRequires:  golang-packaging
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(pre):  shadow

Prometheus exporter that scrapes meta information about a running
ceph cluster.  All the information gathered from the cluster is done
by interacting with the monitors using an appropriate wrapper over
rados_mon_command(). Hence, no additional setup is necessary other
than having a working ceph cluster.

%setup -q -n ceph_exporter-%{version}


install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/prometheus-ceph_exporter.service
install -Dd -m 0755 %{buildroot}%{_sbindir}
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcprometheus-ceph_exporter
%fdupes %{buildroot}

%service_add_pre prometheus-ceph_exporter.service
#getent group prometheus >/dev/null || %{_sbindir}/groupadd -r prometheus
#getent passwd prometheus >/dev/null || %{_sbindir}/useradd -r -g prometheus -d %{_localstatedir}/lib/prometheus -M -s /sbin/nologin prometheus

%service_add_post prometheus-ceph_exporter.service

%service_del_preun prometheus-ceph_exporter.service

%service_del_postun prometheus-ceph_exporter.service

%files -f file.lst

openSUSE Build Service is sponsored by