]>
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 |
a7e2963d | 14 | Version: 1.1.7 |
15 | Release: 1 | |
10a854a6 TO |
16 | License: GPL v2+ |
17 | Group: Networking/Admin | |
b37e41ff | 18 | Source0: http://dl.sourceforge.net/zabbix/%{name}-%{version}.tar.gz |
a7e2963d | 19 | # Source0-md5: ac24ab58ef1a985c1e2a5217386d5dba |
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 agent-inetd |
65 | Summary: inetd agent for zabbix | |
5750cc93 | 66 | Summary(pl.UTF-8): Wersja inetd agenta zabbiksa |
10a854a6 | 67 | Group: Networking/Admin |
b37e41ff | 68 | Requires: %{name} = %{version}-%{release} |
10a854a6 | 69 | Requires: inetdaemon |
96b8972f | 70 | Obsoletes: zabbix-agent-standalone |
10a854a6 TO |
71 | |
72 | %description agent-inetd | |
90e6d4b1 AG |
73 | This package provides inetd version of zabbix agent. |
74 | ||
ff14176a | 75 | %description agent-inetd -l pl.UTF-8 |
90e6d4b1 | 76 | Ten pakiet dostarcza agenta zabbiksa dla inetd. |
10a854a6 TO |
77 | |
78 | %package agent-standalone | |
7f4b6a83 | 79 | Summary: Standalone agent for zabbix |
5750cc93 | 80 | Summary(pl.UTF-8): Wersja wolnostojąca agenta zabbiksa |
10a854a6 | 81 | Group: Networking/Admin |
b37e41ff | 82 | Requires: %{name} = %{version}-%{release} |
96b8972f | 83 | Obsoletes: zabbix-agent-inetd |
10a854a6 | 84 | |
80945b42 | 85 | %description agent-standalone |
90e6d4b1 AG |
86 | This package provides standalone version of zabbix agent. |
87 | ||
ff14176a JR |
88 | %description agent-standalone -l pl.UTF-8 |
89 | Ten pakiet dostarcza wolnostojącej wersji agenta zabbiksa. | |
10a854a6 | 90 | |
10a854a6 TO |
91 | %package sender |
92 | Summary: zabbix's sender | |
5750cc93 | 93 | Summary(pl.UTF-8): Program zawiadamiający zabbiksa |
10a854a6 TO |
94 | Group: Networking/Admin |
95 | ||
96 | %description sender | |
39709426 | 97 | This package provides the zabbix sender. |
10a854a6 | 98 | |
ff14176a JR |
99 | %description sender -l pl.UTF-8 |
100 | Ten pakiet zawiera program zawiadamiający zabbiksa. | |
a5bb35f6 | 101 | |
a7e2963d | 102 | %package get |
103 | Summary: zabbix's get | |
104 | #Summary(pl.UTF-8): Program zawiadamiajÄy zabbiksa | |
105 | Group: Networking/Admin | |
106 | ||
107 | %description get | |
108 | This package provides the zabbix get. | |
109 | ||
110 | #%description get -l pl.UTF-8 | |
111 | #Ten pakiet zawiera program zawiadamiajÄy zabbiksa. | |
112 | ||
113 | %package server | |
114 | Summary: zabbix's server | |
115 | Summary(pl.UTF-8): Serwer zabbiksa | |
116 | Group: Networking/Admin | |
117 | ||
118 | %description server | |
119 | This package provides the zabbix server. | |
120 | ||
121 | %description server -l pl.UTF-8 | |
122 | Ten pakiet zawiera serwer zabbiksa. | |
123 | ||
10a854a6 | 124 | %prep |
5d18cc59 | 125 | %setup -q |
10a854a6 TO |
126 | |
127 | %build | |
10a854a6 | 128 | %configure \ |
39709426 | 129 | %{!?with_pgsql:--with-mysql} \ |
130 | %{?with_pgsql:--with-pgsql} \ | |
2fe2194b MWP |
131 | %{?with_oracle:--with-oracle} \ |
132 | --enable-server \ | |
133 | --enable-agent \ | |
134 | --with-net-snmp \ | |
135 | # --with-ldap=DIR \ | |
136 | # --with-ucd-snmp=DIR \ | |
10a854a6 TO |
137 | |
138 | %{__make} | |
139 | ||
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
10a854a6 | 142 | |
2fe2194b MWP |
143 | %{__make} install \ |
144 | DESTDIR=$RPM_BUILD_ROOT | |
10a854a6 | 145 | |
2fe2194b MWP |
146 | #install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},%{htmldir}} |
147 | #install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir} | |
148 | #install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir} | |
149 | #cp -r frontends/php/* $RPM_BUILD_ROOT%{htmldir} | |
150 | #install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent | |
151 | #install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper | |
10a854a6 TO |
152 | |
153 | %clean | |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
e9e15753 | 156 | %pre |
78794d78 ER |
157 | %groupadd -g 111 zabbix |
158 | %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix | |
10a854a6 | 159 | |
c4962172 | 160 | %post |
96b8972f | 161 | if [ "$1" = 1 ]; then |
c4962172 ER |
162 | %banner -e %{name} <<-EOF |
163 | You should create database for Zabbix. | |
164 | Running these should be fine in most cases: | |
165 | %if %{with pgsql} | |
166 | psql -c 'create database zabbix' | |
167 | zcat %{_docdir}/%{name}-%{version}/create/pgsql/schema.sql.gz | psql zabbix | |
168 | zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | psql zabbix | |
169 | %else | |
170 | mysqladmin create zabbix | |
171 | zcat %{_docdir}/%{name}-%{version}/create/mysql/schema.sql.gz | mysql zabbix | |
172 | zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | mysql zabbix | |
173 | %endif | |
174 | %{?TODO:You also need zabbix-agent. install zabbix-agent-standalone %or zabbix-agent-inetd.} | |
175 | EOF | |
96b8972f | 176 | fi |
c4962172 | 177 | |
e9e15753 | 178 | %postun |
10a854a6 | 179 | if [ "$1" = "0" ]; then |
9b19117f | 180 | %userremove zabbix |
181 | %groupremove zabbix | |
10a854a6 TO |
182 | fi |
183 | ||
184 | %post agent-inetd | |
96b8972f | 185 | %service -q rc-inetd reload |
10a854a6 TO |
186 | |
187 | %postun agent-inetd | |
96b8972f ER |
188 | if [ "$1" = 0 ]; then |
189 | %service -q rc-inetd reload | |
10a854a6 TO |
190 | fi |
191 | ||
10a854a6 TO |
192 | %files |
193 | %defattr(644,root,root,755) | |
a7e2963d | 194 | #%doc doc/Zabbix\ Manual.pdf AUTHORS NEWS README ChangeLog create upgrades bin/ZabbixW32.exe |
195 | #%attr(750,root,zabbix) %dir %{_sysconfdir} | |
196 | %{_libdir}/*.a | |
10a854a6 TO |
197 | |
198 | %files agent-inetd | |
199 | %defattr(644,root,root,755) | |
a7e2963d | 200 | #%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf |
201 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/zabbix-agent | |
202 | %attr(755,root,root) %{_bindir}/zabbix_agent | |
10a854a6 TO |
203 | |
204 | %files agent-standalone | |
205 | %defattr(644,root,root,755) | |
a7e2963d | 206 | #%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf |
207 | %attr(755,root,root) %{_bindir}/zabbix_agentd | |
10a854a6 | 208 | |
a7e2963d | 209 | %files sender |
10a854a6 | 210 | %defattr(644,root,root,755) |
a7e2963d | 211 | %attr(755,root,root) %{_bindir}/zabbix_sender |
10a854a6 | 212 | |
a7e2963d | 213 | %files get |
10a854a6 | 214 | %defattr(644,root,root,755) |
a7e2963d | 215 | %attr(755,root,root) %{_bindir}/zabbix_get |
10a854a6 | 216 | |
a7e2963d | 217 | %files server |
10a854a6 | 218 | %defattr(644,root,root,755) |
a7e2963d | 219 | %attr(755,root,root) %{_bindir}/zabbix_server |