4 Summary: Nagios remote monitoring service/plugin
5 Summary(pl): Demon i wtyczka zdalnego monitorowania Nagios
11 Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz
13 URL: http://www.nagios.org/
14 BuildRequires: autoconf
15 BuildRequires: automake
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 Requires(pre): /usr/bin/getgid
18 Requires(pre): /bin/id
19 Requires(pre): /usr/sbin/groupadd
20 Requires(pre): /usr/sbin/useradd
21 Requires(post,postun): /sbin/chkconfig
22 Requires: nagios-plugins
24 %define _sysconfdir /etc/nagios
25 %define _datadir %{_prefix}/share/%{name}
26 %define _plugindir %{_libdir}/nagios/plugins
27 %define _localstatedir %{_var}/log/nagios
33 Nagios is a program that will monitor hosts and services on your
34 network. It has the ability to email or page you when a problem arises
35 and when a problem is resolved. Nagios is written in C and is designed
36 to run under Linux (and some other *NIX variants) as a background
37 process, intermittently running checks on various services that you
40 The actual service checks are performed by separate "plugin" programs
41 which return the status of the checks to Nagios. The plugins are
42 available in nagios-plugins packages.
44 Nagios is successor to NetSaint.
47 Nagios to program, który monitoruje serwery oraz us³ugi w naszej
48 sieci. Posiada on mo¿liwo¶æ wysy³ania informacji o wyst±pieniu oraz
49 rozwi±zaniu problemu. Nagios zosta³ napisany w C oraz jest
50 zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami)
51 jako proces pracuj±cy w tle i bezustannie wykonuj±cy pewne operacje
54 W³a¶ciwe sprawdzanie jest wykonywane przez osobne programy
55 ("wtyczki"), które zwracaj± informacje o statusie do Nagiosa. Wtyczki
56 s± dostêpne na stronie w pakietach nagios-plugins.
58 Nagios jest nastêpc± NetSainta.
61 Summary: check_nrpe plugin for Nagios
62 Summary(pl): Wtyczka check_nrpe dla Nagiosa
66 check_nrpe plugin for Nagios. This plugin allows running plugins on
67 remote machines using nrpe service.
69 %description plugin -l pl
70 Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie
71 wtyczek na innych komputerach za pomoc± demona nrpe.
81 --with-init-dir=/etc/rc.d/init.d \
82 --with-nrpe-port=%{nsport} \
83 --with-nrpe-user=%{nsusr} \
84 --with-nrpe-grp=%{nsgrp} \
86 --exec-prefix=%{_sbindir} \
87 --bindir=%{_sbindir} \
88 --libexecdir=%{_plugindir} \
89 --datadir=%{_prefix}/share/nagios \
90 --sysconfdir=%{_sysconfdir} \
91 --localstatedir=%{_localstatedir}
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_libdir}/nagios/plugins,%{_sbindir}} \
98 $RPM_BUILD_ROOT%{_localstatedir}
100 install nrpe.cfg $RPM_BUILD_ROOT/etc/nagios/nrpe.cfg
101 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
102 install src/nrpe $RPM_BUILD_ROOT%{_sbindir}
103 install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir}
106 rm -rf $RPM_BUILD_ROOT
109 if [ -n "`getgid %{nsgrp}`" ]; then
110 if [ "`getgid %{nsgrp}`" != "72" ]; then
111 echo "Error: group %{nsgrp} doesn't have gid=72. Correct this before installing %{name}." 1>&2
115 /usr/sbin/groupadd -g 72 -f %{nsgrp}
117 if [ -n "`id -u %{nsusr} 2>/dev/null`" ]; then
118 if [ "`id -u %{nsusr}`" != "72" ]; then
119 echo "Error: user %{nsusr} doesn't have uid=72. Correct this before installing %{name}." 1>&2
123 /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{nsgrp} %{nsusr} 1>&2
127 /sbin/chkconfig --add %{name}
128 if [ -f /var/lock/subsys/%{name} ]; then
129 /etc/rc.d/init.d/%{name} restart 1>&2
133 if [ "$1" = "0" ] ; then
134 if [ -f /var/lock/subsys/%{name} ]; then
135 /etc/rc.d/init.d/%{name} stop 1>&2
137 /sbin/chkconfig --del %{name}
141 if [ "$1" = "0" ]; then
142 /usr/sbin/userdel %{nsusr}
143 /usr/sbin/groupdel %{nsgrp}
147 %defattr(644,root,root,755)
148 %doc Changelog LEGAL README* SECURITY
149 %attr(754,root,root) /etc/rc.d/init.d/%{name}
150 %attr(751,root,%{nsgrp}) %dir %{_sysconfdir}
151 %attr(644,root,%{nsgrp}) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nrpe.cfg
152 %attr(755,root,root) %{_sbindir}/nrpe
155 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_plugindir}/*