1 Summary: Nagios remote plugin execution service/plugin
2 Summary(pl.UTF-8): Demon i wtyczka zdalnego wywoływania wtyczek Nagios
8 Source0: http://downloads.sourceforge.net/nagios/nrpe-%{version}.tar.gz
9 # Source0-md5: 105857720e21674083a6d6be99e102c7
11 Source2: nrpe-command.cfg
12 Source3: %{name}.tmpfiles
13 Patch0: %{name}-config.patch
14 Patch1: nrpe_check_control.patch
15 URL: http://www.nagios.org/
16 BuildRequires: openssl-devel
17 BuildRequires: openssl-tools
18 BuildRequires: rpmbuild(macros) >= 1.647
19 Requires(post,preun): /sbin/chkconfig
20 Requires: nagios-common
23 Obsoletes: netsaint-nrpe
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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
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).
51 %package -n nagios-plugin-check_nrpe
52 Summary: check_nrpe plugin for Nagios
53 Summary(pl.UTF-8): Wtyczka check_nrpe dla Nagiosa
55 Requires: nagios-common
56 Provides: %{name}-plugin = %{version}-%{release}
57 Obsoletes: nagios-nrpe-plugin < 2.12-6
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.
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.
68 %setup -q -n nrpe-%{version}
69 %undos contrib/nrpe_check_control.c
75 --with-nrpe-port=%{nsport} \
76 --with-nrpe-user=nagios \
77 --with-nrpe-group=nagios \
83 %{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} contrib/nrpe_check_control.c -o contrib/nrpe_check_control
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/{plugins,nrpe.d},%{_libdir}/nagios/plugins,%{_sbindir}} \
88 $RPM_BUILD_ROOT{%{_localstatedir},/var/run/nrpe} \
89 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
91 cp -p sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg
92 sed -e 's,@plugindir@,%{_plugindir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/plugins/check_nrpe.cfg
93 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe
94 install -p src/nrpe $RPM_BUILD_ROOT%{_sbindir}
95 install -p src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
96 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
99 rm -rf $RPM_BUILD_ROOT
102 /sbin/chkconfig --add nrpe
103 %service nrpe restart
106 if [ "$1" = "0" ] ; then
108 /sbin/chkconfig --del nrpe
111 %triggerpostun -- %{name} < 2.6-1.1
112 %{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg
114 %triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1
115 if [ -f %{_sysconfdir}/plugins/nrpe.cfg.rpmsave ]; then
116 cp -f %{_sysconfdir}/plugins/check_nrpe.cfg{,.rpmnew}
117 mv -f %{_sysconfdir}/plugins/{nrpe.cfg.rpmsave,check_nrpe.cfg}
118 sed -i -e 's,-c \$ARG1\$,$ARG1$,' %{_sysconfdir}/plugins/check_nrpe.cfg
122 %defattr(644,root,root,755)
123 %doc Changelog LEGAL README* SECURITY
124 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg
125 %attr(750,root,nagios) %dir %{_sysconfdir}/nrpe.d
126 %attr(755,root,root) %{_sbindir}/nrpe
127 %attr(754,root,root) /etc/rc.d/init.d/nrpe
128 %dir %attr(775,root,nagios) /var/run/nrpe
129 %{systemdtmpfilesdir}/%{name}.conf
131 %files -n nagios-plugin-check_nrpe
132 %defattr(644,root,root,755)
133 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/check_nrpe.cfg
134 %attr(755,root,root) %{_plugindir}/check_nrpe