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)
9 Summary: zabbix - network monitoring software
10 Summary(pl): zabbix - oprogramowanie do monitorowania sieci
15 Group: Networking/Admin
16 Source0: http://dl.sourceforge.net/zabbix/%{name}-%{version}.tar.gz
17 # Source0-md5: e83a3b92f13942081ed2f3fe3f3084d8
18 Source1: %{name}-agent.inetd
19 Source2: %{name}-trapper.inetd
20 URL: http://zabbix.sourceforge.net/
21 %{!?with_pgsql:BuildRequires: mysql-devel}
22 %{?with_pgsql:BuildRequires: postgresql-devel}
23 BuildRequires: net-snmp-devel
24 BuildRequires: openssl-devel >= 0.9.7d
25 BuildRequires: rpmbuild(macros) >= 1.194
26 Requires(pre): /bin/id
27 Requires(pre): /usr/bin/getgid
28 Requires(pre): /usr/sbin/groupadd
29 Requires(pre): /usr/sbin/useradd
30 Requires(postun): /usr/sbin/groupdel
31 Requires(postun): /usr/sbin/userdel
32 Provides: group(zabbix)
33 Provides: user(zabbix)
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _sysconfdir /etc/%{name}
37 %define htmldir /home/services/httpd/html/%{name}
40 zabbix is software that monitors numerous parameters of a network and
41 the servers on that network. zabbix is a useful tool for monitoring
42 the health and integrity of servers. zabbix uses a flexible
43 notification mechanism that allows users to configure email based
44 alerts for virtually any event. All monitored parameters are stored in
45 a database. zabbix offers excellent reporting and data visualisation
46 features based on the stored data. zabbix supports both polling and
47 trapping. All zabbix reports and statistics, as well as configuration
48 parameters, are accessed through a web-based front end.
51 zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
52 serwerów sieciowych. zabbix jest przydatny przy monitorowaniu
53 dzia³ania serwerów. zabbix korzysta z elastycznego mechanizmu
54 powiadamiania, który pozwala u¿ytkownikom konfigurowaæ powiadamianie
55 poczt± elektroniczn± dla praktycznie wszelkich zdarzeñ. Monitorowane
56 parametry s± przechowywane w bazie danych. zabbix oferuje, w oparciu o
57 przechowywane dane, ¶wietne raportowanie i funkcje wizualizacji.
58 zabbix wspiera zarówno odpytywanie, jak i pu³apkowanie. Dostêp do
59 wszystkich raportów i statystyk zabbiksa jest mo¿liwy poprzez
60 interfejs oparty o WWW.
63 Summary: PHP frontend for zabbix
64 Summary(pl): Interfejs PHP dla zabbiksa
65 Group: Networking/Admin
66 Requires: webserver = apache
69 %{!?with_pgsql:Requires: php-mysql}
70 %{?with_pgsql:Requires: php-pgsql}
72 %description frontend-php
73 This package provides web based (PHP) frontend for zabbix.
75 %description frontend-php -l pl
76 Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa.
79 Summary: inetd agent for zabbix
80 Summary(pl): Wersja inetd agenta zabbiksa
81 Group: Networking/Admin
82 Requires: %{name} = %{version}-%{release}
84 Obsoletes: %{name}-agent-standalone
86 %description agent-inetd
87 This package provides inetd version of zabbix agent.
89 %description agent-inetd -l pl
90 Ten pakiet dostarcza agenta zabbiksa dla inetd.
92 %package agent-standalone
93 Summary: Standalone agent for zabbix
94 Summary(pl): Wersja wolnostoj±ca agenta zabbiksa
95 Group: Networking/Admin
96 Requires: %{name} = %{version}-%{release}
97 Obsoletes: %{name}-agent-inetd
99 %description agent-standalone
100 This package provides standalone version of zabbix agent.
102 %description agent-standalone -l pl
103 Ten pakiet dostarcza wolnostoj±cej wersji agenta zabbiksa.
106 Summary: sucker daemon for zabbix
107 Summary(pl): Demon sucker dla zabbiksa
108 Group: Networking/Admin
109 Requires: %{name} = %{version}-%{release}
110 %{!?with_pgsql:Requires: mysql}
111 %{?with_pgsql:Requires: postgresql}
114 This package provides the sucker daemon for zabbix.
116 %description suckerd -l pl
117 Ten pakiet zawiera demona sucker dla zabbiksa.
119 %package trapper-inetd
120 Summary: inetd trapper for zabbix
121 Summary(pl): Wersja inetd programu pu³apkuj±cego zabbiksa
122 Group: Networking/Admin
123 Requires: %{name} = %{version}-%{release}
125 Obsoletes: %{name}-trapper-standalone
127 %description trapper-inetd
128 This package provides inetd version of zabbix trapper.
130 %description trapper-inetd -l pl
131 Ten pakiet zawiera program pu³apkuj±cy zabbiksa dla inetd.
133 %package trapper-standalone
134 Summary: Standalone trapper for zabbix
135 Summary(pl): Wersja wolnostoj±ca programu pu³apkuj±cego zabbiksa
136 Group: Networking/Admin
137 Requires: %{name} = %{version}-%{release}
138 Obsoletes: %{name}-trapper-inetd
140 %description trapper-standalone
141 This package provides standalone version of zabbix trapper.
143 %description trapper-standalone -l pl
144 Ten pakiet zawiera wolnostoj±c± wersjê programu pu³apkuj±cego
148 Summary: zabbix's sender
149 Summary(pl): Program zawiadamiaj±cy zabbiksa
150 Group: Networking/Admin
153 This package provides the zabbix sender.
155 %description sender -l pl
156 Ten pakiet zawiera program zawiadamiaj±cy zabbiksa.
163 %{!?with_pgsql:--with-mysql} \
164 %{?with_pgsql:--with-pgsql} \
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},%{htmldir}}
173 install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir}
174 install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}
175 cp -r frontends/php/* $RPM_BUILD_ROOT%{htmldir}
177 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
178 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
181 rm -rf $RPM_BUILD_ROOT
184 %groupadd -g 111 zabbix
185 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
188 #if [ "$1" = 1 ]; then
189 %banner -e %{name} <<-EOF
190 You should create database for Zabbix.
191 Running these should be fine in most cases:
193 psql -c 'create database zabbix'
194 zcat %{_docdir}/%{name}-%{version}/create/pgsql/schema.sql.gz | psql zabbix
195 zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | psql zabbix
197 mysqladmin create zabbix
198 zcat %{_docdir}/%{name}-%{version}/create/mysql/schema.sql.gz | mysql zabbix
199 zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | mysql zabbix
201 %{?TODO:You also need zabbix-agent. install zabbix-agent-standalone %or zabbix-agent-inetd.}
206 if [ "$1" = "0" ]; then
212 if [ -f /var/lock/subsys/rc-inetd ]; then
213 /etc/rc.d/init.d/rc-inetd reload
215 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
219 if [ -f /var/lock/subsys/rc-inetd ]; then
220 /etc/rc.d/init.d/rc-inetd reload
224 if [ -f /var/lock/subsys/rc-inetd ]; then
225 /etc/rc.d/init.d/rc-inetd reload
227 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
230 %postun trapper-inetd
231 if [ -f /var/lock/subsys/rc-inetd ]; then
232 /etc/rc.d/init.d/rc-inetd reload
236 %defattr(644,root,root,755)
237 %doc doc/Zabbix\ Manual.pdf AUTHORS NEWS README ChangeLog create upgrades bin/ZabbixW32.exe
238 %attr(750,root,zabbix) %dir %{_sysconfdir}
241 %defattr(644,root,root,755)
248 %dir %{htmldir}/include
249 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{htmldir}/include/db.inc.php
250 %{htmldir}/include/.htaccess
251 %{htmldir}/include/classes.inc.php
252 %{htmldir}/include/config.inc.php
253 %{htmldir}/include/defines.inc.php
256 %defattr(644,root,root,755)
257 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf
258 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-agent
259 %attr(755,root,root) %{_sbindir}/zabbix_agent
261 %files agent-standalone
262 %defattr(644,root,root,755)
263 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
264 %attr(755,root,root) %{_sbindir}/zabbix_agentd
267 %defattr(644,root,root,755)
268 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_suckerd.conf
269 %attr(755,root,root) %{_sbindir}/zabbix_suckerd
272 %defattr(644,root,root,755)
273 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapper.conf
274 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-trapper
275 %attr(755,root,root) %{_sbindir}/zabbix_trapper
277 %files trapper-standalone
278 %defattr(644,root,root,755)
279 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapperd.conf
280 %attr(755,root,root) %{_sbindir}/zabbix_trapperd
283 %defattr(644,root,root,755)
284 %attr(755,root,root) %{_sbindir}/zabbix_sender