2 # - initscript for zabbix-agent-standalone
3 # - missing zabbix_agentd.conf, zabbix_trapperd.conf
4 # see http://www.zabbix.com/manual_install_server.php
7 %bcond_with pgsql # enable PostgreSQL support (by default use mysql)
8 %bcond_with oracle # enable Oracle support (by default use mysql)
11 Summary: zabbix - network monitoring software
12 Summary(pl): zabbix - oprogramowanie do monitorowania sieci
17 Group: Networking/Admin
18 Source0: http://dl.sourceforge.net/zabbix/%{name}-%{version}.tar.gz
19 # Source0-md5: 9697e5634547d9614963db04f6cd87d7
20 Source1: %{name}-agent.inetd
21 Source2: %{name}-trapper.inetd
22 URL: http://zabbix.sourceforge.net/
23 %{!?with_pgsql:BuildRequires: mysql-devel}
24 BuildRequires: net-snmp-devel
25 BuildRequires: openssl-devel >= 0.9.7d
26 %{?with_pgsql:BuildRequires: postgresql-devel}
27 BuildRequires: rpmbuild(macros) >= 1.268
28 Requires(postun): /usr/sbin/groupdel
29 Requires(postun): /usr/sbin/userdel
30 Requires(pre): /bin/id
31 Requires(pre): /usr/bin/getgid
32 Requires(pre): /usr/sbin/groupadd
33 Requires(pre): /usr/sbin/useradd
34 Provides: group(zabbix)
35 Provides: user(zabbix)
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define _sysconfdir /etc/%{name}
39 %define htmldir /home/services/httpd/html/%{name}
42 zabbix is software that monitors numerous parameters of a network and
43 the servers on that network. zabbix is a useful tool for monitoring
44 the health and integrity of servers. zabbix uses a flexible
45 notification mechanism that allows users to configure email based
46 alerts for virtually any event. All monitored parameters are stored in
47 a database. zabbix offers excellent reporting and data visualisation
48 features based on the stored data. zabbix supports both polling and
49 trapping. All zabbix reports and statistics, as well as configuration
50 parameters, are accessed through a web-based front end.
53 zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
54 serwerów sieciowych. zabbix jest przydatny przy monitorowaniu
55 dzia³ania serwerów. zabbix korzysta z elastycznego mechanizmu
56 powiadamiania, który pozwala u¿ytkownikom konfigurowaæ powiadamianie
57 poczt± elektroniczn± dla praktycznie wszelkich zdarzeñ. Monitorowane
58 parametry s± przechowywane w bazie danych. zabbix oferuje, w oparciu o
59 przechowywane dane, ¶wietne raportowanie i funkcje wizualizacji.
60 zabbix wspiera zarówno odpytywanie, jak i pu³apkowanie. Dostêp do
61 wszystkich raportów i statystyk zabbiksa jest mo¿liwy poprzez
62 interfejs oparty o WWW.
65 Summary: PHP frontend for zabbix
66 Summary(pl): Interfejs PHP dla zabbiksa
67 Group: Networking/Admin
69 %{!?with_pgsql:Requires: php-mysql}
70 %{?with_pgsql:Requires: php-pgsql}
71 Requires: webserver = apache
72 Requires: webserver(php)
74 %description frontend-php
75 This package provides web based (PHP) frontend for zabbix.
77 %description frontend-php -l pl
78 Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa.
81 Summary: inetd agent for zabbix
82 Summary(pl): Wersja inetd agenta zabbiksa
83 Group: Networking/Admin
84 Requires: %{name} = %{version}-%{release}
86 Obsoletes: zabbix-agent-standalone
88 %description agent-inetd
89 This package provides inetd version of zabbix agent.
91 %description agent-inetd -l pl
92 Ten pakiet dostarcza agenta zabbiksa dla inetd.
94 %package agent-standalone
95 Summary: Standalone agent for zabbix
96 Summary(pl): Wersja wolnostoj±ca agenta zabbiksa
97 Group: Networking/Admin
98 Requires: %{name} = %{version}-%{release}
99 Obsoletes: zabbix-agent-inetd
101 %description agent-standalone
102 This package provides standalone version of zabbix agent.
104 %description agent-standalone -l pl
105 Ten pakiet dostarcza wolnostoj±cej wersji agenta zabbiksa.
108 Summary: sucker daemon for zabbix
109 Summary(pl): Demon sucker dla zabbiksa
110 Group: Networking/Admin
111 Requires: %{name} = %{version}-%{release}
112 %{!?with_pgsql:Requires: mysql}
113 %{?with_pgsql:Requires: postgresql}
116 This package provides the sucker daemon for zabbix.
118 %description suckerd -l pl
119 Ten pakiet zawiera demona sucker dla zabbiksa.
121 %package trapper-inetd
122 Summary: inetd trapper for zabbix
123 Summary(pl): Wersja inetd programu pu³apkuj±cego zabbiksa
124 Group: Networking/Admin
125 Requires: %{name} = %{version}-%{release}
127 Obsoletes: zabbix-trapper-standalone
129 %description trapper-inetd
130 This package provides inetd version of zabbix trapper.
132 %description trapper-inetd -l pl
133 Ten pakiet zawiera program pu³apkuj±cy zabbiksa dla inetd.
135 %package trapper-standalone
136 Summary: Standalone trapper for zabbix
137 Summary(pl): Wersja wolnostoj±ca programu pu³apkuj±cego zabbiksa
138 Group: Networking/Admin
139 Requires: %{name} = %{version}-%{release}
140 Obsoletes: zabbix-trapper-inetd
142 %description trapper-standalone
143 This package provides standalone version of zabbix trapper.
145 %description trapper-standalone -l pl
146 Ten pakiet zawiera wolnostoj±c± wersjê programu pu³apkuj±cego
150 Summary: zabbix's sender
151 Summary(pl): Program zawiadamiaj±cy zabbiksa
152 Group: Networking/Admin
155 This package provides the zabbix sender.
157 %description sender -l pl
158 Ten pakiet zawiera program zawiadamiaj±cy zabbiksa.
165 %{!?with_pgsql:--with-mysql} \
166 %{?with_pgsql:--with-pgsql} \
167 %{?with_oracle:--with-oracle} \
172 # --with-ucd-snmp=DIR \
177 rm -rf $RPM_BUILD_ROOT
180 DESTDIR=$RPM_BUILD_ROOT
182 #install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},%{htmldir}}
183 #install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir}
184 #install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}
185 #cp -r frontends/php/* $RPM_BUILD_ROOT%{htmldir}
186 #install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
187 #install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
190 rm -rf $RPM_BUILD_ROOT
193 %groupadd -g 111 zabbix
194 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
197 if [ "$1" = 1 ]; then
198 %banner -e %{name} <<-EOF
199 You should create database for Zabbix.
200 Running these should be fine in most cases:
202 psql -c 'create database zabbix'
203 zcat %{_docdir}/%{name}-%{version}/create/pgsql/schema.sql.gz | psql zabbix
204 zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | psql zabbix
206 mysqladmin create zabbix
207 zcat %{_docdir}/%{name}-%{version}/create/mysql/schema.sql.gz | mysql zabbix
208 zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | mysql zabbix
210 %{?TODO:You also need zabbix-agent. install zabbix-agent-standalone %or zabbix-agent-inetd.}
215 if [ "$1" = "0" ]; then
221 %service -q rc-inetd reload
224 if [ "$1" = 0 ]; then
225 %service -q rc-inetd reload
229 %service -q rc-inetd reload
231 %postun trapper-inetd
232 if [ "$1" = 0 ]; then
233 %service -q rc-inetd reload
237 %defattr(644,root,root,755)
238 %doc doc/Zabbix\ Manual.pdf AUTHORS NEWS README ChangeLog create upgrades bin/ZabbixW32.exe
239 %attr(750,root,zabbix) %dir %{_sysconfdir}
242 %defattr(644,root,root,755)
249 %dir %{htmldir}/include
250 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{htmldir}/include/db.inc.php
251 %{htmldir}/include/.htaccess
252 %{htmldir}/include/classes.inc.php
253 %{htmldir}/include/config.inc.php
254 %{htmldir}/include/defines.inc.php
257 %defattr(644,root,root,755)
258 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf
259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/zabbix-agent
260 %attr(755,root,root) %{_sbindir}/zabbix_agent
262 %files agent-standalone
263 %defattr(644,root,root,755)
264 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
265 %attr(755,root,root) %{_sbindir}/zabbix_agentd
268 %defattr(644,root,root,755)
269 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_suckerd.conf
270 %attr(755,root,root) %{_sbindir}/zabbix_suckerd
273 %defattr(644,root,root,755)
274 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapper.conf
275 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/zabbix-trapper
276 %attr(755,root,root) %{_sbindir}/zabbix_trapper
278 %files trapper-standalone
279 %defattr(644,root,root,755)
280 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapperd.conf
281 %attr(755,root,root) %{_sbindir}/zabbix_trapperd
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_sbindir}/zabbix_sender