/[smecontribs]/rpms/smeserver-nagios-nrpe/contribs7/smeserver-nagios-nrpe.spec
ViewVC logotype

Contents of /rpms/smeserver-nagios-nrpe/contribs7/smeserver-nagios-nrpe.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed Feb 27 18:23:21 2008 UTC (16 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-nagios-nrpe-1_0_3-0_el4_sme
Changes since 1.1: +2 -5 lines
Fix specfile

1 Summary: Nagios nrpe integration
2 %define name smeserver-nagios-nrpe
3 Name: %{name}
4 %define version 1.0.3
5 %define release 0
6 Version: %{version}
7 Release: %{release}%{?dist}
8 License: GPL
9 Group: Applications/System
10 Source: %{name}-%{version}.tar.gz
11 BuildRoot: /var/tmp/%{name}-buildroot/
12 BuildArch: noarch
13 Requires: smeserver-release >= 7.1.3
14 Requires: nagios-nrpe >= 2.5.2
15 Requires: nagios-plugins-nrpe >= 2.5.2
16 Requires: nagios-plugins
17 BuildRequires: e-smith-devtools
18
19 AutoReq: no
20
21 %changelog
22 * Mon Dec 03 2007 Michael Weinberger <mweinber@neddix.de>
23 Version 1.0.3
24 modified templateexpand in events (/etc/sudoer perms bug)
25
26 * Thu Oct 15 2007 Michael Weinberger <mweinber@neddix.de>
27 - Initial release
28
29 %description
30 Nagios nrpe integration
31
32 Setting the TCP wrapper allowed hosts:
33 config setprop nrpe HostsAllow "127.0.0.1 10.203.104.0/255.255.252.0 172.22.32.0/255.255.240.0"
34 expand-template /etc/hosts.allow
35
36 To execute plugins as root:
37 config setprop nrpe sudoPlugins yes
38 expand-template /etc/sudoers
39 And set command_prefix=/usr/bin/sudo in /etc/nagios/nrpe.cfg
40
41
42 To check the connection run:
43 /usr/lib/nagios/plugins/check_nrpe -H NRPE_SERVER_IP
44 Expected Output is: "NRPE v2.5.1"
45
46
47 %prep
48 %setup -q -n %{name}-%{version}
49
50 %build
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
55 rm -f %{name}-%{version}-filelist
56 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
57 >> %{name}-%{version}-filelist
58 find $RPM_BUILD_ROOT -depth -type l -print |\
59 sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
65 /sbin/e-smith/config printtype nrpe > /dev/null || /sbin/e-smith/config set nrpe service
66 if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then
67 /sbin/e-smith/expand-template /etc/hosts.allow
68 /sbin/e-smith/expand-template /etc/sudoers
69 /sbin/e-smith/service nrpe restart
70 fi
71
72 %preun
73 if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then
74 if [ $1 = 0 ] ; then # uninstall
75 /sbin/e-smith/service nrpe stop
76 fi
77 fi
78
79
80 %postun
81 if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then
82 if [ $1 = 0 ] ; then # uninstall
83 /sbin/e-smith/expand-template /etc/hosts.allow
84 echo -n
85 fi
86 fi
87
88 %files -f %{name}-%{version}-filelist
89 %defattr(-,root,root)

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed