]>
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 | 20 | Source1: %{name}-agent.inetd |
10a854a6 | 21 | URL: http://zabbix.sourceforge.net/ |
39709426 | 22 | %{!?with_pgsql:BuildRequires: mysql-devel} |
39709426 | 23 | BuildRequires: net-snmp-devel |
2886d983 | 24 | BuildRequires: openssl-devel >= 0.9.7d |
9ffbc0d2 | 25 | %{?with_pgsql:BuildRequires: postgresql-devel} |
96b8972f | 26 | BuildRequires: rpmbuild(macros) >= 1.268 |
9ffbc0d2 ER |
27 | Requires(postun): /usr/sbin/groupdel |
28 | Requires(postun): /usr/sbin/userdel | |
a5bb35f6 | 29 | Requires(pre): /bin/id |
9b19117f | 30 | Requires(pre): /usr/bin/getgid |
a5bb35f6 JB |
31 | Requires(pre): /usr/sbin/groupadd |
32 | Requires(pre): /usr/sbin/useradd | |
9b19117f | 33 | Provides: group(zabbix) |
34 | Provides: user(zabbix) | |
10a854a6 TO |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
a5bb35f6 | 37 | %define _sysconfdir /etc/%{name} |
c4962172 | 38 | %define htmldir /home/services/httpd/html/%{name} |
10a854a6 TO |
39 | |
40 | %description | |
b82afc4b | 41 | zabbix is software that monitors numerous parameters of a network and |
1266ba50 | 42 | the servers on that network. It is a useful tool for monitoring |
b82afc4b | 43 | the health and integrity of servers. zabbix uses a flexible |
7f4b6a83 | 44 | notification mechanism that allows users to configure email based |
45 | alerts for virtually any event. All monitored parameters are stored in | |
b82afc4b | 46 | a database. zabbix offers excellent reporting and data visualisation |
47 | features based on the stored data. zabbix supports both polling and | |
48 | trapping. All zabbix reports and statistics, as well as configuration | |
7f4b6a83 | 49 | parameters, are accessed through a web-based front end. |
50 | ||
ff14176a JR |
51 | %description -l pl.UTF-8 |
52 | zabbix to oprogramowanie do monitorowania licznych parametrów sieci i | |
1266ba50 TP |
53 | serwerów sieciowych. Jest przydatny przy monitorowaniu działania |
54 | serwerów. Jorzysta z elastycznego mechanizmu powiadamiania, który | |
55 | pozwala użytkownikom konfigurować powiadamianie pocztą elektroniczną | |
56 | dla praktycznie wszelkich zdarzeń. Monitorowane parametry są | |
57 | przechowywane w bazie danych. W oparciu o przechowywane dane zabbix | |
58 | oferuje świetne raportowanie i funkcje wizualizacji. Wspiera zarówno | |
59 | odpytywanie jak i pułapkowanie. Dostęp do wszystkich raportów i | |
60 | statystyk zabbiksa jest możliwy poprzez interfejs oparty o WWW. | |
10a854a6 | 61 | |
10a854a6 TO |
62 | %package agent-inetd |
63 | Summary: inetd agent for zabbix | |
5750cc93 | 64 | Summary(pl.UTF-8): Wersja inetd agenta zabbiksa |
10a854a6 | 65 | Group: Networking/Admin |
b37e41ff | 66 | Requires: %{name} = %{version}-%{release} |
10a854a6 | 67 | Requires: inetdaemon |
96b8972f | 68 | Obsoletes: zabbix-agent-standalone |
10a854a6 TO |
69 | |
70 | %description agent-inetd | |
90e6d4b1 AG |
71 | This package provides inetd version of zabbix agent. |
72 | ||
ff14176a | 73 | %description agent-inetd -l pl.UTF-8 |
90e6d4b1 | 74 | Ten pakiet dostarcza agenta zabbiksa dla inetd. |
10a854a6 TO |
75 | |
76 | %package agent-standalone | |
7f4b6a83 | 77 | Summary: Standalone agent for zabbix |
5750cc93 | 78 | Summary(pl.UTF-8): Wersja wolnostojąca agenta zabbiksa |
10a854a6 | 79 | Group: Networking/Admin |
b37e41ff | 80 | Requires: %{name} = %{version}-%{release} |
96b8972f | 81 | Obsoletes: zabbix-agent-inetd |
10a854a6 | 82 | |
80945b42 | 83 | %description agent-standalone |
90e6d4b1 AG |
84 | This package provides standalone version of zabbix agent. |
85 | ||
ff14176a JR |
86 | %description agent-standalone -l pl.UTF-8 |
87 | Ten pakiet dostarcza wolnostojącej wersji agenta zabbiksa. | |
10a854a6 | 88 | |
10a854a6 TO |
89 | %package sender |
90 | Summary: zabbix's sender | |
5750cc93 | 91 | Summary(pl.UTF-8): Program zawiadamiający zabbiksa |
10a854a6 TO |
92 | Group: Networking/Admin |
93 | ||
94 | %description sender | |
39709426 | 95 | This package provides the zabbix sender. |
10a854a6 | 96 | |
ff14176a JR |
97 | %description sender -l pl.UTF-8 |
98 | Ten pakiet zawiera program zawiadamiający zabbiksa. | |
a5bb35f6 | 99 | |
a7e2963d | 100 | %package get |
101 | Summary: zabbix's get | |
102 | #Summary(pl.UTF-8): Program zawiadamiajÄy zabbiksa | |
103 | Group: Networking/Admin | |
104 | ||
105 | %description get | |
106 | This package provides the zabbix get. | |
107 | ||
108 | #%description get -l pl.UTF-8 | |
109 | #Ten pakiet zawiera program zawiadamiajÄy zabbiksa. | |
110 | ||
111 | %package server | |
112 | Summary: zabbix's server | |
113 | Summary(pl.UTF-8): Serwer zabbiksa | |
114 | Group: Networking/Admin | |
1266ba50 TP |
115 | Obsoletes: %{name}-suckerd |
116 | Obsoletes: %{name}-trapper-inetd | |
117 | Obsoletes: %{name}-trapper-standalone | |
a7e2963d | 118 | |
119 | %description server | |
120 | This package provides the zabbix server. | |
121 | ||
122 | %description server -l pl.UTF-8 | |
123 | Ten pakiet zawiera serwer zabbiksa. | |
124 | ||
10a854a6 | 125 | %prep |
5d18cc59 | 126 | %setup -q |
10a854a6 TO |
127 | |
128 | %build | |
10a854a6 | 129 | %configure \ |
39709426 | 130 | %{!?with_pgsql:--with-mysql} \ |
131 | %{?with_pgsql:--with-pgsql} \ | |
2fe2194b MWP |
132 | %{?with_oracle:--with-oracle} \ |
133 | --enable-server \ | |
134 | --enable-agent \ | |
135 | --with-net-snmp \ | |
136 | # --with-ldap=DIR \ | |
137 | # --with-ucd-snmp=DIR \ | |
10a854a6 TO |
138 | |
139 | %{__make} | |
140 | ||
141 | %install | |
142 | rm -rf $RPM_BUILD_ROOT | |
10a854a6 | 143 | |
2fe2194b MWP |
144 | %{__make} install \ |
145 | DESTDIR=$RPM_BUILD_ROOT | |
10a854a6 | 146 | |
2fe2194b MWP |
147 | #install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},%{htmldir}} |
148 | #install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir} | |
149 | #install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir} | |
150 | #cp -r frontends/php/* $RPM_BUILD_ROOT%{htmldir} | |
151 | #install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent | |
152 | #install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper | |
10a854a6 TO |
153 | |
154 | %clean | |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
e9e15753 | 157 | %pre |
78794d78 ER |
158 | %groupadd -g 111 zabbix |
159 | %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix | |
10a854a6 | 160 | |
c4962172 | 161 | %post |
96b8972f | 162 | if [ "$1" = 1 ]; then |
c4962172 ER |
163 | %banner -e %{name} <<-EOF |
164 | You should create database for Zabbix. | |
165 | Running these should be fine in most cases: | |
166 | %if %{with pgsql} | |
167 | psql -c 'create database zabbix' | |
168 | zcat %{_docdir}/%{name}-%{version}/create/pgsql/schema.sql.gz | psql zabbix | |
169 | zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | psql zabbix | |
170 | %else | |
171 | mysqladmin create zabbix | |
172 | zcat %{_docdir}/%{name}-%{version}/create/mysql/schema.sql.gz | mysql zabbix | |
173 | zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | mysql zabbix | |
174 | %endif | |
175 | %{?TODO:You also need zabbix-agent. install zabbix-agent-standalone %or zabbix-agent-inetd.} | |
176 | EOF | |
96b8972f | 177 | fi |
c4962172 | 178 | |
e9e15753 | 179 | %postun |
10a854a6 | 180 | if [ "$1" = "0" ]; then |
9b19117f | 181 | %userremove zabbix |
182 | %groupremove zabbix | |
10a854a6 TO |
183 | fi |
184 | ||
185 | %post agent-inetd | |
96b8972f | 186 | %service -q rc-inetd reload |
10a854a6 TO |
187 | |
188 | %postun agent-inetd | |
96b8972f ER |
189 | if [ "$1" = 0 ]; then |
190 | %service -q rc-inetd reload | |
10a854a6 TO |
191 | fi |
192 | ||
10a854a6 TO |
193 | %files |
194 | %defattr(644,root,root,755) | |
a7e2963d | 195 | #%doc doc/Zabbix\ Manual.pdf AUTHORS NEWS README ChangeLog create upgrades bin/ZabbixW32.exe |
196 | #%attr(750,root,zabbix) %dir %{_sysconfdir} | |
197 | %{_libdir}/*.a | |
10a854a6 TO |
198 | |
199 | %files agent-inetd | |
200 | %defattr(644,root,root,755) | |
a7e2963d | 201 | #%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf |
202 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/zabbix-agent | |
203 | %attr(755,root,root) %{_bindir}/zabbix_agent | |
10a854a6 TO |
204 | |
205 | %files agent-standalone | |
206 | %defattr(644,root,root,755) | |
a7e2963d | 207 | #%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf |
208 | %attr(755,root,root) %{_bindir}/zabbix_agentd | |
10a854a6 | 209 | |
a7e2963d | 210 | %files sender |
10a854a6 | 211 | %defattr(644,root,root,755) |
a7e2963d | 212 | %attr(755,root,root) %{_bindir}/zabbix_sender |
10a854a6 | 213 | |
a7e2963d | 214 | %files get |
10a854a6 | 215 | %defattr(644,root,root,755) |
a7e2963d | 216 | %attr(755,root,root) %{_bindir}/zabbix_get |
10a854a6 | 217 | |
a7e2963d | 218 | %files server |
10a854a6 | 219 | %defattr(644,root,root,755) |
a7e2963d | 220 | %attr(755,root,root) %{_bindir}/zabbix_server |