]>
Commit | Line | Data |
---|---|---|
9f54c7ed | 1 | Summary: Nagios remote plugin execution service/plugin |
32b335f7 | 2 | Summary(pl.UTF-8): Demon i wtyczka zdalnego wywoływania wtyczek Nagios |
884ffea2 | 3 | Name: nagios-nrpe |
e9a59d74 | 4 | Version: 2.12 |
671a4b4d | 5 | Release: 15 |
6095acef PZ |
6 | License: GPL v2 |
7 | Group: Networking | |
8 | Source0: http://dl.sourceforge.net/nagios/nrpe-%{version}.tar.gz | |
e9a59d74 | 9 | # Source0-md5: b2d75e2962f1e3151ef58794d60c9e97 |
283125e4 | 10 | Source1: nrpe.init |
8a6ed10e | 11 | Source2: nrpe-command.cfg |
dc04870c | 12 | Patch0: %{name}-config.patch |
6095acef PZ |
13 | URL: http://www.nagios.org/ |
14 | BuildRequires: autoconf | |
15 | BuildRequires: automake | |
bef67369 | 16 | BuildRequires: openssl-devel |
f384e93f | 17 | BuildRequires: openssl-tools |
c18c6a62 | 18 | BuildRequires: rpmbuild(macros) >= 1.268 |
74881710 | 19 | Requires(post,preun): /sbin/chkconfig |
fab2344e | 20 | Requires: nagios-common |
783f405f | 21 | Requires: rc-scripts |
7186fe13 | 22 | Provides: nagios-core |
c1473eca | 23 | Obsoletes: netsaint-nrpe |
884ffea2 | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
6095acef PZ |
25 | |
26 | %define _sysconfdir /etc/nagios | |
27 | %define _datadir %{_prefix}/share/%{name} | |
28 | %define _plugindir %{_libdir}/nagios/plugins | |
fcdb117d | 29 | %define _libexecdir %{_plugindir} |
6095acef | 30 | %define _localstatedir %{_var}/log/nagios |
6095acef PZ |
31 | %define nsport 5666 |
32 | ||
33 | %description | |
e47ef220 ER |
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). | |
6095acef | 41 | |
84d968ba JR |
42 | %description -l pl.UTF-8 |
43 | NRPE to dodatek do Nagiosa pozwalający na wywoływanie "lokalnych" | |
d951bfe3 | 44 | wtyczek (takich jak check_disk, check_procs itp.) na zdalnych |
84d968ba JR |
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 | |
d951bfe3 | 49 | szyfrowanie SSL/TLS (w trybie anonimowego DH). |
6095acef | 50 | |
0a9173a1 | 51 | %package -n nagios-plugin-check_nrpe |
6095acef | 52 | Summary: check_nrpe plugin for Nagios |
32b335f7 | 53 | Summary(pl.UTF-8): Wtyczka check_nrpe dla Nagiosa |
6095acef | 54 | Group: Networking |
f4d9de42 | 55 | Requires: nagios-common |
0a9173a1 ER |
56 | Provides: %{name}-plugin = %{version}-%{release} |
57 | Obsoletes: %{name}-plugin < 2.12-6 | |
6095acef | 58 | |
0a9173a1 | 59 | %description -n nagios-plugin-check_nrpe |
6095acef PZ |
60 | check_nrpe plugin for Nagios. This plugin allows running plugins on |
61 | remote machines using nrpe service. | |
62 | ||
0a9173a1 | 63 | %description -n nagios-plugin-check_nrpe -l pl.UTF-8 |
783f405f | 64 | Wtyczka check_nrpe dla Nagiosa. Pozwala na zdalne uruchamianie wtyczek |
84d968ba | 65 | na innych komputerach za pomocą demona nrpe. |
6095acef PZ |
66 | |
67 | %prep | |
283125e4 | 68 | %setup -q -n nrpe-%{version} |
e3dd2648 | 69 | %patch0 -p1 |
6095acef PZ |
70 | |
71 | %build | |
72 | %{__aclocal} | |
73 | %{__autoconf} | |
74 | ||
75 | %configure \ | |
76 | --with-init-dir=/etc/rc.d/init.d \ | |
77 | --with-nrpe-port=%{nsport} \ | |
e8316598 ER |
78 | --with-nrpe-user=nagios \ |
79 | --with-nrpe-grp=nagios \ | |
ba61d89b JK |
80 | --enable-ssl \ |
81 | --enable-command-args | |
6095acef PZ |
82 | |
83 | %{__make} all | |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
8a6ed10e | 87 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/plugins,%{_libdir}/nagios/plugins,%{_sbindir}} \ |
ce845d3e | 88 | $RPM_BUILD_ROOT{%{_localstatedir},/var/run/nrpe} |
6095acef | 89 | |
ba61d89b | 90 | install sample-config/nrpe.cfg $RPM_BUILD_ROOT%{_sysconfdir}/nrpe.cfg |
5dffe4d7 | 91 | sed -e 's,@plugindir@,%{_plugindir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/plugins/check_nrpe.cfg |
283125e4 | 92 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nrpe |
6095acef PZ |
93 | install src/nrpe $RPM_BUILD_ROOT%{_sbindir} |
94 | install src/check_nrpe $RPM_BUILD_ROOT%{_plugindir} | |
95 | ||
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
6095acef | 99 | %post |
50034c16 | 100 | /sbin/chkconfig --add nrpe |
c18c6a62 | 101 | %service nrpe restart |
6095acef PZ |
102 | |
103 | %preun | |
104 | if [ "$1" = "0" ] ; then | |
c18c6a62 | 105 | %service nrpe stop |
50034c16 | 106 | /sbin/chkconfig --del nrpe |
6095acef PZ |
107 | fi |
108 | ||
ce845d3e ER |
109 | %triggerpostun -- %{name} < 2.6-1.1 |
110 | %{__sed} -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' %{_sysconfdir}/nrpe.cfg | |
111 | ||
5dffe4d7 ER |
112 | %triggerpostun -n nagios-plugin-check_nrpe -- nagios-plugin-check_nrpe < 2.12-7.1 |
113 | if [ -f %{_sysconfdir}/plugins/nrpe.cfg.rpmsave ]; then | |
114 | cp -f %{_sysconfdir}/plugins/check_nrpe.cfg{,.rpmnew} | |
115 | mv -f %{_sysconfdir}/plugins/{nrpe.cfg.rpmsave,check_nrpe.cfg} | |
116 | sed -i -e 's,-c \$ARG1\$,$ARG1$,' %{_sysconfdir}/plugins/check_nrpe.cfg | |
117 | fi | |
118 | ||
6095acef PZ |
119 | %files |
120 | %defattr(644,root,root,755) | |
121 | %doc Changelog LEGAL README* SECURITY | |
783f405f | 122 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nrpe.cfg |
6095acef | 123 | %attr(755,root,root) %{_sbindir}/nrpe |
ce845d3e ER |
124 | %attr(754,root,root) /etc/rc.d/init.d/nrpe |
125 | %dir %attr(775,root,nagios) /var/run/nrpe | |
6095acef | 126 | |
0a9173a1 | 127 | %files -n nagios-plugin-check_nrpe |
6095acef | 128 | %defattr(644,root,root,755) |
5dffe4d7 | 129 | %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins/check_nrpe.cfg |
8a6ed10e | 130 | %attr(755,root,root) %{_plugindir}/check_nrpe |