-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathafs-monitor.spec
66 lines (52 loc) · 2.27 KB
/
afs-monitor.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Name: nagios-plugins-afs
Version: 2.4
Release: 1%{?dist}
Summary: Nagios plugins for monitoring various aspects of AFS servers
Group: Applications/System
License: GPL+ or Artistic
URL: http://www.eyrie.org/~eagle/software/afs-monitor
Source0: http://archives.eyrie.org/software/afs/afs-monitor-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: nagios-common,openafs,perl(Number::Format)
%description
afs-monitor provides Nagios-compatible probe scripts that can be used to
monitor AFS servers. It contains five scripts: check_afs_quotas, which
monitors AFS volumes for quota usage; check_afs_space, which monitors
file server partitions for disk usage; check_afs_bos, which monitors any
bosserver-managed set of processes for problems reported by bos;
check_afs_rxdebug, which monitors AFS fileservers for connections
waiting for a thread; and check_afs_udebug, which monitors Ubik services
(such as vlserver and ptserver) for replication and quorum problems.
This package installs the plugins in %{_libdir}/nagios/plugins, for
compatibility with the nagios packages in Fedora/EPEL.
%prep
%setup -q -n afs-monitor-%{version}
%build
%define plugin_list bos quotas rxdebug space udebug
%define man_section 1
for plugin in %{plugin_list}; do
pod2man --section=%{man_section} --center="Manual for %{name}" --release=%{version} \
check_afs_$plugin check_afs_$plugin.%{man_section}
done
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_libdir}/nagios/plugins
for plugin in %{plugin_list}; do
install -pm 755 check_afs_$plugin $RPM_BUILD_ROOT%{_libdir}/nagios/plugins
done
install -d $RPM_BUILD_ROOT%{_mandir}/man%{man_section}
for plugin in %{plugin_list}; do
install -pm 644 check_afs_$plugin.%{man_section} $RPM_BUILD_ROOT%{_mandir}/man%{man_section}
done
install -d $RPM_BUILD_ROOT%{_defaultdocdir}/%name-%version
install -pm 644 README NEWS TODO $RPM_BUILD_ROOT%{_defaultdocdir}/%name-%version
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_libdir}/nagios/plugins/check_afs_*
%{_mandir}/man%{man_section}/check_afs_*
%doc %{_defaultdocdir}/%name-%version
%changelog
* Wed Jan 30 2013 Jacob Welsh <[email protected]> - 2.4-1
- Initial package