2 |
%define _requires_exceptions pear |
%define _requires_exceptions pear |
3 |
|
|
4 |
Name: zabbix |
Name: zabbix |
5 |
Version: 1.8.11 |
Version: 2.0.4 |
6 |
Release: %mkrel 2 |
Release: %mkrel 1 |
7 |
Summary: Open-source monitoring solution for your IT infrastructure |
Summary: Open-source monitoring solution for your IT infrastructure |
8 |
Group: Networking/Other |
Group: Networking/Other |
9 |
License: GPLv2+ |
License: GPLv2+ |
10 |
URL: http://www.zabbix.com |
URL: http://www.zabbix.com |
11 |
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz |
Source0: http://freefr.dl.sourceforge.net/project/%{name}/ZABBIX%20Latest%20Stable/%{version}/%{name}-%{version}.tar.gz |
12 |
Source1: zabbix-web.conf |
Source1: zabbix-web.conf |
13 |
Source2: zabbix-server.init |
Source2: zabbix-server.init |
14 |
Source3: zabbix-agent.init |
Source3: zabbix-agent.init |
41 |
BuildRequires: libiksemel-devel |
BuildRequires: libiksemel-devel |
42 |
BuildRequires: libtasn1-devel |
BuildRequires: libtasn1-devel |
43 |
BuildRequires: curl-devel |
BuildRequires: curl-devel |
44 |
|
BuildRequires: libssh2-devel |
45 |
|
BuildRequires: openipmi-devel |
46 |
Requires: logrotate, fping |
Requires: logrotate, fping |
47 |
Requires(pre): rpm-helper |
Requires(pre): rpm-helper |
48 |
Requires(post): rpm-helper |
Requires(post): rpm-helper |
49 |
Requires(preun): rpm-helper |
Requires(preun): rpm-helper |
50 |
|
|
51 |
%description |
%description |
52 |
ZABBIX is software that monitors numerous parameters of a |
Zabbix is the ultimate open source availability and performance monitoring |
53 |
network and the health and integrity of servers. ZABBIX |
solution. Zabbix offers advanced monitoring, alerting, and visualization features |
54 |
uses a flexible notification mechanism that allows users |
today which are missing in other monitoring systems, even some of the best |
55 |
to configure e-mail based alerts for virtually any event. |
commercial ones. |
|
This allows a fast reaction to server problems. ZABBIX |
|
|
offers excellent reporting and data visualisation features |
|
|
based on the stored data. This makes ZABBIX ideal for |
|
|
capacity planning. |
|
|
|
|
|
ZABBIX supports both polling and trapping. All ZABBIX |
|
|
reports and statistics, as well as configuration |
|
|
parameters are accessed through a web-based front end. A |
|
|
web-based front end ensures that the status of your network |
|
|
and the health of your servers can be assessed from any |
|
|
location. Properly configured, ZABBIX can play an important |
|
|
role in monitoring IT infrastructure. This is equally true |
|
|
for small organisations with a few servers and for large |
|
|
companies with a multitude of servers. |
|
|
|
|
56 |
|
|
57 |
%package agent |
%package agent |
58 |
Summary: Zabbix Agent |
Summary: Zabbix Agent |
68 |
%package web |
%package web |
69 |
Summary: Zabbix Web Frontend |
Summary: Zabbix Web Frontend |
70 |
Group: Networking/Other |
Group: Networking/Other |
71 |
Requires: php-%{zdb}, php-gd, apache-mod_php, php-bcmath php-sockets |
Requires: apache-mod_php |
72 |
|
Requires: php-bcmath |
73 |
|
Requires: php-mbstring |
74 |
|
Requires: php-gd |
75 |
|
Requires: php-sockets |
76 |
|
Requires: php-xml, php-xmlreader, php-xmlwriter |
77 |
|
Requires: php-ctype |
78 |
|
Requires: php-session |
79 |
|
Requires: php-gettext |
80 |
|
Requires: php-%{zdb} |
81 |
|
|
82 |
%description web |
%description web |
83 |
The php frontend to display the zabbix web interface. |
The php frontend to display the zabbix web interface. |
99 |
--enable-server \ |
--enable-server \ |
100 |
--enable-agent \ |
--enable-agent \ |
101 |
--with-net-snmp \ |
--with-net-snmp \ |
102 |
|
--with-openipmi \ |
103 |
--with-ldap \ |
--with-ldap \ |
104 |
|
--with-libcurl \ |
105 |
|
--with-ssh2 \ |
106 |
--with-jabber \ |
--with-jabber \ |
107 |
|
--enable-ipv6 \ |
108 |
--enable-static=no \ |
--enable-static=no \ |
109 |
%if %{with_mysql} |
%if %{with_mysql} |
110 |
--with-mysql |
--with-mysql |
128 |
#make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" |
#make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" |
129 |
|
|
130 |
%install |
%install |
131 |
|
|
132 |
# set up some required directories |
# set up some required directories |
133 |
mkdir -p %{buildroot}%{_sysconfdir}/%{name} |
mkdir -p %{buildroot}%{_sysconfdir}/%{name} |
134 |
mkdir -p %{buildroot}%{_sysconfdir}/init.d |
mkdir -p %{buildroot}%{_sysconfdir}/init.d |
135 |
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d |
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d |
136 |
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d |
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d |
137 |
mkdir -p %{buildroot}%{_datadir} |
mkdir -p %{buildroot}%{_datadir}/%{name}/schema |
138 |
|
mkdir -p %{buildroot}%{_datadir}/%{name}/web |
139 |
mkdir -p %{buildroot}%{_localstatedir}/log/%{name} |
mkdir -p %{buildroot}%{_localstatedir}/log/%{name} |
140 |
mkdir -p %{buildroot}%{_localstatedir}/run/%{name} |
mkdir -p %{buildroot}%{_localstatedir}/run/%{name} |
141 |
|
|
142 |
# php frontend |
# php frontend |
143 |
cp -a frontends/php %{buildroot}%{_datadir}/%{name} |
cp -a frontends/php/* %{buildroot}%{_datadir}/%{name}/web |
144 |
mv %{buildroot}%{_datadir}/%{name}/include/db.inc.php \ |
mv %{buildroot}%{_datadir}/%{name}/web/include/db.inc.php \ |
145 |
%{buildroot}%{_sysconfdir}/%{name}/ |
%{buildroot}%{_sysconfdir}/%{name}/ |
146 |
ln -s ../../../..%{_sysconfdir}/%{name}/db.inc.php \ |
ln -s ../../../..%{_sysconfdir}/%{name}/db.inc.php \ |
147 |
%{buildroot}%{_datadir}/%{name}/include/db.inc.php |
%{buildroot}%{_datadir}/%{name}/web/include/db.inc.php |
148 |
|
|
149 |
# kill off .htaccess files, options set in SOURCE1 |
# kill off .htaccess files, options set in SOURCE1 |
150 |
rm -f %{buildroot}%{_datadir}/%{name}/include/.htaccess |
rm -f %{buildroot}%{_datadir}/%{name}/web/include/.htaccess |
151 |
rm -f %{buildroot}%{_datadir}/%{name}/include/classes/.htaccess |
rm -f %{buildroot}%{_datadir}/%{name}/web/include/classes/.htaccess |
152 |
|
|
153 |
# drop config files in place |
# drop config files in place |
154 |
install -m 0644 misc/conf/%{name}_agent.conf %{buildroot}%{_sysconfdir}/%{name} |
install -m 0644 conf/%{name}_agent.conf %{buildroot}%{_sysconfdir}/%{name} |
155 |
cat misc/conf/%{name}_agentd.conf | sed \ |
cat conf/%{name}_agentd.conf | sed \ |
156 |
-e 's|PidFile=.*|PidFile=%{_localstatedir}/run/%{name}/%{name}_agentd.pid|g' \ |
-e 's|PidFile=.*|PidFile=%{_localstatedir}/run/%{name}/%{name}_agentd.pid|g' \ |
157 |
-e 's|LogFile=.*|LogFile=%{_localstatedir}/log/%{name}/%{name}_agentd.log|g' \ |
-e 's|LogFile=.*|LogFile=%{_localstatedir}/log/%{name}/%{name}_agentd.log|g' \ |
158 |
> %{buildroot}%{_sysconfdir}/%{name}/%{name}_agentd.conf |
> %{buildroot}%{_sysconfdir}/%{name}/%{name}_agentd.conf |
159 |
cat misc/conf/zabbix_server.conf | sed \ |
cat conf/zabbix_server.conf | sed \ |
160 |
-e 's|PidFile=.*|PidFile=%{_localstatedir}/run/%{name}/%{name}.pid|g' \ |
-e 's|PidFile=.*|PidFile=%{_localstatedir}/run/%{name}/%{name}.pid|g' \ |
161 |
-e 's|LogFile=.*|LogFile=%{_localstatedir}/log/%{name}/%{name}_server.log|g' \ |
-e 's|LogFile=.*|LogFile=%{_localstatedir}/log/%{name}/%{name}_server.log|g' \ |
162 |
-e 's|AlertScriptsPath=/home/%{name}/bin/|AlertScriptsPath=%{_localstatedir}/lib/%{name}/|g' \ |
-e 's|AlertScriptsPath=/home/%{name}/bin/|AlertScriptsPath=%{_localstatedir}/lib/%{name}/|g' \ |
165 |
-e 's|FpingLocation=/usr/sbin/fping|FpingLocation=/bin/fping|g' \ |
-e 's|FpingLocation=/usr/sbin/fping|FpingLocation=/bin/fping|g' \ |
166 |
> %{buildroot}%{_sysconfdir}/%{name}/%{name}_server.conf |
> %{buildroot}%{_sysconfdir}/%{name}/%{name}_server.conf |
167 |
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf |
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf |
168 |
|
|
169 |
# log rotation |
# log rotation |
170 |
cat %{SOURCE4} | sed -e 's|COMPONENT|server|g' > \ |
cat %{SOURCE4} | sed -e 's|COMPONENT|server|g' > \ |
171 |
%{buildroot}%{_sysconfdir}/logrotate.d/%{name} |
%{buildroot}%{_sysconfdir}/logrotate.d/%{name} |
172 |
cat %{SOURCE4} | sed -e 's|COMPONENT|agentd|g' > \ |
cat %{SOURCE4} | sed -e 's|COMPONENT|agentd|g' > \ |
173 |
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}-agent |
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}-agent |
174 |
|
|
175 |
# init scripts |
# init scripts |
176 |
install -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/init.d/%{name} |
install -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/init.d/%{name} |
177 |
install -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}-agent |
install -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}-agent |
178 |
|
|
179 |
|
# database schemata |
180 |
|
cp -a database %{buildroot}/%{_datadir}/%{name}/schema |
181 |
|
cp -a upgrades %{buildroot}/%{_datadir}/%{name}/schema |
182 |
|
rm -f %{buildroot}/%{_datadir}/%{name}/schema/*/Makefile* |
183 |
|
|
184 |
%makeinstall_std |
%makeinstall_std |
185 |
|
rm -f %{buildroot}%{_sysconfdir}/%{name}*.conf |
186 |
rm -rf %{buildroot}%{_libdir}/libzbx*.a |
rm -rf %{buildroot}%{_libdir}/libzbx*.a |
187 |
|
|
188 |
%pre |
%pre |
215 |
/sbin/chkconfig --del %{name}-agent |
/sbin/chkconfig --del %{name}-agent |
216 |
fi |
fi |
217 |
|
|
218 |
|
%clean |
219 |
|
|
220 |
%files |
%files |
221 |
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README |
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README |
222 |
%doc create |
%{_datadir}/%{name}/schema |
223 |
%dir %{_sysconfdir}/%{name} |
%dir %{_sysconfdir}/%{name} |
224 |
%{_sbindir}/%{name}_server |
%{_sbindir}/%{name}_server |
225 |
%{_sysconfdir}/init.d/%{name} |
%{_sysconfdir}/init.d/%{name} |
230 |
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name} |
%attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name} |
231 |
|
|
232 |
%files agent |
%files agent |
233 |
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README |
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README |
234 |
%dir %{_sysconfdir}/%{name} |
%dir %{_sysconfdir}/%{name} |
235 |
%{_bindir}/%{name}_sender |
%{_bindir}/%{name}_sender |
236 |
%{_bindir}/%{name}_get |
%{_bindir}/%{name}_get |
251 |
%dir %{_sysconfdir}/%{name} |
%dir %{_sysconfdir}/%{name} |
252 |
%config(noreplace) %{_sysconfdir}/%{name}/db.inc.php |
%config(noreplace) %{_sysconfdir}/%{name}/db.inc.php |
253 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
254 |
%{_datadir}/%{name} |
%{_datadir}/%{name}/web |