]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
package SNMP MIB file as an rpm
authorJustin Caratzas <jcaratza@redhat.com>
Thu, 30 Jun 2022 20:18:11 +0000 (16:18 -0400)
committerJustin Caratzas <jcaratza@redhat.com>
Thu, 30 Jun 2022 21:37:03 +0000 (17:37 -0400)
Adds a new subpackage 'ceph-mib' that installs the Ceph MIB file in a
standard location '/usr/share/snmp/CEPH-MIB.txt'. This allows users to
use their own snmp manager in order to receive events from Ceph

Fixes: https://tracker.ceph.com/issues/56433
Signed-off-by: Justin Caratzas <jcaratza@redhat.com>
ceph.spec.in

index af950a92513c62a1c7629b37a30fd6b1c9cd73c8..6b132ec16897d3a602e145e5953043fe68980696 100644 (file)
@@ -1244,6 +1244,13 @@ Group:          System/Monitoring
 %description prometheus-alerts
 This package provides Ceph default alerts for Prometheus.
 
+%package mib
+Summary:        MIB for SNMP alerts
+BuildArch:      noarch
+Group:          System/Monitoring
+%description mib
+This package provides a Ceph MIB for SNMP traps.
+
 #################################################################################
 # common
 #################################################################################
@@ -1483,6 +1490,9 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
 # prometheus alerts
 install -m 644 -D monitoring/ceph-mixin/prometheus_alerts.yml %{buildroot}/etc/prometheus/ceph/ceph_default_alerts.yml
 
+# SNMP MIB
+install -m 644 -D -p monitoring/snmp/CEPH-MIB.txt %{buildroot}/usr/share/snmp/mib
+
 %if 0%{?suse_version}
 # create __pycache__ directories and their contents
 %py3_compile %{buildroot}%{python3_sitelib}
@@ -2562,4 +2572,8 @@ exit 0
 %attr(0755,root,root) %dir %{_sysconfdir}/prometheus/ceph
 %config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
 
+%files mib
+%attr(0755,root,root) %dir %{_datadir}/snmp
+%attr(0655,-,-,) %{_datadir}/snmp/mib
+
 %changelog