]>
Commit | Line | Data |
---|---|---|
c4962172 | 1 | # TODO |
9ffbc0d2 | 2 | # - initscript for zabbix-agent-standalone |
c4962172 ER |
3 | # - missing zabbix_agentd.conf, zabbix_trapperd.conf |
4 | # see http://www.zabbix.com/manual_install_server.php | |
10a854a6 TO |
5 | # |
6 | # Conditional build: | |
625793cb | 7 | %bcond_with pgsql # enable PostgreSQL support (by default use mysql) |
2fe2194b MWP |
8 | %bcond_with oracle # enable Oracle support (by default use mysql) |
9 | ||
a5bb35f6 | 10 | # |
7f4b6a83 | 11 | Summary: zabbix - network monitoring software |
5750cc93 | 12 | Summary(pl.UTF-8): zabbix - oprogramowanie do monitorowania sieci |
10a854a6 | 13 | Name: zabbix |
2fe2194b MWP |
14 | Version: 1.1 |
15 | Release: 0.1 | |
10a854a6 TO |
16 | License: GPL v2+ |
17 | Group: Networking/Admin | |
b37e41ff | 18 | Source0: http://dl.sourceforge.net/zabbix/%{name}-%{version}.tar.gz |
2fe2194b | 19 | # Source0-md5: 9697e5634547d9614963db04f6cd87d7 |
10a854a6 TO |
20 | Source1: %{name}-agent.inetd |
21 | Source2: %{name}-trapper.inetd | |
22 | URL: http://zabbix.sourceforge.net/ | |
39709426 | 23 | %{!?with_pgsql:BuildRequires: mysql-devel} |
39709426 | 24 | BuildRequires: net-snmp-devel |
2886d983 | 25 | BuildRequires: openssl-devel >= 0.9.7d |
9ffbc0d2 | 26 | %{?with_pgsql:BuildRequires: postgresql-devel} |
96b8972f | 27 | BuildRequires: rpmbuild(macros) >= 1.268 |
9ffbc0d2 ER |
28 | Requires(postun): /usr/sbin/groupdel |
29 | Requires(postun): /usr/sbin/userdel | |
a5bb35f6 | 30 | Requires(pre): /bin/id |
9b19117f | 31 | Requires(pre): /usr/bin/getgid |
a5bb35f6 JB |
32 | Requires(pre): /usr/sbin/groupadd |
33 | Requires(pre): /usr/sbin/useradd | |
9b19117f | 34 | Provides: group(zabbix) |
35 | Provides: user(zabbix) | |
10a854a6 TO |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
a5bb35f6 | 38 | %define _sysconfdir /etc/%{name} |
c4962172 | 39 | %define htmldir /home/services/httpd/html/%{name} |
10a854a6 TO |
40 | |
41 | %description | |
b82afc4b | 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 | |
7f4b6a83 | 45 | notification mechanism that allows users to configure email based |
46 | alerts for virtually any event. All monitored parameters are stored in | |
b82afc4b | 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 | |
7f4b6a83 | 50 | parameters, are accessed through a web-based front end. |
51 | ||
ff14176a JR |
52 | %description -l pl.UTF-8 |
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 | |
7f4b6a83 | 62 | interfejs oparty o WWW. |
10a854a6 | 63 | |
10a854a6 TO |
64 | %package frontend-php |
65 | Summary: PHP frontend for zabbix | |
5750cc93 | 66 | Summary(pl.UTF-8): Interfejs PHP dla zabbiksa |
10a854a6 | 67 | Group: Networking/Admin |
5a54ac94 | 68 | Requires: php(gd) |
b3dbd86e PG |
69 | %{!?with_pgsql:Requires: php-mysql} |
70 | %{?with_pgsql:Requires: php-pgsql} | |
9ffbc0d2 | 71 | Requires: webserver = apache |
5a54ac94 | 72 | Requires: webserver(php) |
10a854a6 TO |
73 | |
74 | %description frontend-php | |
90e6d4b1 AG |
75 | This package provides web based (PHP) frontend for zabbix. |
76 | ||
ff14176a | 77 | %description frontend-php -l pl.UTF-8 |
90e6d4b1 | 78 | Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa. |
10a854a6 TO |
79 | |
80 | %package agent-inetd | |
81 | Summary: inetd agent for zabbix | |
5750cc93 | 82 | Summary(pl.UTF-8): Wersja inetd agenta zabbiksa |
10a854a6 | 83 | Group: Networking/Admin |
b37e41ff | 84 | Requires: %{name} = %{version}-%{release} |
10a854a6 | 85 | Requires: inetdaemon |
96b8972f | 86 | Obsoletes: zabbix-agent-standalone |
10a854a6 TO |
87 | |
88 | %description agent-inetd | |
90e6d4b1 AG |
89 | This package provides inetd version of zabbix agent. |
90 | ||
ff14176a | 91 | %description agent-inetd -l pl.UTF-8 |
90e6d4b1 | 92 | Ten pakiet dostarcza agenta zabbiksa dla inetd. |
10a854a6 TO |
93 | |
94 | %package agent-standalone | |
7f4b6a83 | 95 | Summary: Standalone agent for zabbix |
5750cc93 | 96 | Summary(pl.UTF-8): Wersja wolnostojąca agenta zabbiksa |
10a854a6 | 97 | Group: Networking/Admin |
b37e41ff | 98 | Requires: %{name} = %{version}-%{release} |
96b8972f | 99 | Obsoletes: zabbix-agent-inetd |
10a854a6 | 100 | |
80945b42 | 101 | %description agent-standalone |
90e6d4b1 AG |
102 | This package provides standalone version of zabbix agent. |
103 | ||
ff14176a JR |
104 | %description agent-standalone -l pl.UTF-8 |
105 | Ten pakiet dostarcza wolnostojącej wersji agenta zabbiksa. | |
10a854a6 TO |
106 | |
107 | %package suckerd | |
108 | Summary: sucker daemon for zabbix | |
5750cc93 | 109 | Summary(pl.UTF-8): Demon sucker dla zabbiksa |
10a854a6 | 110 | Group: Networking/Admin |
b37e41ff | 111 | Requires: %{name} = %{version}-%{release} |
39709426 | 112 | %{!?with_pgsql:Requires: mysql} |
113 | %{?with_pgsql:Requires: postgresql} | |
10a854a6 TO |
114 | |
115 | %description suckerd | |
39709426 | 116 | This package provides the sucker daemon for zabbix. |
10a854a6 | 117 | |
ff14176a | 118 | %description suckerd -l pl.UTF-8 |
a5bb35f6 JB |
119 | Ten pakiet zawiera demona sucker dla zabbiksa. |
120 | ||
10a854a6 TO |
121 | %package trapper-inetd |
122 | Summary: inetd trapper for zabbix | |
5750cc93 | 123 | Summary(pl.UTF-8): Wersja inetd programu pułapkującego zabbiksa |
10a854a6 | 124 | Group: Networking/Admin |
b37e41ff | 125 | Requires: %{name} = %{version}-%{release} |
10a854a6 | 126 | Requires: inetdaemon |
96b8972f | 127 | Obsoletes: zabbix-trapper-standalone |
10a854a6 | 128 | |
39709426 | 129 | %description trapper-inetd |
130 | This package provides inetd version of zabbix trapper. | |
131 | ||
ff14176a JR |
132 | %description trapper-inetd -l pl.UTF-8 |
133 | Ten pakiet zawiera program pułapkujący zabbiksa dla inetd. | |
a5bb35f6 | 134 | |
10a854a6 | 135 | %package trapper-standalone |
7f4b6a83 | 136 | Summary: Standalone trapper for zabbix |
5750cc93 | 137 | Summary(pl.UTF-8): Wersja wolnostojąca programu pułapkującego zabbiksa |
10a854a6 | 138 | Group: Networking/Admin |
b37e41ff | 139 | Requires: %{name} = %{version}-%{release} |
96b8972f | 140 | Obsoletes: zabbix-trapper-inetd |
10a854a6 TO |
141 | |
142 | %description trapper-standalone | |
39709426 | 143 | This package provides standalone version of zabbix trapper. |
10a854a6 | 144 | |
ff14176a JR |
145 | %description trapper-standalone -l pl.UTF-8 |
146 | Ten pakiet zawiera wolnostojącą wersję programu pułapkującego | |
a5bb35f6 JB |
147 | zabbiksa. |
148 | ||
10a854a6 TO |
149 | %package sender |
150 | Summary: zabbix's sender | |
5750cc93 | 151 | Summary(pl.UTF-8): Program zawiadamiający zabbiksa |
10a854a6 TO |
152 | Group: Networking/Admin |
153 | ||
154 | %description sender | |
39709426 | 155 | This package provides the zabbix sender. |
10a854a6 | 156 | |
ff14176a JR |
157 | %description sender -l pl.UTF-8 |
158 | Ten pakiet zawiera program zawiadamiający zabbiksa. | |
a5bb35f6 | 159 | |
10a854a6 | 160 | %prep |
5d18cc59 | 161 | %setup -q |
10a854a6 TO |
162 | |
163 | %build | |
10a854a6 | 164 | %configure \ |
39709426 | 165 | %{!?with_pgsql:--with-mysql} \ |
166 | %{?with_pgsql:--with-pgsql} \ | |
2fe2194b MWP |
167 | %{?with_oracle:--with-oracle} \ |
168 | --enable-server \ | |
169 | --enable-agent \ | |
170 | --with-net-snmp \ | |
171 | # --with-ldap=DIR \ | |
172 | # --with-ucd-snmp=DIR \ | |
10a854a6 TO |
173 | |
174 | %{__make} | |
175 | ||
176 | %install | |
177 | rm -rf $RPM_BUILD_ROOT | |
10a854a6 | 178 | |
2fe2194b MWP |
179 | %{__make} install \ |
180 | DESTDIR=$RPM_BUILD_ROOT | |
10a854a6 | 181 | |
2fe2194b MWP |
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 | |
10a854a6 TO |
188 | |
189 | %clean | |
190 | rm -rf $RPM_BUILD_ROOT | |
191 | ||
e9e15753 | 192 | %pre |
78794d78 ER |
193 | %groupadd -g 111 zabbix |
194 | %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix | |
10a854a6 | 195 | |
c4962172 | 196 | %post |
96b8972f | 197 | if [ "$1" = 1 ]; then |
c4962172 ER |
198 | %banner -e %{name} <<-EOF |
199 | You should create database for Zabbix. | |
200 | Running these should be fine in most cases: | |
201 | %if %{with pgsql} | |
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 | |
205 | %else | |
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 | |
209 | %endif | |
210 | %{?TODO:You also need zabbix-agent. install zabbix-agent-standalone %or zabbix-agent-inetd.} | |
211 | EOF | |
96b8972f | 212 | fi |
c4962172 | 213 | |
e9e15753 | 214 | %postun |
10a854a6 | 215 | if [ "$1" = "0" ]; then |
9b19117f | 216 | %userremove zabbix |
217 | %groupremove zabbix | |
10a854a6 TO |
218 | fi |
219 | ||
220 | %post agent-inetd | |
96b8972f | 221 | %service -q rc-inetd reload |
10a854a6 TO |
222 | |
223 | %postun agent-inetd | |
96b8972f ER |
224 | if [ "$1" = 0 ]; then |
225 | %service -q rc-inetd reload | |
10a854a6 TO |
226 | fi |
227 | ||
228 | %post trapper-inetd | |
96b8972f | 229 | %service -q rc-inetd reload |
10a854a6 TO |
230 | |
231 | %postun trapper-inetd | |
96b8972f ER |
232 | if [ "$1" = 0 ]; then |
233 | %service -q rc-inetd reload | |
10a854a6 TO |
234 | fi |
235 | ||
236 | %files | |
237 | %defattr(644,root,root,755) | |
5d18cc59 | 238 | %doc doc/Zabbix\ Manual.pdf AUTHORS NEWS README ChangeLog create upgrades bin/ZabbixW32.exe |
10a854a6 TO |
239 | %attr(750,root,zabbix) %dir %{_sysconfdir} |
240 | ||
241 | %files frontend-php | |
242 | %defattr(644,root,root,755) | |
c4962172 ER |
243 | %dir %{htmldir} |
244 | %{htmldir}/*.php | |
245 | %{htmldir}/*.css | |
246 | %{htmldir}/audio | |
247 | %{htmldir}/images | |
248 | ||
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 | |
10a854a6 TO |
255 | |
256 | %files agent-inetd | |
257 | %defattr(644,root,root,755) | |
258 | %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf | |
9ffbc0d2 | 259 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/zabbix-agent |
10a854a6 TO |
260 | %attr(755,root,root) %{_sbindir}/zabbix_agent |
261 | ||
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 | |
266 | ||
267 | %files suckerd | |
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 | |
271 | ||
272 | %files trapper-inetd | |
273 | %defattr(644,root,root,755) | |
274 | %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapper.conf | |
9ffbc0d2 | 275 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/zabbix-trapper |
10a854a6 TO |
276 | %attr(755,root,root) %{_sbindir}/zabbix_trapper |
277 | ||
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 | |
282 | ||
283 | %files sender | |
284 | %defattr(644,root,root,755) | |
285 | %attr(755,root,root) %{_sbindir}/zabbix_sender |