]> git.pld-linux.org Git - SPECS.git/blob - nagios-plugin-check_megaraid_sas.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / nagios-plugin-check_megaraid_sas.spec
1 %define         plugin  check_megaraid_sas
2 Summary:        Nagios plugin to check the state of disk and logical drives attached to LSI megaraid SAS controllers
3 Name:           nagios-plugin-%{plugin}
4 # revision from download page
5 Version:        12
6 Release:        5
7 License:        GPL v2
8 Group:          Networking
9 # http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=680&cf_id=24
10 Source0:        check_megaraid_sas
11 Patch0:         bbu.patch
12 Patch1:         check_megaraid_sas-size.patch
13 Patch2:         check_megaraid_sas-JBOD.patch
14 URL:            http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_megaraid_sas/details
15 Requires:       megacli-sas
16 Requires:       nagios-core
17 Requires:       nagios-plugins-libs
18 BuildArch:      noarch
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         plugindir       %{_prefix}/lib/nagios/plugins
22 %define         _sysconfdir     /etc/nagios/plugins
23
24 %description
25 A plugin to check the health and status of disk and logical drives
26 attached to LSI megaraid SAS controllers. This plugin calls LSI's
27 MegaCli utility to determine the health of disks and logical drive
28 units attached to Megraid SAS controllers. It has been tested by the
29 author on Dell PERC 5 & 6 controllers, but should work well with any
30 controller supported by the MegaCli tool.
31
32 %prep
33 %setup -qcT
34
35 install %{SOURCE0} %{plugin}
36 %{__sed} -i -e 's#/usr/sbin/MegaCli#/sbin/MegaCli#g' %{plugin}
37
38 %patch0 -p0
39 %patch1 -p1
40 %patch2 -p1
41
42 cat > nagios.cfg <<'EOF'
43 # Usage:
44 # %{plugin}
45 define command {
46         command_name    %{plugin}
47         command_line    %{plugindir}/%{plugin}
48 }
49
50 define service {
51         use                     generic-service
52         name                    megaraid_sas
53         service_description     megaraid_sas
54         register                0
55
56         normal_check_interval   15
57         notification_interval   300
58
59         check_command           check_megaraid_sas
60 }
61 EOF
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
66
67 install %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
68 cp -a nagios.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(644,root,root,755)
75 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
76 %attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.028794 seconds and 3 git commands to generate.