|
|
568d74e |
Name: nagios
|
|
|
c8ed307 |
Version: 2.7
|
|
|
c8ed307 |
Release: 2%{?dist}
|
|
|
568d74e |
Summary: Host/service/network monitoring program
|
|
|
568d74e |
|
|
|
568d74e |
Group: Applications/System
|
|
|
568d74e |
License: GPL
|
|
|
568d74e |
URL: http://www.nagios.org/
|
|
|
cfd6bb8 |
Source0: http://dl.sourceforge.net/nagios/%{name}-%{version}.tar.gz
|
|
|
568d74e |
Source1: nagios.logrotate
|
|
|
8b2bc51 |
Source2: nagios.htaccess
|
|
|
4c10caa |
Patch0: nagios-initrd.patch
|
|
|
568d74e |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
568d74e |
|
|
|
4abe26f |
BuildRequires: gd-devel > 1.8, mailx
|
|
|
568d74e |
Requires: httpd
|
|
|
568d74e |
Requires(pre): %{_sbindir}/useradd
|
|
|
4abe26f |
Requires(preun): /sbin/service, /sbin/chkconfig
|
|
|
4abe26f |
Requires(post): /sbin/chkconfig, /sbin/service, %{_sbindir}/usermod
|
|
|
568d74e |
Requires(postun): /sbin/service
|
|
|
568d74e |
|
|
|
568d74e |
%description
|
|
|
568d74e |
Nagios is a program that will monitor hosts and services on your
|
|
|
568d74e |
network. It has the ability to send email or page alerts when a
|
|
|
568d74e |
problem arises and when a problem is resolved. Nagios is written
|
|
|
568d74e |
in C and is designed to run under Linux (and some other *NIX
|
|
|
568d74e |
variants) as a background process, intermittently running checks
|
|
|
568d74e |
on various services that you specify.
|
|
|
568d74e |
|
|
|
568d74e |
The actual service checks are performed by separate "plugin" programs
|
|
|
568d74e |
which return the status of the checks to Nagios. The plugins are
|
|
|
568d74e |
available at http://sourceforge.net/projects/nagiosplug.
|
|
|
568d74e |
|
|
|
568d74e |
This package provides the core program, web interface, and documentation
|
|
|
568d74e |
files for Nagios. Development files are built as a separate package.
|
|
|
568d74e |
|
|
|
568d74e |
%package devel
|
|
|
568d74e |
Group: Applications/System
|
|
|
568d74e |
Summary: Provides include files that Nagios-related applications may compile against
|
|
|
568d74e |
Requires: %{name} = %{version}-%{release}
|
|
|
568d74e |
|
|
|
568d74e |
%description devel
|
|
|
568d74e |
Nagios is a program that will monitor hosts and services on your
|
|
|
568d74e |
network. It has the ability to email or page you when a problem arises
|
|
|
568d74e |
and when a problem is resolved. Nagios is written in C and is
|
|
|
568d74e |
designed to run under Linux (and some other *NIX variants) as a
|
|
|
568d74e |
background process, intermittently running checks on various services
|
|
|
568d74e |
that you specify.
|
|
|
568d74e |
|
|
|
568d74e |
This package provides include files that Nagios-related applications
|
|
|
568d74e |
may compile against.
|
|
|
568d74e |
|
|
|
568d74e |
%prep
|
|
|
cfd6bb8 |
%setup -q
|
|
|
4c10caa |
%patch0 -p0
|
|
|
568d74e |
|
|
|
568d74e |
%build
|
|
|
568d74e |
./configure \
|
|
|
568d74e |
--prefix=%{_datadir}/%{name} \
|
|
|
568d74e |
--exec-prefix=%{_localstatedir}/lib/%{name} \
|
|
|
568d74e |
--with-init-dir=%{_initrddir} \
|
|
|
568d74e |
--with-cgiurl=/%{name}/cgi-bin/ \
|
|
|
568d74e |
--with-htmlurl=/%{name} \
|
|
|
568d74e |
--with-lockfile=%{_localstatedir}/run/%{name}.pid \
|
|
|
568d74e |
--with-nagios-user=nagios \
|
|
|
568d74e |
--with-nagios-grp=nagios \
|
|
|
568d74e |
--bindir=%{_sbindir} \
|
|
|
568d74e |
--libexecdir=%{_libdir}/%{name}/plugins \
|
|
|
568d74e |
--sysconfdir=%{_sysconfdir}/%{name} \
|
|
|
568d74e |
--localstatedir=%{_localstatedir}/log/%{name} \
|
|
|
568d74e |
--with-gd-lib=%{_libdir} \
|
|
|
568d74e |
--with-gd-inc=%{_includedir} \
|
|
|
568d74e |
--enable-embedded-perl \
|
|
|
568d74e |
--with-perlcache \
|
|
|
568d74e |
--with-template-objects \
|
|
|
568d74e |
--with-template-extinfo
|
|
|
568d74e |
make %{?_smp_mflags} all
|
|
|
568d74e |
|
|
|
568d74e |
%{__sed} -e "s| package Embed::Persistent;|#\!%{_bindir}/perl\npackage Embed::Persistent;|" < p1.pl > p1.pl.fedora
|
|
|
568d74e |
%{__sed} -e "s/# chkconfig: 345/# chkconfig: - /" \
|
|
|
f5382e1 |
-e "s|NagiosCmd=/var/log/nagios/rw/nagios.cmd|NagiosCmd=%{_localstatedir}/spool/%{name}/cmd/nagios.cmd|" < daemon-init > daemon-init.fedora
|
|
|
568d74e |
%{__sed} -e "s|resource.cfg|private/resource.cfg|" \
|
|
|
f5382e1 |
-e "s|command_file=/var/log/nagios/rw/nagios.cmd|command_file=%{_localstatedir}/spool/%{name}/cmd/nagios.cmd|" < sample-config/nagios.cfg > sample-config/nagios.cfg.fedora
|
|
|
4abe26f |
%{__sed} -e "s|/usr/lib/|%{_libdir}/|" %{SOURCE2} > %{name}.htaccess
|
|
|
568d74e |
%{__mv} -f sample-config/nagios.cfg.fedora sample-config/nagios.cfg
|
|
|
8b2bc51 |
echo >> html/stylesheets/common.css
|
|
|
568d74e |
|
|
|
568d74e |
%install
|
|
|
568d74e |
rm -rf %{buildroot}
|
|
|
568d74e |
make DESTDIR=%{buildroot} INSTALL_OPTS="" COMMAND_OPTS="" install-config
|
|
|
f5382e1 |
%{__install} -d -m 0775 %{buildroot}/%{_localstatedir}/spool/%{name}/cmd
|
|
|
568d74e |
%{__install} -d -m 0755 %{buildroot}/%{_prefix}/include/%{name}
|
|
|
568d74e |
%{__install} -d -m 0755 %{buildroot}/%{_sysconfdir}/%{name}
|
|
|
568d74e |
%{__install} -d -m 0755 %{buildroot}/%{_sysconfdir}/%{name}/private
|
|
|
568d74e |
%{__install} -D -m 0755 base/nagios %{buildroot}/%{_sbindir}/nagios
|
|
|
864e2e6 |
%{__install} -D -m 0755 base/nagiostats %{buildroot}/%{_bindir}/nagiostats
|
|
|
568d74e |
%{__install} -d -m 0755 cgi/ %{buildroot}/%{_libdir}/%{name}/cgi-bin/
|
|
|
568d74e |
%{__install} -D -m 0755 cgi/*cgi %{buildroot}/%{_libdir}/%{name}/cgi-bin/
|
|
|
568d74e |
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
|
|
|
568d74e |
%{__install} -d -m 0755 %{buildroot}/%{_libdir}/%{name}/plugins/eventhandlers
|
|
|
8b2bc51 |
%{__install} -D -m 0644 include/locations.h %{buildroot}/%{_includedir}/%{name}/locations.h
|
|
|
4abe26f |
%{__install} -D -m 0644 %{name}.htaccess %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
|
|
568d74e |
%{__install} -D -m 0755 daemon-init.fedora %{buildroot}/%{_initrddir}/%{name}
|
|
|
568d74e |
%{__install} -d -m 0755 html/ %{buildroot}/%{_datadir}/%{name}/html
|
|
|
568d74e |
%{__install} -d -m 0755 %{buildroot}/%{_localstatedir}/log/%{name}/archives
|
|
|
568d74e |
%{__install} -D -m 0755 p1.pl.fedora %{buildroot}/%{_sbindir}/p1.pl
|
|
|
568d74e |
%{__mkdir} -p %{buildroot}/%{_initrddir}
|
|
|
568d74e |
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/
|
|
|
568d74e |
%{__cp} -a html/* %{buildroot}/%{_datadir}/%{name}/html/
|
|
|
568d74e |
%{__rm} -f %{buildroot}/%{_datadir}/%{name}/html/*in
|
|
|
568d74e |
%{__rm} -f %{buildroot}/%{_datadir}/%{name}/html/Makefile
|
|
|
568d74e |
%{__mv} %{buildroot}/%{_sysconfdir}/%{name}/resource.cfg-sample %{buildroot}/%{_sysconfdir}/%{name}/private/resource.cfg-sample
|
|
|
568d74e |
|
|
|
568d74e |
%clean
|
|
|
568d74e |
rm -rf %{buildroot} > /dev/null 2>&1
|
|
|
568d74e |
|
|
|
568d74e |
%pre
|
|
|
568d74e |
%{_sbindir}/useradd -d %{_localstatedir}/spool/%{name} -r -s /sbin/nologin nagios 2> /dev/null || :
|
|
|
568d74e |
|
|
|
568d74e |
%preun
|
|
|
905c87a |
if [ $1 = 0 ]; then
|
|
|
905c87a |
/sbin/service nagios stop > /dev/null 2>&1 || :
|
|
|
905c87a |
/sbin/chkconfig --del %{name} || :
|
|
|
905c87a |
fi
|
|
|
568d74e |
|
|
|
568d74e |
%post
|
|
|
568d74e |
/sbin/chkconfig --add %{name} || :
|
|
|
568d74e |
/sbin/service httpd condrestart > /dev/null 2>&1 || :
|
|
|
15366e7 |
%{_sbindir}/usermod -a -G %{name} apache || :
|
|
|
568d74e |
|
|
|
568d74e |
%postun
|
|
|
568d74e |
/sbin/service httpd condrestart > /dev/null 2>&1 || :
|
|
|
568d74e |
|
|
|
568d74e |
%files
|
|
|
568d74e |
%defattr(-,root,root,-)
|
|
|
568d74e |
%dir %{_sysconfdir}/%{name}
|
|
|
568d74e |
%dir %{_libdir}/%{name}/plugins/eventhandlers
|
|
|
568d74e |
%dir %{_libdir}/%{name}/cgi-bin
|
|
|
568d74e |
%dir %{_datadir}/%{name}
|
|
|
568d74e |
%dir %{_datadir}/%{name}/html
|
|
|
568d74e |
%doc %{_datadir}/%{name}/html/docs
|
|
|
8b2bc51 |
%doc Changelog INSTALLING LICENSE README UPGRADING
|
|
|
568d74e |
%{_datadir}/%{name}/html/[^d]*
|
|
|
568d74e |
%{_sbindir}/*
|
|
|
864e2e6 |
%{_bindir}/*
|
|
|
568d74e |
%{_libdir}/%{name}/cgi-bin/*cgi
|
|
|
568d74e |
%{_initrddir}/nagios
|
|
|
568d74e |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/nagios.conf
|
|
|
568d74e |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
568d74e |
%config(noreplace) %{_sysconfdir}/%{name}/*cfg-sample
|
|
|
568d74e |
|
|
|
b0f9836 |
%attr(0750,root,nagios) %dir %{_sysconfdir}/%{name}/private
|
|
|
b0f9836 |
%attr(0640,root,nagios) %config(noreplace) %{_sysconfdir}/%{name}/private/resource.cfg-sample
|
|
|
f5382e1 |
%attr(0755,nagios,nagios) %dir %{_localstatedir}/spool/%{name}
|
|
|
f5382e1 |
%attr(2775,nagios,nagios) %dir %{_localstatedir}/spool/%{name}/cmd
|
|
|
568d74e |
%attr(0755,nagios,nagios) %dir %{_localstatedir}/log/%{name}
|
|
|
568d74e |
%attr(0755,nagios,nagios) %dir %{_localstatedir}/log/%{name}/archives
|
|
|
568d74e |
|
|
|
568d74e |
%files devel
|
|
|
568d74e |
%defattr(-,root,root)
|
|
|
568d74e |
%{_includedir}/%{name}
|
|
|
568d74e |
|
|
|
568d74e |
%changelog
|
|
|
c8ed307 |
* Tue Feb 06 2007 Mike McGrath <imlinux@gmail.com> 2.7-2
|
|
|
c8ed307 |
- Upstream released 2.7
|
|
|
c8ed307 |
|
|
|
7794d69 |
* Thu Nov 30 2006 Mike McGrath <imlinux@gmail.com> 2.6-1
|
|
|
7794d69 |
- Upstream released 2.6
|
|
|
7794d69 |
|
|
|
ff7db9e |
* Thu Sep 07 2006 Mike McGrath <imlinux@gmail.com> 2.5-3
|
|
|
ff7db9e |
- Release bump for mass rebuild
|
|
|
ff7db9e |
|
|
|
b0f9836 |
* Wed Aug 02 2006 Mike McGrath <imlinux@gmail.com> 2.5-2
|
|
|
b0f9836 |
- Fixed default permissions for private and the resource file
|
|
|
b0f9836 |
|
|
|
8e5eb74 |
* Fri Jul 14 2006 Mike McGrath <imlinux@gmail.com> 2.5-1
|
|
|
8e5eb74 |
- Upstream released 2.5
|
|
|
8e5eb74 |
|
|
|
864e2e6 |
* Mon Jun 26 2006 Mike McGrath <imlinux@gmail.com> 2.4-2
|
|
|
864e2e6 |
- Added /usr/bin/nagiostats bz# 194461
|
|
|
864e2e6 |
|
|
|
204b3ec |
* Sun Jun 04 2006 Mike McGrath <imlinux@gmail.com> 2.4-1
|
|
|
204b3ec |
- Upstream released 2.4
|
|
|
204b3ec |
- Cleaned up changelog
|
|
|
204b3ec |
|
|
|
905c87a |
* Mon May 15 2006 Mike McGrath <imlinux@gmail.com> 2.3.1-1
|
|
|
905c87a |
- Bug fix for HTTP content_length header integer overflow in CGIs
|
|
|
905c87a |
- Updates no longer remove Nagios from starting up on reboot
|
|
|
905c87a |
|
|
|
eba7d53 |
* Tue May 09 2006 Mike McGrath <imlinux@gmail.com> 2.3-3
|
|
|
4c10caa |
- updates to the init script that prevented nagios from shutting down
|
|
|
4c10caa |
|
|
|
13ef4cc |
* Wed May 03 2006 Mike McGrath <imlinux@gmail.com> 2.3-1
|
|
|
13ef4cc |
- Upstream released 2.3
|
|
|
13ef4cc |
- Bug fix for negative HTTP content_length header in CGIs
|
|
|
13ef4cc |
- Added missing links for notes_url and action_url to service column of status detail page
|
|
|
13ef4cc |
|
|
|
ebe12d8 |
* Tue May 02 2006 Mike McGrath <imlinux@gmail.com> 2.2-3
|
|
|
f5382e1 |
- Upstream released 2.2
|
|
|
f5382e1 |
|
|
|
ba55d5d |
* Tue Feb 21 2006 Mike McGrath <imlinux@gmail.com> 2.0-1
|
|
|
cfd6bb8 |
- Upstream released 2.0 (changes below)
|
|
|
cfd6bb8 |
- Fix for segfault in timed event queue
|
|
|
cfd6bb8 |
- Removed length limitations for object vars/vals
|
|
|
cfd6bb8 |
- Updated config.sub and config.guess to versions from automake-1.9
|
|
|
cfd6bb8 |
- Doc updates
|
|
|
45ed12f |
|
|
|
4abe26f |
* Sat Feb 04 2006 Mike McGrath <imlinux@gmail.com> 2.0-0.2.rc2
|
|
|
4abe26f |
- Fixed default options in Apache config
|
|
|
4abe26f |
|
|
|
8b2bc51 |
* Fri Jan 27 2006 Mike McGrath <imlinux@gmail.com> 2.0-0.1.rc2
|
|
|
8b2bc51 |
- Using 2.0rc2 tarball
|
|
|
8b2bc51 |
|
|
|
15366e7 |
* Thu Jan 26 2006 Mike McGrath <imlinux@gmail.com> 1.3-15
|
|
|
15366e7 |
- Fixed usermod -a issue, Bugzilla #49609
|
|
|
15366e7 |
|
|
|
568d74e |
* Sun Jan 15 2005 Mike McGrath <imlinux@gmail.com> 1.3-14
|
|
|
568d74e |
- Fedora friendly spec file
|
|
|
568d74e |
|
|
|
568d74e |
* Sat May 31 2003 Karl DeBisschop <kdebisschop@users.sourceforge.net> (1.1-1)
|
|
|
568d74e |
- Merge with CVS for 1.1 release
|
|
|
568d74e |
|
|
|
568d74e |
* Fri May 30 2003 Karl DeBisschop <kdebisschop@users.sourceforge.net> (1.0-4)
|
|
|
568d74e |
- cmdgrp was not always getting created
|
|
|
568d74e |
- patches for cmd.cgi and history.cgi
|
|
|
568d74e |
|
|
|
568d74e |
* Sat May 24 2003 Karl DeBisschop <kdebisschop@users.sourceforge.net> (1.0-3)
|
|
|
568d74e |
- patches for doco and PostgreSQL timestamp
|
|
|
568d74e |
- make sure all files are packaged (otherwise, will not build on RH9)
|
|
|
568d74e |
|
|
|
568d74e |
* Sat May 17 2003 Karl DeBisschop <kdebisschop@users.sourceforge.net> (1.0-2)
|
|
|
568d74e |
- patch for file descriptor leak
|
|
|
568d74e |
|
|
|
568d74e |
* Fri Oct 04 2002 Karl DeBisschop <kdebisschop@users.sourceforge.net>
|
|
|
568d74e |
- merge many improvements from Ramiro Morales <rm-rpms@gmx.net>
|
|
|
568d74e |
(macros for PERF_EXTERNAL and EMBPERL, cleanup pre/post scripts,
|
|
|
568d74e |
nnmmsg logger macro, include eventhandlers, convertcfg, mini_epn)
|
|
|
568d74e |
- use LSB-standard /etc/init.d/nagios startup location
|
|
|
568d74e |
|
|
|
568d74e |
* Tue Aug 13 2002 Karl DeBisschop <kdebisschop@users.sourceforge.net>
|
|
|
568d74e |
- INSTALL was renamed INSTALLING
|
|
|
568d74e |
- p1.pl script included in package
|
|
|
568d74e |
- web server restarted because Red Hat 7.3 init does not do 'reload'
|
|
|
568d74e |
|
|
|
568d74e |
* Fri Jun 14 2002 Ethan Galstad
|
|
|
568d74e |
- Modified requirements to work when installed using KickStart (Jeff Frost)
|
|
|
568d74e |
- Changed method used for checking for user/group existence (Jeff Frost)
|
|
|
568d74e |
|
|
|
568d74e |
* Tue May 15 2002 Ethan Galstad
|
|
|
568d74e |
- Updated to work with new sample template-based config files (Darren Gamble)
|
|
|
568d74e |
|
|
|
568d74e |
* Sun Feb 17 2002 Ole Gjerde <gjerde@ignus.com> (1.0a4)
|
|
|
568d74e |
- Fixed spec file to work with Nagios
|
|
|
568d74e |
|
|
|
568d74e |
* Wed Jan 17 2001 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.7a5-1)
|
|
|
568d74e |
- switch from /usr/libexec to /usr/lib because linux FHS has no libexec
|
|
|
568d74e |
- use global macro to set location of init script
|
|
|
568d74e |
- fold htaccess.sample into contrib directory of tarball
|
|
|
568d74e |
|
|
|
568d74e |
* Fri Nov 03 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6-1)
|
|
|
568d74e |
- Rebuild with final sources
|
|
|
568d74e |
|
|
|
568d74e |
* Wed Sep 06 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b5-1)
|
|
|
568d74e |
- Create separate cgi, html, and devel packages
|
|
|
568d74e |
- Include commands.cfg
|
|
|
568d74e |
|
|
|
568d74e |
* Sun Aug 27 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b5-1)
|
|
|
568d74e |
- beta 5
|
|
|
568d74e |
|
|
|
568d74e |
* Sun Jul 23 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b3-2)
|
|
|
568d74e |
- fixes for daemon-init, multi-OS RPM building
|
|
|
568d74e |
|
|
|
568d74e |
* Wed Jul 12 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b3-1)
|
|
|
568d74e |
- beta 3
|
|
|
568d74e |
|
|
|
568d74e |
* Sun Jun 25 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b2-3)
|
|
|
568d74e |
- true beta2 sources
|
|
|
568d74e |
|
|
|
568d74e |
* Sat Jun 24 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b2-2)
|
|
|
568d74e |
- cleanup spec, still using pre-beta2 sources
|
|
|
568d74e |
|
|
|
568d74e |
* Sat Jun 24 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b2-1)
|
|
|
568d74e |
- mandrake merge using pre-beta2 sources (many thanks to Stefan van der Eijk <s.vandereijk@chello.nl>)
|
|
|
568d74e |
|
|
|
568d74e |
* Wed Jun 14 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b1-1)
|
|
|
568d74e |
- add stylesheet diffs
|
|
|
568d74e |
|
|
|
568d74e |
* Mon Jun 12 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.6b1-1)
|
|
|
568d74e |
- adapt for 0.0.6b1
|
|
|
568d74e |
|
|
|
568d74e |
* Mon Jun 05 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net> (0.0.5-4)
|
|
|
568d74e |
- add traceroute.cgi and htaccess.sample
|
|
|
568d74e |
- move placement of docs (in files) to avoid group warnings
|
|
|
568d74e |
- change www user and group to nobody and add warning
|
|
|
568d74e |
|
|
|
568d74e |
* Mon Jun 05 2000 Karsten Weiss <knweiss@gmx.de> (0.0.5-3)
|
|
|
568d74e |
- official group name
|
|
|
568d74e |
- improved user detection
|
|
|
568d74e |
|
|
|
568d74e |
* Tue Oct 19 1999 Mike McHenry
|
|
|
568d74e |
- Fixed init.d scripts to better fit new Redhat init.d script formats
|
|
|
568d74e |
|
|
|
568d74e |
* Fri Sep 03 1999 Mike McHenry <mmchen@minn.net> (0.0.4-1)
|
|
|
568d74e |
- Upgraded package from 0.0.4b4 to 0.0.4
|
|
|
568d74e |
|
|
|
568d74e |
* Mon Aug 16 1999 Mike McHenry <mmchen@minn.net>
|
|
|
568d74e |
- First RPM build (0.0.4b4)
|