]> git.pld-linux.org Git - packages/nagios-nrpe.git/blob - nagios-nrpe.spec
- up to 2.13, add /etc/nagios/nrpe.d for nrpe config fragments
[packages/nagios-nrpe.git] / nagios-nrpe.spec
1 Summary:        Nagios remote plugin execution service/plugin
2 Summary(pl.UTF-8):      Demon i wtyczka zdalnego wywoływania wtyczek Nagios
3 Name:           nagios-nrpe
4 Version:        2.13
5 Release:        1
6 License:        GPL v2
7 Group:          Networking
8 Source0:        http://downloads.sourceforge.net/nagios/nrpe-%{version}.tar.gz
9 # Source0-md5:  e5176d9b258123ce9cf5872e33a77c1a
10 Source1:        nrpe.init
11 Source2:        nrpe-command.cfg
12 Patch0:         %{name}-config.patch
13 URL:            http://www.nagios.org/
14 BuildRequires:  autoconf
15 BuildRequires:  automake
16 BuildRequires:  openssl-devel
17 BuildRequires:  openssl-tools
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 Requires(post,preun):   /sbin/chkconfig
20 Requires:       nagios-common
21 Requires:       rc-scripts
22 Provides:       nagios-core
23 Obsoletes:      netsaint-nrpe
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _sysconfdir     /etc/nagios
27 %define         _datadir        %{_prefix}/share/%{name}
28 %define         _plugindir      %{_libdir}/nagios/plugins
29 %define         _libexecdir     %{_plugindir}
30 %define         _localstatedir  %{_var}/log/nagios
31 %define         nsport          5666
32
33 %description
34 NRPE is an addon for Nagios that allows you to execute "local" plugins
35 (like check_disk, check_procs, etc.) on remote hosts. The check_nrpe
36 plugin is called from Nagios and makes plugin execution requests to
37 the NRPE daemon running on the remote host (either as a standalone
38 daemon or as a service under inetd). Supports passing command
39 arguments to server, as well as native SSL/TLS encryption (anonymous
40 DH mode).
41
42 %description -l pl.UTF-8
43 NRPE to dodatek do Nagiosa pozwalający na wywoływanie "lokalnych"
44 wtyczek (takich jak check_disk, check_procs itp.) na zdalnych
45 maszynach. Wtyczka check_nrpe jest wywoływana z poziomu Nagiosa i
46 wysyła żądania uruchomienia wtyczek do demona NRPE działającego na
47 zdalnej maszynie (jako samodzielny demon lub usługa inetd). Obsługuje
48 przekazywanie argumentów poleceń do serwera, a także natywne
49 szyfrowanie SSL/TLS (w trybie anonimowego DH).
50
51 %package -n nagios-plugin-check_nrpe
52 Summary:        check_nrpe plugin for Nagios
53 Summary(pl.UTF-8):      Wtyczka check_nrpe dla Nagiosa
54 Group:          Networking
55 Requires:       nagios-common
56 Provides:       %{name}-plugin = %{version}-%{release}
57 Obsoletes:      nagios-nrpe-plugin < 2.12-6
58
59 %description -n nagios-plugin-check_nrpe
60 check_nrpe plugin for Nagios. This plugin allows running plugins on
61 remote machines using nrpe service.
62
63 %description -n nagios-plugin-check_nrpe -l pl.UTF-8
64 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek
65 na innych komputerach za pomocą demona nrpe.
66
67 %prep
68 %setup -q -n nrpe-%{version}
69 %patch0 -p1
70
71 %build
72 %{__aclocal}
73 %{__autoconf}
74
75 %configure \
76         --with-nrpe-port=%{nsport} \
77         --with-nrpe-user=nagios \
78         --with-nrpe-group=nagios \
79         --enable-ssl \
80         --enable-command-args
81
82 %{__make} all
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/{plugins,nrpe.d},%{_libdir}/nagios/plugins,%{_sbindir}} \
87         $RPM_BUILD_ROOT{%{_localstatedir},/var/run/nrpe}
88
89 cp -p sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg
90 sed -e 's,@plugindir@,%{_plugindir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/plugins/check_nrpe.cfg
91 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
92 install -p src/nrpe $RPM_BUILD_ROOT%{_sbindir}
93 install -p src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %post
99 /sbin/chkconfig --add nrpe
100 %service nrpe restart
101
102 %preun
103 if [ "$1" = "0" ] ; then
104         %service nrpe stop
105         /sbin/chkconfig --del nrpe
106 fi
107
108 %triggerpostun -- %{name} < 2.6-1.1
109 %{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg
110
111 %triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1
112 if [ -f %{_sysconfdir}/plugins/nrpe.cfg.rpmsave ]; then
113         cp -f %{_sysconfdir}/plugins/check_nrpe.cfg{,.rpmnew}
114         mv -f %{_sysconfdir}/plugins/{nrpe.cfg.rpmsave,check_nrpe.cfg}
115         sed -i -e 's,-c \$ARG1\$,$ARG1$,' %{_sysconfdir}/plugins/check_nrpe.cfg
116 fi
117
118 %files
119 %defattr(644,root,root,755)
120 %doc Changelog LEGAL README* SECURITY
121 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg
122 %attr(750,root,nagios) %dir %{_sysconfdir}/nrpe.d
123 %attr(755,root,root) %{_sbindir}/nrpe
124 %attr(754,root,root) /etc/rc.d/init.d/nrpe
125 %dir %attr(775,root,nagios) /var/run/nrpe
126
127 %files -n nagios-plugin-check_nrpe
128 %defattr(644,root,root,755)
129 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/check_nrpe.cfg
130 %attr(755,root,root) %{_plugindir}/check_nrpe
This page took 0.380943 seconds and 4 git commands to generate.