]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: package prometheus default alerts for SUSE 27998/head
authorJan Fajerski <jfajerski@suse.com>
Tue, 7 May 2019 10:24:14 +0000 (12:24 +0200)
committerNathan Cutler <ncutler@suse.com>
Mon, 20 May 2019 10:29:50 +0000 (12:29 +0200)
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit c3ead45d1bcce16fb3f9439a66828e6004154504)

ceph.spec.in

index bcce15a7b507b150f2afd37b10c09829172a57d5..3bb43489d891b540cc4c2ea5efec4f43e309a67a 100644 (file)
@@ -245,6 +245,8 @@ BuildRequires:      python%{_python_buildid}-PrettyTable
 BuildRequires: python%{_python_buildid}-Sphinx
 BuildRequires:  rdma-core-devel
 BuildRequires: liblz4-devel >= 1.7
+# for prometheus-alerts
+BuildRequires:  golang-github-prometheus-prometheus
 %endif
 %if 0%{?fedora} || 0%{?rhel}
 Requires:      systemd
@@ -1044,6 +1046,15 @@ collecting data from Ceph Manager "prometheus" module and Prometheus
 project "node_exporter" module. The dashboards are designed to be
 integrated with the Ceph Manager Dashboard web UI.
 
+%if 0%{?suse_version}
+%package prometheus-alerts
+Summary:        Prometheus alerts for a Ceph deplyoment
+BuildArch:      noarch
+Group:          System/Monitoring
+%description prometheus-alerts
+This package provides Ceph’s default alerts for Prometheus.
+%endif
+
 #################################################################################
 # common
 #################################################################################
@@ -1231,6 +1242,8 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
 %if 0%{?suse_version}
 # create __pycache__ directories and their contents
 %py3_compile %{buildroot}%{python3_sitelib}
+# prometheus alerts
+install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
 %endif
 %if 0%{?rhel} == 8
 %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}
@@ -2185,5 +2198,12 @@ exit 0
 %doc monitoring/grafana/dashboards/README
 %doc monitoring/grafana/README.md
 
+%if 0%{?suse_version}
+%files prometheus-alerts
+%dir /etc/prometheus/SUSE/
+%dir /etc/prometheus/SUSE/default_rules/
+%config /etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
+%endif
+
 
 %changelog