From f1b516d1bf44f2236c22d5a36f0363f4768e4a6b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 20 Mar 2020 10:15:54 -0500 Subject: [PATCH] ceph.spec: put prometheus alerts in vendor-neutral location Signed-off-by: Sage Weil --- ceph.spec.in | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 9cb04a79a679d..c91472d4b1e55 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -531,6 +531,7 @@ Group: System/Filesystems %endif Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-prometheus-alerts = %{_epoch_prefix}%{version}-%{release} %if 0%{?fedora} || 0%{?rhel} Requires: python%{python3_pkgversion}-cherrypy Requires: python%{python3_pkgversion}-jwt @@ -1117,14 +1118,12 @@ 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 @@ -1332,11 +1331,12 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror +# prometheus alerts +install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/ceph/ceph_default_alerts.yml + %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 # hardlink duplicate files under /usr to save space %fdupes %{buildroot}%{_prefix} %endif @@ -2343,20 +2343,17 @@ exit 0 %if 0%{?suse_version} %attr(0755,root,root) %dir %{_sysconfdir}/grafana %attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards -%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard -%else -%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard %endif +%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard %config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/* %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 +%if 0%{?suse_version} +%attr(0755,root,root) %dir %{_sysconfdir}/prometheus %endif - +%attr(0755,root,root) %dir %{_sysconfdir}/prometheus/ceph +%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml %changelog -- 2.39.5