ALT Linux repos
Group :: Monitoring
RPM: nagios
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%define rev b3
Name: nagios
Version: 2.0
Release: alt0.%rev.1
%define nagios_usr nagios
%define nagios_grp nagios
%define httpd_grp apache
Summary: Services and network monitoring system
Summary(ru_RU.KOI8-R): Система мониторинга сети и сервисов.
License: GPL
Group: Monitoring
URL: http://www.nagios.org
Source0: %name-%version%rev.tar.gz
# Apache config for Nagios(R)
Source1: %name.conf
# Apache user/password file for Nagios(R)
# contains defaults: user=nagios, password=nagios
Source2: %name.web-users
# init-script for Nagios(R)
Source3: %name.init
# fix some default paths
Patch0: %name-2.0b2-alt-makefile.patch
Patch1: %name-2.0b1-alt-eperlfix.patch
Patch2: %name-2.0b1-alt-paths.patch
Patch3: %name-2.0b1-alt-scripts.patch
Patch4: %name-2.0b3-alt-configs.patch
Patch5: %name-2.0b1-alt-cgi.patch
###########################################
# Provide the abstract service names (which are virtual pkg names),
# specify their origin (our pkg name as the epoch + version-release):
Provides: nagios
Provides: nagios-daemon = %name:%version-%release
Obsoletes: nagios < %version-%release
Obsoletes: nagios-default nagios-mysql nagios-pgsql
# Conflict with all other real pkgs which provide the same services
# (they should specify the origin the same way, so the epoch-version-release
# of the virtual pkgs POP3D & IMAPD will always differ from that of ours if
# they are provided by a different real pkg):
Conflicts: nagios-daemon < %name:%version-%release
Conflicts: nagios-daemon > %name:%version-%release
#
########################################
PreReq: %name-common = %version-%release
Requires: nagios-plugins
# Automatically added by buildreq on Sat Jan 08 2005
BuildRequires: libgd2-devel libjpeg-devel libltdl-devel libpng-devel perl-devel
BuildRequires: traceroute xorg-x11-libs zlib-devel
%description
Nagios(R) is a host and service monitor designed to inform you of network
problems before your clients, end-users or managers do. It has been
designed to run under the Linux operating system, but works fine under
most *NIX variants as well. The monitoring daemon runs intermittent
checks on hosts and services you specify using external "plugins" which
return status information to Nagios(R). When problems are encountered, the
daemon can send notifications out to administrative contacts in a variety
of different ways (email, instant message, SMS, etc.). Current status
information, historical logs, and reports can all be accessed via a web
browser.
%description -l ru_RU.KOI8-R
Nagios(R) является системой мониторинга хостов и сервисов, назначение которой
- информировать вас о проблемах в сети до того как это сделают ваши клиенты
или конечные пользователи. Nagios(R) расчитан на работу в среде ОС Linux, но
также вполне успешно работает под большинств *NIX-подобных ОС. Вся проверка
хостов/сервисов строится на основе внешних подключаемых модулей - "plug-ins".
Текущее сосотояние контролируемых объектов, подробные отчеты и графики можно
просмотреть с помощью web-интерфейса.
%package common
Summary: Services and network monitor, common files
Summary(ru_RU.KOI8-R): Система мониторинга сети и сервисов, общие файлы
Group: Monitoring
%description common
Nagios(R) is a host and service monitor designed to inform you of network
problems before your clients, end-users or managers do. It has been
designed to run under the Linux operating system, but works fine under
most *NIX variants as well. The monitoring daemon runs intermittent
checks on hosts and services you specify using external "plugins" which
return status information to Nagios(R). When problems are encountered, the
daemon can send notifications out to administrative contacts in a variety
of different ways (email, instant message, SMS, etc.). Current status
information, historical logs, and reports can all be accessed via a web
browser.
%description common -l ru_RU.KOI8-R
Nagios(R) является системой мониторинга хостов и сервисов, назначение которой
- информировать вас о проблемах в сети до того как это сделают ваши клиенты
или конечные пользователи. Nagios(R) расчитан на работу в среде ОС Linux, но
также вполне успешно работает под большинств *NIX-подобных ОС. Вся проверка
хостов/сервисов строится на основе внешних подключаемых модулей - "plug-ins".
Текущее сосотояние контролируемых объектов, подробные отчеты и графики можно
просмотреть с помощью web-интерфейса.
%package www
Summary: Services and network monitor, common files for web-interface
Summary(ru_RU.KOI8-R): Система мониторинга сети и сервисов, web-интерфейс
Group: Monitoring
PreReq: %name-common = %version-%release
Obsoletes: nagios-default-www nagios-mysql-www nagios-pgsql-www
%description www
Nagios(R) is a host and service monitor designed to inform you of network
problems before your clients, end-users or managers do. It has been
designed to run under the Linux operating system, but works fine under
most *NIX variants as well. The monitoring daemon runs intermittent
checks on hosts and services you specify using external "plugins" which
return status information to Nagios(R). When problems are encountered, the
daemon can send notifications out to administrative contacts in a variety
of different ways (email, instant message, SMS, etc.). Current status
information, historical logs, and reports can all be accessed via a web
browser.
%description www -l ru_RU.KOI8-R
Nagios(R) является системой мониторинга хостов и сервисов, назначение которой
- информировать вас о проблемах в сети до того как это сделают ваши клиенты
или конечные пользователи. Nagios(R) расчитан на работу в среде ОС Linux, но
также вполне успешно работает под большинств *NIX-подобных ОС. Вся проверка
хостов/сервисов строится на основе внешних подключаемых модулей - "plugins".
Текущее сосотояние контролируемых объектов, подробные отчеты и графики можно
просмотреть с помощью web-интерфейса.
%prep
%setup -q -n %name-%version%rev
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
PATH=$PATH:/usr/sbin
%configure \
--with-nagios-user=%nagios_usr \
--with-nagios-grp=%nagios_grp \
--with-command-user=%nagios_usr \
--with-command-grp=%nagios_grp \
--with-cgiurl=/%name/cgi-bin \
--with-htmurl=/%name \
--with-init-dir=%_initdir \
--with-lockfile=/var/run/%name.pid \
--with-mail=/bin/mail \
--enable-event-broker \
--with-perlcache
%make_build all
cd contrib
%make_build all
cd ..
%install
make DESTDIR=%buildroot install
make DESTDIR=%buildroot install-commandmode
make DESTDIR=%buildroot install-config
%__mkdir_p %buildroot/%_initrddir
%__mkdir_p -m 0755 %buildroot/%_docdir/%name-%version
%__install -m 0755 %SOURCE3 %buildroot/%_initrddir/%name
# install contrib tools and docs
pushd contrib
%__mkdir_p -m 0755 %buildroot/%_libexecdir/%name/contrib
%__install -m 0755 traceroute.cgi %buildroot/%_libexecdir/%name/contrib
%__install -m 0755 mini_epn %buildroot/%_libexecdir/%name/contrib
%__install -m 0644 README %buildroot/%_docdir/%name-%version/README.contrib
popd
# install eventhandlers
%__mkdir_p -m 0755 %buildroot/%_libexecdir/%name/eventhandlers
pushd contrib/eventhandlers
for file in `/bin/find ./ -type f -print` ; do
%__install -m 0755 $file %buildroot/%_libexecdir/%name/eventhandlers
done
popd
#instal docs
%__install -m 0644 Changelog %buildroot/%_docdir/%name-%version
%__install -m 0644 INSTALLING %buildroot/%_docdir/%name-%version
%__install -m 0644 LEGAL %buildroot/%_docdir/%name-%version
%__install -m 0644 README %buildroot/%_docdir/%name-%version
%__install -m 0644 UPGRADING %buildroot/%_docdir/%name-%version
%__install -m 0644 OutputTrap.pm %buildroot/%_docdir/%name-%version
# misc
%__mkdir_p %buildroot/%_localstatedir/%name/rw
%__mkdir_p %buildroot/%_localstatedir/%name/tmp
%__mkdir_p %buildroot/var/run
/bin/touch %buildroot/var/run/%name.pid
# install web-server configs
%__mkdir_p -m 0755 %buildroot/%_sysconfdir/httpd/conf
%__install -m 0644 %SOURCE1 %buildroot/%_sysconfdir/httpd/conf
%__install -m 0640 %SOURCE2 %buildroot/%_sysconfdir/%name
%pre common
%_sbindir/groupadd -r -f %nagios_grp &>/dev/null
%_sbindir/useradd -r -n -g %nagios_grp -d %_localstatedir/%name \
-s /bin/false -c 'Nagios(R) account' %nagios_usr &>/dev/null ||:
%post
%post_service %name
%preun
%preun_service %name
%post www
if [ $1 = "1" ]; then
echo "Include conf/nagios.conf" >> %_sysconfdir/httpd/conf/httpd.conf
fi
if [ -f %_sbindir/apachectl ] ; then
%_sbindir/apachectl update
fi
%preun www
if [ $1 = "0" ]; then
%__subst "s|^Include conf/nagios.conf$||g;" \
%_sysconfdir/httpd/conf/httpd.conf
fi
%postun www
if [ -x %_sbindir/apachectl ] ; then
%_sbindir/apachectl update
fi
%files
%_initrddir/%name
%_sbindir/nagios
%_sbindir/nagiostats
%dir %_libdir/%name
%dir %_libdir/%name/contrib
%dir %_libdir/%name/eventhandlers
%_libdir/%name/contrib/*
%_libdir/%name/eventhandlers/*
%dir %_datadir/%name
#_libdir/%name/p1.pl
%dir %_docdir/%name-%version
%_docdir/%name-%version/*
%attr(0644,%nagios_usr,%nagios_grp) /var/run/%name.pid
%attr(2750,%nagios_usr,%httpd_grp) %dir %_localstatedir/%name/rw
%attr(0700,%nagios_usr,%nagios_grp) %dir %_localstatedir/%name/tmp
%files common
%dir %_sysconfdir/%name
%attr(2750,%nagios_usr,%httpd_grp) %dir %_localstatedir/%name
%attr(0640,root,%nagios_grp) %config %_sysconfdir/%name/resource.cfg
%config %_sysconfdir/%name/nagios.cfg
%config %_sysconfdir/%name/checkcommands.cfg
%config %_sysconfdir/%name/misccommands.cfg
%config %_sysconfdir/%name/bigger.cfg
%config %_sysconfdir/%name/minimal.cfg
%attr(3775,root,%nagios_grp) %dir %_localstatedir/%name
%attr(0750,%nagios_usr,%httpd_grp) %dir %_logdir/%name
%attr(0750,%nagios_usr,%httpd_grp) %dir %_logdir/%name/archives
%files www
%config %_sysconfdir/%name/cgi.cfg
%attr(0640,root,apache) %config %_sysconfdir/%name/%name.web-users
%config %_sysconfdir/httpd/conf/nagios.conf
%dir %_datadir/%name/html
%_datadir/%name/html/*
%dir %_libdir/%name
%dir %_libdir/%name/cgi
%_libdir/%name/cgi/*
%changelog
…
Full changelog you can see here
Name: nagios
Version: 2.0
Release: alt0.%rev.1
%define nagios_usr nagios
%define nagios_grp nagios
%define httpd_grp apache
Summary: Services and network monitoring system
Summary(ru_RU.KOI8-R): Система мониторинга сети и сервисов.
License: GPL
Group: Monitoring
URL: http://www.nagios.org
Source0: %name-%version%rev.tar.gz
# Apache config for Nagios(R)
Source1: %name.conf
# Apache user/password file for Nagios(R)
# contains defaults: user=nagios, password=nagios
Source2: %name.web-users
# init-script for Nagios(R)
Source3: %name.init
# fix some default paths
Patch0: %name-2.0b2-alt-makefile.patch
Patch1: %name-2.0b1-alt-eperlfix.patch
Patch2: %name-2.0b1-alt-paths.patch
Patch3: %name-2.0b1-alt-scripts.patch
Patch4: %name-2.0b3-alt-configs.patch
Patch5: %name-2.0b1-alt-cgi.patch
###########################################
# Provide the abstract service names (which are virtual pkg names),
# specify their origin (our pkg name as the epoch + version-release):
Provides: nagios
Provides: nagios-daemon = %name:%version-%release
Obsoletes: nagios < %version-%release
Obsoletes: nagios-default nagios-mysql nagios-pgsql
# Conflict with all other real pkgs which provide the same services
# (they should specify the origin the same way, so the epoch-version-release
# of the virtual pkgs POP3D & IMAPD will always differ from that of ours if
# they are provided by a different real pkg):
Conflicts: nagios-daemon < %name:%version-%release
Conflicts: nagios-daemon > %name:%version-%release
#
########################################
PreReq: %name-common = %version-%release
Requires: nagios-plugins
# Automatically added by buildreq on Sat Jan 08 2005
BuildRequires: libgd2-devel libjpeg-devel libltdl-devel libpng-devel perl-devel
BuildRequires: traceroute xorg-x11-libs zlib-devel
%description
Nagios(R) is a host and service monitor designed to inform you of network
problems before your clients, end-users or managers do. It has been
designed to run under the Linux operating system, but works fine under
most *NIX variants as well. The monitoring daemon runs intermittent
checks on hosts and services you specify using external "plugins" which
return status information to Nagios(R). When problems are encountered, the
daemon can send notifications out to administrative contacts in a variety
of different ways (email, instant message, SMS, etc.). Current status
information, historical logs, and reports can all be accessed via a web
browser.
%description -l ru_RU.KOI8-R
Nagios(R) является системой мониторинга хостов и сервисов, назначение которой
- информировать вас о проблемах в сети до того как это сделают ваши клиенты
или конечные пользователи. Nagios(R) расчитан на работу в среде ОС Linux, но
также вполне успешно работает под большинств *NIX-подобных ОС. Вся проверка
хостов/сервисов строится на основе внешних подключаемых модулей - "plug-ins".
Текущее сосотояние контролируемых объектов, подробные отчеты и графики можно
просмотреть с помощью web-интерфейса.
%package common
Summary: Services and network monitor, common files
Summary(ru_RU.KOI8-R): Система мониторинга сети и сервисов, общие файлы
Group: Monitoring
%description common
Nagios(R) is a host and service monitor designed to inform you of network
problems before your clients, end-users or managers do. It has been
designed to run under the Linux operating system, but works fine under
most *NIX variants as well. The monitoring daemon runs intermittent
checks on hosts and services you specify using external "plugins" which
return status information to Nagios(R). When problems are encountered, the
daemon can send notifications out to administrative contacts in a variety
of different ways (email, instant message, SMS, etc.). Current status
information, historical logs, and reports can all be accessed via a web
browser.
%description common -l ru_RU.KOI8-R
Nagios(R) является системой мониторинга хостов и сервисов, назначение которой
- информировать вас о проблемах в сети до того как это сделают ваши клиенты
или конечные пользователи. Nagios(R) расчитан на работу в среде ОС Linux, но
также вполне успешно работает под большинств *NIX-подобных ОС. Вся проверка
хостов/сервисов строится на основе внешних подключаемых модулей - "plug-ins".
Текущее сосотояние контролируемых объектов, подробные отчеты и графики можно
просмотреть с помощью web-интерфейса.
%package www
Summary: Services and network monitor, common files for web-interface
Summary(ru_RU.KOI8-R): Система мониторинга сети и сервисов, web-интерфейс
Group: Monitoring
PreReq: %name-common = %version-%release
Obsoletes: nagios-default-www nagios-mysql-www nagios-pgsql-www
%description www
Nagios(R) is a host and service monitor designed to inform you of network
problems before your clients, end-users or managers do. It has been
designed to run under the Linux operating system, but works fine under
most *NIX variants as well. The monitoring daemon runs intermittent
checks on hosts and services you specify using external "plugins" which
return status information to Nagios(R). When problems are encountered, the
daemon can send notifications out to administrative contacts in a variety
of different ways (email, instant message, SMS, etc.). Current status
information, historical logs, and reports can all be accessed via a web
browser.
%description www -l ru_RU.KOI8-R
Nagios(R) является системой мониторинга хостов и сервисов, назначение которой
- информировать вас о проблемах в сети до того как это сделают ваши клиенты
или конечные пользователи. Nagios(R) расчитан на работу в среде ОС Linux, но
также вполне успешно работает под большинств *NIX-подобных ОС. Вся проверка
хостов/сервисов строится на основе внешних подключаемых модулей - "plugins".
Текущее сосотояние контролируемых объектов, подробные отчеты и графики можно
просмотреть с помощью web-интерфейса.
%prep
%setup -q -n %name-%version%rev
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
PATH=$PATH:/usr/sbin
%configure \
--with-nagios-user=%nagios_usr \
--with-nagios-grp=%nagios_grp \
--with-command-user=%nagios_usr \
--with-command-grp=%nagios_grp \
--with-cgiurl=/%name/cgi-bin \
--with-htmurl=/%name \
--with-init-dir=%_initdir \
--with-lockfile=/var/run/%name.pid \
--with-mail=/bin/mail \
--enable-event-broker \
--with-perlcache
%make_build all
cd contrib
%make_build all
cd ..
%install
make DESTDIR=%buildroot install
make DESTDIR=%buildroot install-commandmode
make DESTDIR=%buildroot install-config
%__mkdir_p %buildroot/%_initrddir
%__mkdir_p -m 0755 %buildroot/%_docdir/%name-%version
%__install -m 0755 %SOURCE3 %buildroot/%_initrddir/%name
# install contrib tools and docs
pushd contrib
%__mkdir_p -m 0755 %buildroot/%_libexecdir/%name/contrib
%__install -m 0755 traceroute.cgi %buildroot/%_libexecdir/%name/contrib
%__install -m 0755 mini_epn %buildroot/%_libexecdir/%name/contrib
%__install -m 0644 README %buildroot/%_docdir/%name-%version/README.contrib
popd
# install eventhandlers
%__mkdir_p -m 0755 %buildroot/%_libexecdir/%name/eventhandlers
pushd contrib/eventhandlers
for file in `/bin/find ./ -type f -print` ; do
%__install -m 0755 $file %buildroot/%_libexecdir/%name/eventhandlers
done
popd
#instal docs
%__install -m 0644 Changelog %buildroot/%_docdir/%name-%version
%__install -m 0644 INSTALLING %buildroot/%_docdir/%name-%version
%__install -m 0644 LEGAL %buildroot/%_docdir/%name-%version
%__install -m 0644 README %buildroot/%_docdir/%name-%version
%__install -m 0644 UPGRADING %buildroot/%_docdir/%name-%version
%__install -m 0644 OutputTrap.pm %buildroot/%_docdir/%name-%version
# misc
%__mkdir_p %buildroot/%_localstatedir/%name/rw
%__mkdir_p %buildroot/%_localstatedir/%name/tmp
%__mkdir_p %buildroot/var/run
/bin/touch %buildroot/var/run/%name.pid
# install web-server configs
%__mkdir_p -m 0755 %buildroot/%_sysconfdir/httpd/conf
%__install -m 0644 %SOURCE1 %buildroot/%_sysconfdir/httpd/conf
%__install -m 0640 %SOURCE2 %buildroot/%_sysconfdir/%name
%pre common
%_sbindir/groupadd -r -f %nagios_grp &>/dev/null
%_sbindir/useradd -r -n -g %nagios_grp -d %_localstatedir/%name \
-s /bin/false -c 'Nagios(R) account' %nagios_usr &>/dev/null ||:
%post
%post_service %name
%preun
%preun_service %name
%post www
if [ $1 = "1" ]; then
echo "Include conf/nagios.conf" >> %_sysconfdir/httpd/conf/httpd.conf
fi
if [ -f %_sbindir/apachectl ] ; then
%_sbindir/apachectl update
fi
%preun www
if [ $1 = "0" ]; then
%__subst "s|^Include conf/nagios.conf$||g;" \
%_sysconfdir/httpd/conf/httpd.conf
fi
%postun www
if [ -x %_sbindir/apachectl ] ; then
%_sbindir/apachectl update
fi
%files
%_initrddir/%name
%_sbindir/nagios
%_sbindir/nagiostats
%dir %_libdir/%name
%dir %_libdir/%name/contrib
%dir %_libdir/%name/eventhandlers
%_libdir/%name/contrib/*
%_libdir/%name/eventhandlers/*
%dir %_datadir/%name
#_libdir/%name/p1.pl
%dir %_docdir/%name-%version
%_docdir/%name-%version/*
%attr(0644,%nagios_usr,%nagios_grp) /var/run/%name.pid
%attr(2750,%nagios_usr,%httpd_grp) %dir %_localstatedir/%name/rw
%attr(0700,%nagios_usr,%nagios_grp) %dir %_localstatedir/%name/tmp
%files common
%dir %_sysconfdir/%name
%attr(2750,%nagios_usr,%httpd_grp) %dir %_localstatedir/%name
%attr(0640,root,%nagios_grp) %config %_sysconfdir/%name/resource.cfg
%config %_sysconfdir/%name/nagios.cfg
%config %_sysconfdir/%name/checkcommands.cfg
%config %_sysconfdir/%name/misccommands.cfg
%config %_sysconfdir/%name/bigger.cfg
%config %_sysconfdir/%name/minimal.cfg
%attr(3775,root,%nagios_grp) %dir %_localstatedir/%name
%attr(0750,%nagios_usr,%httpd_grp) %dir %_logdir/%name
%attr(0750,%nagios_usr,%httpd_grp) %dir %_logdir/%name/archives
%files www
%config %_sysconfdir/%name/cgi.cfg
%attr(0640,root,apache) %config %_sysconfdir/%name/%name.web-users
%config %_sysconfdir/httpd/conf/nagios.conf
%dir %_datadir/%name/html
%_datadir/%name/html/*
%dir %_libdir/%name
%dir %_libdir/%name/cgi
%_libdir/%name/cgi/*
%changelog
…
Full changelog you can see here