3 %bcond_with pgsql # enable pgsql support
4 %bcond_with mysql # enable mysql support
5 %bcond_without gd # without statusmap and trends, which require gd library
8 # - remove *-sample from /etc - move it to %doc or place without "-sample" suffix
9 Summary: Host/service/network monitoring program
10 Summary(pl): Program do monitorowania serwerów/us³ug/sieci
11 Summary(pt_BR): Programa para monitoração de máquinas e serviços
17 Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
18 # Source0-md5: 414d70e5269d5b8d7c21bf3ee129309f
19 Source1: %{name}-apache.conf
21 Patch0: %{name}-pgsql.patch
22 URL: http://www.nagios.org/
23 BuildRequires: autoconf
24 BuildRequires: automake
25 %{?with_gd:BuildRequires: gd-devel}
26 %{?with_mysql:BuildRequires: mysql-devel}
27 %{?with_pgsql:BuildRequires: postgresql-devel}
30 Requires(pre): /usr/bin/getgid
31 Requires(pre): /bin/id
32 Requires(pre): /usr/sbin/groupadd
33 Requires(pre): /usr/sbin/useradd
34 Requires(post,postun): /sbin/chkconfig
35 Conflicts: iputils-ping < 1:ss020124
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _sysconfdir /etc/%{name}
40 %define _bindir %{_prefix}/sbin
41 %define _sbindir %{_libdir}/%{name}/cgi
42 %define _datadir %{_prefix}/share/%{name}
43 %define _localstatedir /var/lib/%{name}
46 Nagios is a program that will monitor hosts and services on your
47 network. It has the ability to email or page you when a problem arises
48 and when a problem is resolved. Nagios is written in C and is designed
49 to run under Linux (and some other *NIX variants) as a background
50 process, intermittently running checks on various services that you
53 The actual service checks are performed by separate "plugin" programs
54 which return the status of the checks to Nagios. The plugins are
55 available in nagios-plugins packages.
57 Nagios is successor to NetSaint.
60 Nagios to program, który monitoruje serwery oraz us³ugi w naszej
61 sieci. Posiada on mo¿liwo¶æ wysy³ania informacji o wyst±pieniu oraz
62 rozwi±zaniu problemu. Nagios zosta³ napisany w C oraz jest
63 zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami)
64 jako proces pracuj±cy w tle i bezustannie wykonuj±cy pewne operacje
67 W³a¶ciwe sprawdzanie jest wykonywane przez osobne programy
68 ("wtyczki"), które zwracaj± informacje o statusie do Nagiosa. Wtyczki
69 s± dostêpne na stronie w pakietach nagios-plugins.
71 Nagios jest nastêpc± NetSainta.
74 O Nagios é um programa que monitora máquinas e serviços na sua rede.
75 Ele pode enviar um email ou um aviso de pager para o administrador
76 quando surgir um problema e quando ele for resolvido. Nagios é escrito
77 em C e foi desenvolvido para rodar em plataformas Linux (e algumas
78 variações de *NIX) como um processo em segundo plano, periodicamente
79 executando checagens nos diversos serviços que forem especificados.
82 Summary: CGI webinterface for Nagios
83 Summary(pl): Interfejs WWW/CGI dla Nagiosa
85 # for dirs... and accessing local logs(?)
86 Requires: %{name} = %{version}
90 CGI webinterface for Nagios.
92 %description cgi -l pl
93 Interfejs CGI dla Nagiosa.
96 Summary: Include files that Netsaint-related applications may compile against
97 Summary(pl): Pliki nag³ówkowe, wykorzystywane przez aplikacje nagiosa
98 Summary(pt_BR): Arquivos de cabeçalho necessários para desenvolvimento de aplicativos para o Nagios
99 Group: Development/Libraries
100 # doesn't require base
103 This package provides include files that Netsaint-related applications
106 %description devel -l pl
107 Ten pakiet dostarcza pliki nag³ówkowe, które mog± byæ wykorzystywane
108 przez aplikacje zwi±zane z nagiosem podczas kompilacji.
110 %description devel -l pt_BR
111 Este pacote contém arquivos de cabeçalho usados no desenvolvimento de
112 aplicativos para o Nagios.
116 %{?with_pgsql:%patch -p1}
122 --with-nagios-user=%{name} \
123 --with-nagios-grp=%{name} \
124 --with-command-user=nobody \
125 --with-command-grp=nobody \
126 --with-lockfile=/var/run/%{name}.pid \
127 --with-ping_command='/bin/ping -n %%s -c %%d' \
128 %{?with_mysql:--with-mysql-xdata --with-mysql-status --with-mysql-comments --with-mysql-extinfo --with-mysql-retention --with-mysql-downtime --with-mysql-lib=%{_libdir} --with-mysql-inc=%{_includedir}/mysql} \
129 %{?with_pgsql:--with-pgsql-xdata --with-pgsql-status --with-pgsql-comments --with-pgsql-extinfo --with-pgsql-retention --with-pgsql-downtime--with-pgsql-lib=%{_libdir} --with-pgsql-inc=%{_includedir}/postgresql} \
130 %{!?with_gd:--disable-statusmap --disable-trends}
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,httpd},%{_includedir}/%{name},%{_libdir}/%{name}/plugins} \
137 $RPM_BUILD_ROOT{%{_var}/log/%{name},%{_localstatedir}}
139 install common/locations.h $RPM_BUILD_ROOT%{_includedir}/%{name}
141 %{__make} install install-html install-config install-init install-commandmode fullinstall \
142 DESTDIR=$RPM_BUILD_ROOT \
147 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
148 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
151 rm -rf $RPM_BUILD_ROOT
154 if [ -n "`getgid %{name}`" ]; then
155 if [ "`getgid %{name}`" != "72" ]; then
156 echo "Error: group %{name} doesn't have gid=72. Correct this before installing %{name}." 1>&2
160 /usr/sbin/groupadd -g 72 -f %{name}
162 if [ -n "`id -u %{name} 2>/dev/null`" ]; then
163 if [ "`id -u %{name}`" != "72" ]; then
164 echo "Error: user %{name} doesn't have uid=72. Correct this before installing %{name}." 1>&2
168 /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{name} %{name} 1>&2
172 /sbin/chkconfig --add %{name}
173 if [ -f /var/lock/subsys/%{name} ]; then
174 /etc/rc.d/init.d/%{name} restart 1>&2
178 if [ "$1" = "0" ] ; then
179 if [ -f /var/lock/subsys/%{name} ]; then
180 /etc/rc.d/init.d/%{name} stop 1>&2
182 /sbin/chkconfig --del %{name}
186 if [ "$1" = "0" ]; then
187 /usr/sbin/userdel %{name}
188 /usr/sbin/groupdel %{name}
192 %defattr(644,root,root,755)
193 %doc Changelog README* UPGRADING contrib/database
194 %attr(754,root,root) /etc/rc.d/init.d/%{name}
195 %attr(751,root,nagios) %dir %{_sysconfdir}
196 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/[!c]*
197 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/c[!g]*
198 %dir %{_libdir}/%{name}
199 %dir %{_libdir}/%{name}/plugins
200 %attr(755,root,root) %{_bindir}/%{name}
201 %attr(771,nagios,http) %{_var}/log/%{name}
202 %attr(775,nagios,nagios) %dir %{_localstatedir}
203 %attr(775,nagios,nagios) %dir %{_localstatedir}/archives
204 %attr(2775,nagios,http) %dir %{_localstatedir}/rw
207 %defattr(644,root,root,755)
208 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
209 %attr(644,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/cgi.cfg-sample
210 %dir %{_libdir}/%{name}/cgi
211 %attr(755,root,root) %{_libdir}/%{name}/cgi/*.cgi
215 %defattr(644,root,root,755)
216 %dir %{_includedir}/%{name}
217 %{_includedir}/%{name}/*.h