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