1 |
# $Id: smeserver-zabbix-agent.spec,v 1.18 2009/12/06 19:05:19 vip-ire Exp $ |
2 |
# Authority: vip-ire |
3 |
# Name: Daniel Berteaud |
4 |
|
5 |
%define name smeserver-zabbix-agent |
6 |
%define version 0.1 |
7 |
%define release 38 |
8 |
Summary: sme server integration of zabbix agent |
9 |
Name: %{name} |
10 |
Version: %{version} |
11 |
Release: %{release}%{?dist} |
12 |
License: GNU GPL version 2 |
13 |
URL: http://www.zabbix.com/ |
14 |
Group: SMEserver/addon |
15 |
Source: %{name}-%{version}.tar.gz |
16 |
Patch0: smeserver-zabbix-agent-0.1-hostname.patch |
17 |
Patch1: smeserver-zabbix-agent-0.1-template_rename.patch |
18 |
Patch2: smeserver-zabbix-agent-0.1-userparam_ext_ip.patch |
19 |
Patch3: smeserver-zabbix-agent-0.1-userparam_ups.patch |
20 |
Patch4: smeserver-zabbix-agent-0.1-userparam_mysql.patch |
21 |
Patch5: smeserver-zabbix-agent-0.1-userparam_usedMem.patch |
22 |
Patch6: smeserver-zabbix-agent-0.1-userparam_usedMem_brackets.patch |
23 |
Patch7: smeserver-zabbix-agent-0.1-userparam_usedMem_key.patch |
24 |
Patch8: smeserver-zabbix-agent-0.1-userparam_usedMem_Used.patch |
25 |
Patch9: smeserver-zabbix-agent-0.1-userparam_usedMem_Used2.patch |
26 |
Patch10: smeserver-zabbix-agent-0.1-userparam_MemStats.patch |
27 |
Patch11: smeserver-zabbix-agent-0.1-userparam_MemStatsTypo.patch |
28 |
Patch12: smeserver-zabbix-agent-0.1-userparam_Swap.patch |
29 |
Patch13: smeserver-zabbix-agent-0.1-userparam_Swap_key.patch |
30 |
Patch14: smeserver-zabbix-agent-0.1-userparam_removeUselessMemStats.patch |
31 |
Patch15: smeserver-zabbix-agent-0.1-userparam_pusedMem.patch |
32 |
Patch16: smeserver-zabbix-agent-0.1-userparam_upsCharge.patch |
33 |
Patch17: smeserver-zabbix-agent-0.1-disable_passive_mode.patch |
34 |
Patch18: smeserver-zabbix-agent-0.1-mail_in_stats.patch |
35 |
Patch19: smeserver-zabbix-agent-0.1-event_zabbix_agent_update.patch |
36 |
Patch20: smeserver-zabbix-agent-0.1-mail_in_stats_other_denied.patch |
37 |
Patch21: smeserver-zabbix-agent-0.1-fix_expand_sudoers.patch |
38 |
Patch22: smeserver-zabbix-agent-0.1-mail_out_stats.patch |
39 |
Patch23: smeserver-zabbix-agent-0.1-mail_out_stats_typo.patch |
40 |
Patch24: smeserver-zabbix-agent-0.1-mail_out_stats_ignore_local.patch |
41 |
Patch25: smeserver-zabbix-agent-0.1-net_stats.patch |
42 |
Patch26: smeserver-zabbix-agent-0.1-userparam_mysql_size.patch |
43 |
Patch27: smeserver-zabbix-agent-0.1-adjust_masq.patch |
44 |
Patch28: smeserver-zabbix-agent-0.1-timeout_comment.patch |
45 |
Patch29: smeserver-zabbix-agent-0.1-buffers.patch |
46 |
Patch30: smeserver-zabbix-agent-0.1-sudoers_mysql.patch |
47 |
Patch31: smeserver-zabbix-agent-0.1-mysql_size_fixe.patch |
48 |
Patch32: smeserver-zabbix-agent-0.1-userparam_swRaid_status.patch |
49 |
Patch33: smeserver-zabbix-agent-0.1-userparam_comment.patch |
50 |
Patch34: smeserver-zabbix-agent-0.1-userparam_megaraid.patch |
51 |
Patch35: smeserver-zabbix-agent-0.1-userparam_yum_updates.patch |
52 |
Patch36: smeserver-zabbix-agent-0.1-userparam_sensors.patch |
53 |
Patch37: smeserver-zabbix-agent-0.1-sensors_fixes.patch |
54 |
Patch38: smeserver-zabbix-agent-0.1-megaraid_parser.patch |
55 |
Patch39: smeserver-zabbix-agent-0.1-mail_stats_via_cron.patch |
56 |
Patch40: smeserver-zabbix-agent-0.1-mdstat_one_line.patch |
57 |
Patch41: smeserver-zabbix-agent-0.1-megaraid_parser_fix.patch |
58 |
Patch42: smeserver-zabbix-agent-0.1-cpu_num.patch |
59 |
Patch43: smeserver-zabbix-agent-0.1-megaraid_fix_raid10.patch |
60 |
Patch44: smeserver-zabbix-agent-0.1-userparam_smart.patch |
61 |
Patch45: smeserver-zabbix-agent-0.1-smart_missing_return.patch |
62 |
Patch46: smeserver-zabbix-agent-0.1-report_0_for_non_existing_drives.patch |
63 |
Patch47: smeserver-zabbix-agent-0.1-run_megaraid_parser_as_root.patch |
64 |
Patch48: smeserver-zabbix-agent-0.1-run_megaraid_parser_as_root2.patch |
65 |
Patch49: smeserver-zabbix-agent-0.1-several_ups.patch |
66 |
|
67 |
BuildArchitectures: noarch |
68 |
BuildRequires: e-smith-devtools |
69 |
BuildRoot: /var/tmp/%{name}-%{version} |
70 |
Requires: e-smith-release >= 7.0 |
71 |
Requires: zabbix-agent |
72 |
Requires: smeserver-remoteuseraccess |
73 |
AutoReqProv: no |
74 |
|
75 |
%description |
76 |
smserver integration of zabbix agent. |
77 |
Zabbix is an entreprise-class open source distributed monitoring |
78 |
solution |
79 |
|
80 |
%changelog |
81 |
* Mon Jan 4 2010 Daniel B. <daniel@firewall-services.com> 0.1-38 |
82 |
- Change UPS UserParameters to use wildcard, so you can monitor several UPS |
83 |
easily (require changes in the templates on the server side) |
84 |
|
85 |
* Sun Dec 6 2009 Daniel B. <daniel@firewall-services.com> 0.1-37 |
86 |
- Call megaraid-parser.pl scripts with sudo in zabbix_agentd.conf |
87 |
|
88 |
* Wed Dec 2 2009 Daniel B. <daniel@firewall-services.com> 0.1-36 |
89 |
- Run megaraid-parser.pl as root (with sudo) instead of granting |
90 |
zabbix user unrestricted access to MegaCli |
91 |
|
92 |
* Fri Sep 25 2009 Daniel B. <daniel@firewall-services.com> 0.1-35 |
93 |
- Support up to 8 disks for smart monitoring. Report valid 0 value |
94 |
for non existing ones to prevent errors in server's log |
95 |
|
96 |
* Tue Sep 01 2009 Daniel B. <daniel@firewall-services.com> 0.1-34 |
97 |
- Add missing return after smart parameters (if several disks are monitored) |
98 |
|
99 |
* Mon Aug 31 2009 Daniel B. <daniel@firewall-services.com> 0.1-33 |
100 |
- Add system.smart UserParameter (monitor smart values for configured hard drives) |
101 |
|
102 |
* Wed Jul 08 2009 Daniel B. <daniel@firewall-services.com> 0.1-32 |
103 |
- Fix megaraid-parser script to support RAID-10 arrays |
104 |
|
105 |
* Mon Jun 08 2009 Daniel B. <daniel@firewall-services.com> 0.1-31 |
106 |
- Add cpu.number UserParameter (return the number of CPU on the host) |
107 |
|
108 |
* Wed May 06 2009 Daniel B. <daniel@firewall-services.com> 0.1-30 |
109 |
- Create missing tmp directory |
110 |
|
111 |
* Mon Apr 26 2009 Daniel B. <daniel@firewall-services.com> 0.1-29 |
112 |
- megaraid-parser.pl is now compatible with newer versions |
113 |
of MegaCli |
114 |
- Fix permission on megaraid-parser.pl script |
115 |
|
116 |
* Thu Apr 23 2009 Daniel B. <daniel@firewall-services.com> 0.1-28 |
117 |
- improvements in sensors script |
118 |
- Add megaraid-parser.pl script to get more accurate MegaRaid |
119 |
conrolers informations |
120 |
- use a cronjob to parse mail logs so multiple zabbix server |
121 |
can be used. Also, it won't repport false value if your host |
122 |
has been unreachable for some time |
123 |
- change output of mdstat-parser.pl to report everything in one |
124 |
line (looks like megaraid-parser) |
125 |
|
126 |
* Mon Apr 20 2009 Daniel B. <daniel@firewall-services.com> 0.1-27 |
127 |
- Add updates.available to retrieve the number of updates available |
128 |
with yum |
129 |
- Added sensors[*] key to retrieve sensors informations. The value are retrieved |
130 |
with the script /var/lib/zabbix/bin/sensors which can be customized. |
131 |
|
132 |
* Fri Mar 27 2009 Daniel B. <daniel@firewall-services.com> 0.1-26 |
133 |
- Add raid.mega.status UserParameters to monitor status of MegaRaid based |
134 |
raid array |
135 |
|
136 |
* Tue Mar 24 2009 Daniel B. <daniel@firewall-services.com> 0.1-25 |
137 |
- Add comments for each UserParameter for configuration on the server side |
138 |
(Type of information, unit, etc...) |
139 |
|
140 |
* Tue Mar 24 2009 Daniel B. <daniel@firewall-services.com> 0.1-24 |
141 |
- Add raid.sw.status userparameter to report software raid array status |
142 |
- Remove tabs from spec |
143 |
- Permission cleanup on scripts |
144 |
|
145 |
* Wed Mar 18 2009 Daniel B. <daniel@firewall-services.com> 0.1-23 |
146 |
- Correct mysql.size parameter (sudo -u mysql) |
147 |
|
148 |
* Mon Mar 09 2009 Daniel B. <daniel@firewall-services.com> 0.1-22 |
149 |
- Fix typo in sudoers template (ZABBIX_AGENT_MYSQL) |
150 |
|
151 |
* Mon Mar 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-21 |
152 |
- Add smeserver-remoteuseraccess as a dependencie (sudoer templates issue) |
153 |
|
154 |
* Mon Mar 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-20 |
155 |
- Adjust masq service on zabbix-agent-update event |
156 |
- Add description of Timout directive |
157 |
- Add BufferSend and BufferSize directive to optimize |
158 |
agent <-> server communication |
159 |
|
160 |
* Sun Mar 01 2009 Daniel B. <daniel@firewall-services.com> 0.1-19 |
161 |
- Add size of mysql data (mysql.size) |
162 |
|
163 |
* Fri Feb 20 2009 Daniel B. <daniel@firewall-services.com> 0.1-18 |
164 |
- Add stats for InternalInterface and ExternalInterface |
165 |
|
166 |
* Tue Feb 17 2009 Daniel B. <daniel@firewall-services.com> 0.1-17 |
167 |
- Ignore local delivery from outgoing mail stats |
168 |
|
169 |
* Tue Feb 17 2009 Daniel B. <daniel@firewall-services.com> 0.1-16 |
170 |
- Fix a typo in mail.out.failure UserParameters |
171 |
|
172 |
* Tue Feb 17 2009 Daniel B. <daniel@firewall-services.com> 0.1-15 |
173 |
- Add UserParameters for outhoing mails statistics |
174 |
|
175 |
* Tue Feb 17 2009 Daniel B. <daniel@firewall-services.com> 0.1-14 |
176 |
- add missing other_denied UserParameters for mailStats |
177 |
- Fix expand-template for /etc/sudoers during zabbix-agent-update event |
178 |
|
179 |
* Tue Feb 17 2009 Daniel B. <daniel@firewall-services.com> 0.1-13 |
180 |
- Add incoming mails statistics |
181 |
- Rename signal-event to zabbix-agent-update (to prevent a conflict on |
182 |
sudoers files which needs to be expanded for server and agent) |
183 |
|
184 |
* Wed Feb 11 2009 Daniel B. <daniel@firewall-services.com> 0.1-12 |
185 |
- Remove Useless buffers and cache mem |
186 |
- Add vm.memory.size.pused (used memory in %) |
187 |
- Add ups.battery.charge for ups |
188 |
- Added "passive" db parameter |
189 |
- default access is private |
190 |
|
191 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-11 |
192 |
- Fix permissions on mysqladmin_status script |
193 |
|
194 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-10 |
195 |
- Change used swap key |
196 |
|
197 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-9 |
198 |
- Added userparameters for used swap space used in bytes |
199 |
|
200 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-8 |
201 |
- Correct a type in memory statistics (for cached memory) |
202 |
|
203 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-7 |
204 |
- Report also free, buffers and cached mem so stats are more accurate |
205 |
|
206 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-6 |
207 |
- substract cache/buffer from used mem |
208 |
|
209 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-5 |
210 |
- Change key name for used memory |
211 |
- Report Used mem instead of total |
212 |
|
213 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-4 |
214 |
- Escape brackets in template |
215 |
|
216 |
* Tue Feb 10 2009 Daniel B. <daniel@firewall-services.com> 0.1-3 |
217 |
- Add UserParameters to repport amount of used memory |
218 |
|
219 |
* Mon Feb 9 2009 Daniel B. <daniel@firewall-services.com> 0.1-2 |
220 |
- Add UserParameters to monitor real external IP, UPS status, |
221 |
mysql stats |
222 |
|
223 |
* Fri Feb 6 2009 Daniel B. <daniel@firewall-services.com> 0.1-1 |
224 |
- add Hostname directive in zabbix_agentd.conf |
225 |
|
226 |
* Mon Feb 04 2009 Daniel B. <daniel@firewall-services.com> 0.1-0 |
227 |
- initial release |
228 |
|
229 |
%prep |
230 |
%setup |
231 |
%patch0 -p1 |
232 |
%patch1 -p1 |
233 |
%patch2 -p1 |
234 |
%patch3 -p1 |
235 |
%patch4 -p1 |
236 |
%patch5 -p1 |
237 |
%patch6 -p1 |
238 |
%patch7 -p1 |
239 |
%patch8 -p1 |
240 |
%patch9 -p1 |
241 |
%patch10 -p1 |
242 |
%patch11 -p1 |
243 |
%patch12 -p1 |
244 |
%patch13 -p1 |
245 |
%patch14 -p1 |
246 |
%patch15 -p1 |
247 |
%patch16 -p1 |
248 |
%patch17 -p1 |
249 |
%patch18 -p1 |
250 |
%patch19 -p1 |
251 |
%patch20 -p1 |
252 |
%patch21 -p1 |
253 |
%patch22 -p1 |
254 |
%patch23 -p1 |
255 |
%patch24 -p1 |
256 |
%patch25 -p1 |
257 |
%patch26 -p1 |
258 |
%patch27 -p1 |
259 |
%patch28 -p1 |
260 |
%patch29 -p1 |
261 |
%patch30 -p1 |
262 |
%patch31 -p1 |
263 |
%patch32 -p1 |
264 |
%patch33 -p1 |
265 |
%patch34 -p1 |
266 |
%patch35 -p1 |
267 |
%patch36 -p1 |
268 |
%patch37 -p1 |
269 |
%patch38 -p1 |
270 |
%patch39 -p1 |
271 |
%patch40 -p1 |
272 |
%patch41 -p1 |
273 |
%patch42 -p1 |
274 |
%patch43 -p1 |
275 |
%patch44 -p1 |
276 |
%patch45 -p1 |
277 |
%patch46 -p1 |
278 |
%patch47 -p1 |
279 |
%patch48 -p1 |
280 |
%patch49 -p1 |
281 |
|
282 |
%build |
283 |
%{__mkdir_p} root/var/lib/zabbix/tmp |
284 |
perl ./createlinks |
285 |
|
286 |
%install |
287 |
rm -rf $RPM_BUILD_ROOT |
288 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
289 |
rm -f %{name}-%{version}-filelist |
290 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
291 |
--file /var/lib/zabbix/bin/mysqladmin_status 'attr(0750,root,zabbix)' \ |
292 |
--file /var/lib/zabbix/bin/logtail.pl 'attr(0755,root,root)' \ |
293 |
--file /var/lib/zabbix/bin/mail_in.sh 'attr(0755,root,root)' \ |
294 |
--file /var/lib/zabbix/bin/mail_out.sh 'attr(0755,root,root)' \ |
295 |
--file /var/lib/zabbix/bin/mdstat-parser.pl 'attr(0755,root,root)' \ |
296 |
--file /var/lib/zabbix/bin/megaraid-parser.pl 'attr(0755,root,root)' \ |
297 |
--file /var/lib/zabbix/bin/parse_mail_in.pl 'attr(0755,root,root)' \ |
298 |
--file /var/lib/zabbix/bin/parse_mail_out.pl 'attr(0755,root,root)' \ |
299 |
--file /var/lib/zabbix/bin/sensors 'attr(0750,root,zabbix) %config(noreplace)' \ |
300 |
--dir /var/lib/zabbix/tmp 'attr(0750,zabbix,zabbix)' \ |
301 |
> %{name}-%{version}-filelist |
302 |
|
303 |
%files -f %{name}-%{version}-filelist |
304 |
%defattr(-,root,root) |
305 |
|
306 |
%clean |
307 |
rm -rf $RPM_BUILD_ROOT |
308 |
|
309 |
|
310 |
%postun |
311 |
#uninstall |
312 |
if [ $1 = 0 ] ; then |
313 |
/sbin/e-smith/db configuration setprop zabbix-agent status disabled |
314 |
/etc/init.d/zabbix-agent stop |
315 |
fi |
316 |
|
317 |
true |