1 |
# Just a wild guess... |
2 |
%global __requires_exclude perl\\((English|SNMP|a)\\) |
3 |
|
4 |
%define nsusr nagios |
5 |
%define nsgrp nagios |
6 |
%define cmdusr apache |
7 |
%define cmdgrp apache |
8 |
|
9 |
Summary: Host/service/network monitoring program plugins for Nagios |
10 |
Name: nagios-plugins |
11 |
Version: 2.1.4 |
12 |
Release: %mkrel 2 |
13 |
License: GPLv2+ |
14 |
Group: Monitoring |
15 |
URL: https://nagios-plugins.org/ |
16 |
Source0: http://www.nagios-plugins.org/download/nagios-plugins-%{version}.tar.gz |
17 |
Source101: check_breeze.cfg |
18 |
Source102: check_by_ssh.cfg |
19 |
Source103: check_cluster.cfg |
20 |
Source104: check_dhcp.cfg |
21 |
Source105: check_dig.cfg |
22 |
Source106: check_disk.cfg |
23 |
Source107: check_disk_smb.cfg |
24 |
Source108: check_dns.cfg |
25 |
Source109: check_dummy.cfg |
26 |
Source110: check_file_age.cfg |
27 |
Source111: check_flexlm.cfg |
28 |
Source112: check_fping.cfg |
29 |
Source113: check_game.cfg |
30 |
Source114: check_hpjd.cfg |
31 |
Source115: check_http.cfg |
32 |
Source116: check_icmp.cfg |
33 |
Source117: check_ide_smart.cfg |
34 |
Source118: check_ifoperstatus.cfg |
35 |
Source119: check_ifstatus.cfg |
36 |
Source120: check_ircd.cfg |
37 |
Source121: check_ldap.cfg |
38 |
Source122: check_load.cfg |
39 |
Source123: check_log.cfg |
40 |
Source124: check_mailq.cfg |
41 |
Source127: check_mysql.cfg |
42 |
Source128: check_mysql_query.cfg |
43 |
Source129: check_nagios.cfg |
44 |
Source130: check_nt.cfg |
45 |
Source131: check_ntp.cfg |
46 |
Source132: check_ntp_peer.cfg |
47 |
Source133: check_ntp_time.cfg |
48 |
Source134: check_nwstat.cfg |
49 |
Source135: check_oracle.cfg |
50 |
Source136: check_overcr.cfg |
51 |
Source137: check_pgsql.cfg |
52 |
Source138: check_ping.cfg |
53 |
Source139: check_procs.cfg |
54 |
Source140: check_radius.cfg |
55 |
Source141: check_real.cfg |
56 |
Source142: check_rpc.cfg |
57 |
Source143: check_sensors.cfg |
58 |
Source144: check_smtp.cfg |
59 |
Source145: check_snmp.cfg |
60 |
Source146: check_ssh.cfg |
61 |
Source147: check_swap.cfg |
62 |
Source148: check_tcp.cfg |
63 |
Source149: check_time.cfg |
64 |
Source150: check_ups.cfg |
65 |
Source151: check_users.cfg |
66 |
Source152: check_wave.cfg |
67 |
|
68 |
Patch6: nagios-plugins-2.0.3-check_ping-socket-filter-warning.patch |
69 |
# http://sourceforge.net/tracker/index.php?func=detail&aid=1854415&group_id=29880&atid=397599 |
70 |
#Patch21: nagios-plugins-2.0.3-check_dhcp-roguedhcpservercheck.patch |
71 |
# http://sourceforge.net/tracker/?func=detail&atid=397599&aid=2430999&group_id=29880 |
72 |
Patch22: nagios-plugins-2.1.4-check_ldap_certificate.diff |
73 |
Requires(post): rpm-helper |
74 |
Requires(preun): rpm-helper |
75 |
BuildRequires: mysql-devel |
76 |
BuildRequires: bind-utils |
77 |
BuildRequires: gettext-devel |
78 |
BuildRequires: libsasl-devel |
79 |
BuildRequires: net-snmp-utils |
80 |
BuildRequires: ntp |
81 |
BuildRequires: openldap-devel |
82 |
BuildRequires: openssh-clients |
83 |
BuildRequires: openssl-devel |
84 |
BuildRequires: pam-devel |
85 |
BuildRequires: postgresql-devel |
86 |
BuildRequires: python |
87 |
BuildRequires: radiusclient-ng-devel |
88 |
BuildRequires: samba-client |
89 |
BuildRequires: shadow-utils |
90 |
BuildRequires: zlib-devel |
91 |
BuildRequires: dbi-devel |
92 |
Epoch: 1 |
93 |
|
94 |
%description |
95 |
Nagios is a program that will monitor hosts and services on your network, and |
96 |
to email or page you when a problem arises or is resolved. Nagios runs on a |
97 |
Unix server as a background or daemon process, intermittently running checks on |
98 |
various services that you specify. The actual service checks are performed by |
99 |
separate "plugin" programs which return the status of the checks to Nagios. |
100 |
|
101 |
This package contains the basic plugins necessary for use with the Nagios |
102 |
package. This package should install cleanly on almost any RPM-based system. |
103 |
|
104 |
%package -n nagios-check_breeze |
105 |
Summary: The check_breeze plugin for nagios |
106 |
Group: Networking/Other |
107 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
108 |
|
109 |
%description -n nagios-check_breeze |
110 |
This plugin reports the signal strength of a Breezecom wireless equipment |
111 |
|
112 |
%package -n nagios-check_by_ssh |
113 |
Summary: The check_by_ssh plugin for nagios |
114 |
Group: Networking/Other |
115 |
Requires: nagios-check_disk |
116 |
Requires: nagios-plugins |
117 |
|
118 |
%description -n nagios-check_by_ssh |
119 |
This plugin uses SSH to execute commands on a remote host. |
120 |
|
121 |
%package -n nagios-check_cluster |
122 |
Summary: The check_cluster plugin for nagios |
123 |
Group: Networking/Other |
124 |
Requires: nagios-plugins |
125 |
|
126 |
%description -n nagios-check_cluster |
127 |
This package contains the check_cluster plugin for nagios. |
128 |
|
129 |
%package -n nagios-check_dbi |
130 |
Summary: The check_dbi plugin for nagios |
131 |
Group: Networking/Other |
132 |
|
133 |
%description -n nagios-check_dbi |
134 |
This package contains the check_dbi plugin for nagios. |
135 |
|
136 |
%package -n nagios-check_dhcp |
137 |
Summary: The check_dhcp plugin for nagios |
138 |
Group: Networking/Other |
139 |
Requires: nagios-plugins |
140 |
|
141 |
%description -n nagios-check_dhcp |
142 |
This plugin tests the availability of DHCP servers on a network. |
143 |
|
144 |
%package -n nagios-check_dig |
145 |
Summary: The check_dig plugin for nagios |
146 |
Group: Networking/Other |
147 |
Requires: bind-utils |
148 |
Requires: nagios-plugins |
149 |
|
150 |
%description -n nagios-check_dig |
151 |
This plugin test the DNS service on the specified host using dig |
152 |
|
153 |
%package -n nagios-check_disk |
154 |
Summary: The check_disk plugin for nagios |
155 |
Group: Networking/Other |
156 |
Requires: nagios-plugins |
157 |
|
158 |
%description -n nagios-check_disk |
159 |
This plugin checks the amount of used disk space on a mounted file system and |
160 |
generates an alert if free space is less than one of the threshold values |
161 |
|
162 |
%package -n nagios-check_disk_smb |
163 |
Summary: The check_disk_smb plugin for nagios |
164 |
Group: Networking/Other |
165 |
Requires: samba-client |
166 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
167 |
|
168 |
%description -n nagios-check_disk_smb |
169 |
Perl Check SMB Disk plugin for Nagios |
170 |
|
171 |
%package -n nagios-check_dns |
172 |
Summary: The check_dns plugin for nagios |
173 |
Group: Networking/Other |
174 |
Requires: bind-utils |
175 |
Requires: nagios-plugins |
176 |
|
177 |
%description -n nagios-check_dns |
178 |
This plugin uses the nslookup program to obtain the IP address for the given |
179 |
host/domain query. An optional DNS server to use may be specified. If no DNS |
180 |
server is specified, the default server(s) specified in /etc/resolv.conf will |
181 |
be used. |
182 |
|
183 |
%package -n nagios-check_dummy |
184 |
Summary: The check_dummy plugin for nagios |
185 |
Group: Networking/Other |
186 |
Requires: nagios-plugins |
187 |
|
188 |
%description -n nagios-check_dummy |
189 |
This plugin will simply return the state corresponding to the numeric value |
190 |
of the <state> argument with optional text |
191 |
|
192 |
%package -n nagios-check_file_age |
193 |
Summary: The check_file_age plugin for nagios |
194 |
Group: Networking/Other |
195 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
196 |
|
197 |
%description -n nagios-check_file_age |
198 |
This package contains the check_file_age plugin for nagios. |
199 |
|
200 |
%package -n nagios-check_flexlm |
201 |
Summary: The check_flexlm plugin for nagios |
202 |
Group: Networking/Other |
203 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
204 |
|
205 |
%description -n nagios-check_flexlm |
206 |
Check available flexlm license managers. |
207 |
|
208 |
%package -n nagios-check_fping |
209 |
Summary: The check_fping plugin for nagios |
210 |
Group: Networking/Other |
211 |
Requires: fping |
212 |
Requires: nagios-plugins |
213 |
|
214 |
%description -n nagios-check_fping |
215 |
This plugin will use the fping command to ping the specified host for a fast |
216 |
check Note that it is necessary to set the suid flag on fping. |
217 |
|
218 |
%package -n nagios-check_game |
219 |
Summary: The check_game plugin for nagios |
220 |
Group: Networking/Other |
221 |
Requires: qstat |
222 |
Requires: nagios-plugins |
223 |
|
224 |
%description -n nagios-check_game |
225 |
This plugin tests game server connections with the specified host. |
226 |
|
227 |
%package -n nagios-check_hpjd |
228 |
Summary: The check_hpjd plugin for nagios |
229 |
Group: Networking/Other |
230 |
Requires: net-snmp-utils |
231 |
Requires: nagios-plugins |
232 |
|
233 |
%description -n nagios-check_hpjd |
234 |
This plugin tests the STATUS of an HP printer with a JetDirect card. Net-snmp |
235 |
must be installed on the computer running the plugin. |
236 |
|
237 |
%package -n nagios-check_http |
238 |
Summary: The check_http plugin for nagios |
239 |
Group: Networking/Other |
240 |
Requires: nagios-plugins |
241 |
|
242 |
%description -n nagios-check_http |
243 |
This plugin tests the HTTP service on the specified host. It can test normal |
244 |
(http) and secure (https) servers, follow redirects, search for strings and |
245 |
regular expressions, check connection times, and report on certificate |
246 |
expiration times. |
247 |
|
248 |
%package -n nagios-check_icmp |
249 |
Summary: The check_icmp plugin for nagios |
250 |
Group: Networking/Other |
251 |
Requires: nagios-plugins |
252 |
|
253 |
%description -n nagios-check_icmp |
254 |
This package contains the check_icmp plugin for nagios. |
255 |
|
256 |
%package -n nagios-check_ide_smart |
257 |
Summary: The check_ide_smart plugin for nagios |
258 |
Group: Networking/Other |
259 |
Requires: nagios-plugins |
260 |
|
261 |
%description -n nagios-check_ide_smart |
262 |
This plugin checks a local hard drive with the (Linux specific) SMART interface |
263 |
[http://smartlinux.sourceforge.net/smart/index.php]. |
264 |
|
265 |
%package -n nagios-check_ifoperstatus |
266 |
Summary: The check_ifoperstatus plugin for nagios |
267 |
Group: Networking/Other |
268 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
269 |
|
270 |
%description -n nagios-check_ifoperstatus |
271 |
check_ifoperstatus plugin for Nagios monitors operational status of a |
272 |
particular network interface on the target host. |
273 |
|
274 |
%package -n nagios-check_ifstatus |
275 |
Summary: The check_ifstatus plugin for nagios |
276 |
Group: Networking/Other |
277 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
278 |
|
279 |
%description -n nagios-check_ifstatus |
280 |
check_ifstatus plugin for Nagios monitors operational status of each network |
281 |
interface on the target host. |
282 |
|
283 |
%package -n nagios-check_ircd |
284 |
Summary: The check_ircd plugin for nagios |
285 |
Group: Networking/Other |
286 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
287 |
|
288 |
%description -n nagios-check_ircd |
289 |
Perl Check IRCD plugin for Nagios |
290 |
|
291 |
%package -n nagios-check_ldap |
292 |
Summary: The check_ldap plugin for nagios |
293 |
Group: Networking/Other |
294 |
Requires: nagios-plugins |
295 |
|
296 |
%description -n nagios-check_ldap |
297 |
This package contains the check_ldap plugin for nagios. |
298 |
|
299 |
%package -n nagios-check_load |
300 |
Summary: The check_load plugin for nagios |
301 |
Group: Networking/Other |
302 |
Requires: nagios-plugins |
303 |
|
304 |
%description -n nagios-check_load |
305 |
This plugin tests the current system load average. |
306 |
|
307 |
%package -n nagios-check_log |
308 |
Summary: The check_log plugin for nagios |
309 |
Group: Networking/Other |
310 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
311 |
|
312 |
%description -n nagios-check_log |
313 |
Log file pattern detector plugin for Nagios |
314 |
|
315 |
%package -n nagios-check_mailq |
316 |
Summary: The check_mailq plugin for nagios |
317 |
Group: Networking/Other |
318 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
319 |
|
320 |
%description -n nagios-check_mailq |
321 |
Checks the number of messages in the mail queue (supports multiple sendmail |
322 |
queues, qmail) |
323 |
|
324 |
%package -n nagios-check_mysql |
325 |
Summary: The check_mysql plugin for nagios |
326 |
Group: Networking/Other |
327 |
Requires: nagios-plugins |
328 |
|
329 |
%description -n nagios-check_mysql |
330 |
This program tests connections to a mysql server. |
331 |
|
332 |
%package -n nagios-check_mysql_query |
333 |
Summary: The check_mysql_query plugin for nagios |
334 |
Group: Networking/Other |
335 |
Requires: nagios-plugins |
336 |
|
337 |
%description -n nagios-check_mysql_query |
338 |
This program checks a query result against threshold levels. |
339 |
|
340 |
%package -n nagios-check_nagios |
341 |
Summary: The check_nagios plugin for nagios |
342 |
Group: Networking/Other |
343 |
Requires: nagios-plugins |
344 |
|
345 |
%description -n nagios-check_nagios |
346 |
This plugin checks the status of the Nagios process on the local machine. The |
347 |
plugin will check to make sure the Nagios status log is no older than the |
348 |
number of minutes specified by the expires option. It also checks the process |
349 |
table for a process matching the command argument. |
350 |
|
351 |
%package -n nagios-check_nt |
352 |
Summary: The check_nt plugin for nagios |
353 |
Group: Networking/Other |
354 |
Requires: nagios-plugins |
355 |
|
356 |
%description -n nagios-check_nt |
357 |
This plugin collects data from the NSClient service running on a Windows(tm) |
358 |
NT/2000/XP/2003 server. |
359 |
|
360 |
%package -n nagios-check_ntp |
361 |
Summary: The check_ntp plugin for nagios |
362 |
Group: Networking/Other |
363 |
Requires: ntp |
364 |
Requires: nagios-plugins |
365 |
|
366 |
%description -n nagios-check_ntp |
367 |
This plugin checks the selected ntp server. |
368 |
|
369 |
%package -n nagios-check_ntp_peer |
370 |
Summary: The check_ntp_peer plugin for nagios |
371 |
Group: Networking/Other |
372 |
Requires: nagios-plugins |
373 |
|
374 |
%description -n nagios-check_ntp_peer |
375 |
This plugin checks the selected ntp server. |
376 |
|
377 |
%package -n nagios-check_ntp_time |
378 |
Summary: The check_ntp_time plugin for nagios |
379 |
Group: Networking/Other |
380 |
Requires: ntp |
381 |
Requires: nagios-plugins |
382 |
|
383 |
%description -n nagios-check_ntp_time |
384 |
This plugin checks the clock offset with the ntp server. |
385 |
|
386 |
%package -n nagios-check_nwstat |
387 |
Summary: The check_nwstat plugin for nagios |
388 |
Group: Networking/Other |
389 |
Requires: nagios-plugins |
390 |
|
391 |
%description -n nagios-check_nwstat |
392 |
This plugin attempts to contact the MRTGEXT NLM running on a Novell server |
393 |
to gather the requested system information. |
394 |
|
395 |
%package -n nagios-check_oracle |
396 |
Summary: The check_oracle plugin for nagios |
397 |
Group: Networking/Other |
398 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
399 |
|
400 |
%description -n nagios-check_oracle |
401 |
Check Oracle status. |
402 |
|
403 |
%package -n nagios-check_overcr |
404 |
Summary: The check_overcr plugin for nagios |
405 |
Group: Networking/Other |
406 |
Requires: nagios-plugins |
407 |
|
408 |
%description -n nagios-check_overcr |
409 |
This plugin attempts to contact the Over-CR collector daemon running on the |
410 |
remote UNIX server in order to gather the requested system information. |
411 |
|
412 |
%package -n nagios-check_pgsql |
413 |
Summary: The check_pgsql plugin for nagios |
414 |
Group: Networking/Other |
415 |
Requires: nagios-plugins |
416 |
|
417 |
%description -n nagios-check_pgsql |
418 |
Test whether a PostgreSQL Database is accepting connections. |
419 |
|
420 |
%package -n nagios-check_ping |
421 |
Summary: The check_ping plugin for nagios |
422 |
Group: Networking/Other |
423 |
Requires: nagios-plugins |
424 |
|
425 |
%description -n nagios-check_ping |
426 |
Use ping to check connection statistics for a remote host. |
427 |
|
428 |
%package -n nagios-check_procs |
429 |
Summary: The check_procs plugin for nagios |
430 |
Group: Networking/Other |
431 |
Requires: nagios-plugins |
432 |
|
433 |
%description -n nagios-check_procs |
434 |
Checks all processes and generates WARNING or CRITICAL states if the specified |
435 |
metric is outside the required threshold ranges. The metric defaults to number |
436 |
of processes. Search filters can be applied to limit the processes to check. |
437 |
|
438 |
%package -n nagios-check_radius |
439 |
Summary: The check_radius plugin for nagios |
440 |
Group: Networking/Other |
441 |
Requires: nagios-plugins |
442 |
|
443 |
%description -n nagios-check_radius |
444 |
Tests to see if a radius server is accepting connections. |
445 |
|
446 |
%package -n nagios-check_real |
447 |
Summary: The check_real plugin for nagios |
448 |
Group: Networking/Other |
449 |
Requires: nagios-plugins |
450 |
|
451 |
%description -n nagios-check_real |
452 |
This plugin tests the REAL service on the specified host. |
453 |
|
454 |
%package -n nagios-check_rpc |
455 |
Summary: The check_rpc plugin for nagios |
456 |
Group: Networking/Other |
457 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
458 |
|
459 |
%description -n nagios-check_rpc |
460 |
Check if a rpc service is registered and running using: |
461 |
rpcinfo -H host -C rpc_command |
462 |
|
463 |
%package -n nagios-check_sensors |
464 |
Summary: The check_sensors plugin for nagios |
465 |
Group: Networking/Other |
466 |
Requires: lm_sensors |
467 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
468 |
|
469 |
%description -n nagios-check_sensors |
470 |
This plugin checks hardware status using the lm_sensors package. |
471 |
|
472 |
%package -n nagios-check_smtp |
473 |
Summary: The check_smtp plugin for nagios |
474 |
Group: Networking/Other |
475 |
Requires: nagios-plugins |
476 |
|
477 |
%description -n nagios-check_smtp |
478 |
This plugin will attempt to open an SMTP connection with the host. |
479 |
|
480 |
%package -n nagios-check_snmp |
481 |
Summary: The check_snmp plugin for nagios |
482 |
Group: Networking/Other |
483 |
Requires: net-snmp-utils |
484 |
Requires: nagios-plugins |
485 |
|
486 |
%description -n nagios-check_snmp |
487 |
Check status of remote machines and obtain sustem information via SNMP. |
488 |
|
489 |
%package -n nagios-check_ssh |
490 |
Summary: The check_ssh plugin for nagios |
491 |
Group: Networking/Other |
492 |
Requires: nagios-plugins |
493 |
|
494 |
%description -n nagios-check_ssh |
495 |
Try to connect to an SSH server at specified server and port. |
496 |
|
497 |
%package -n nagios-check_swap |
498 |
Summary: The check_swap plugin for nagios |
499 |
Group: Networking/Other |
500 |
Requires: nagios-plugins |
501 |
|
502 |
%description -n nagios-check_swap |
503 |
Check swap space on local machine. |
504 |
|
505 |
%package -n nagios-check_tcp |
506 |
Summary: The check_tcp plugin for nagios |
507 |
Group: Networking/Other |
508 |
Requires: nagios-plugins |
509 |
|
510 |
%description -n nagios-check_tcp |
511 |
This plugin tests TCP connections with the specified host (or unix socket). |
512 |
|
513 |
%package -n nagios-check_time |
514 |
Summary: The check_time plugin for nagios |
515 |
Group: Networking/Other |
516 |
Requires: nagios-plugins |
517 |
|
518 |
%description -n nagios-check_time |
519 |
This plugin will check the time on the specified host. |
520 |
|
521 |
%package -n nagios-check_ups |
522 |
Summary: The check_ups plugin for nagios |
523 |
Group: Networking/Other |
524 |
Requires: nut |
525 |
Requires: nagios-plugins |
526 |
|
527 |
%description -n nagios-check_ups |
528 |
This plugin tests the UPS service on the specified host.Network UPS Tools |
529 |
from www.networkupstools.org must be running for thisplugin to work. |
530 |
|
531 |
%package -n nagios-check_uptime |
532 |
Summary: The check_uptime plugin for nagios |
533 |
Group: Networking/Other |
534 |
Requires: nagios-plugins |
535 |
|
536 |
%description -n nagios-check_uptime |
537 |
Provides check_uptime support for Nagios. |
538 |
|
539 |
%package -n nagios-check_users |
540 |
Summary: The check_users plugin for nagios |
541 |
Group: Networking/Other |
542 |
Requires: nagios-plugins |
543 |
|
544 |
%description -n nagios-check_users |
545 |
This plugin checks the number of users currently logged in on the local |
546 |
system and generates an error if the number exceeds the thresholds specified. |
547 |
|
548 |
%package -n nagios-check_wave |
549 |
Summary: The check_wave plugin for nagios |
550 |
Group: Networking/Other |
551 |
Requires: nagios-plugins = %{epoch}:%{version}-%{release} |
552 |
|
553 |
%description -n nagios-check_wave |
554 |
This package contains the check_wave plugin for nagios. |
555 |
|
556 |
%prep |
557 |
%setup -q |
558 |
%autopatch -p1 |
559 |
|
560 |
%build |
561 |
autoreconf -fi |
562 |
|
563 |
export PATH_TO_DIG=/usr/bin/dig |
564 |
export PATH_TO_FPING=/bin/fping |
565 |
export PATH_TO_HOST=/usr/bin/host |
566 |
export PATH_TO_LMSTAT= |
567 |
export PATH_TO_LSPS= |
568 |
export PATH_TO_MAILQ=/usr/bin/mailq |
569 |
export PATH_TO_NSLOOKUP=/usr/bin/nslookup |
570 |
export PATH_TO_PING=/bin/ping |
571 |
export PATH_TO_PING6=/usr/bin/ping6 |
572 |
export PATH_TO_PS=/bin/ps |
573 |
export PATH_TO_QMAIL_QSTAT=/var/qmail/bin/qmail-qstat |
574 |
export PATH_TO_QSTAT=/usr/bin/qstat-quake |
575 |
export PATH_TO_QUAKESTAT= |
576 |
export PATH_TO_RPCINFO=/usr/sbin/rpcinfo |
577 |
export PATH_TO_SMBCLIENT=/usr/bin/smbclient |
578 |
export PATH_TO_SNMPGET=/usr/bin/snmpget |
579 |
export PATH_TO_SNMPGETNEXT=/usr/bin/snmpgetnext |
580 |
export PATH_TO_SSH=/usr/bin/ssh |
581 |
export PATH_TO_SWAP= |
582 |
export PATH_TO_SWAPINFO= |
583 |
export PATH_TO_UPTIME=/usr/bin/uptime |
584 |
export PATH_TO_WHO=/usr/bin/who |
585 |
|
586 |
%serverbuild |
587 |
|
588 |
%configure2_5x \ |
589 |
--libexecdir=%{_libdir}/nagios/plugins \ |
590 |
--disable-rpath \ |
591 |
--with-cgiurl=/nagios/cgi-bin \ |
592 |
--with-trusted-path="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" \ |
593 |
--with-openssl=%{_prefix} \ |
594 |
--with-pgsql=%{_prefix} \ |
595 |
--with-mysql=%{_prefix} \ |
596 |
--with-ping-command="/bin/ping -n -U -w %d -c %d %s" \ |
597 |
--with-ping6-command="%{_bindir}/ping6 -n -U -w %d -c %d %s" \ |
598 |
--with-ps-command="/bin/ps axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" \ |
599 |
--with-ps-format="%s %d %d %d %d %d %f %s %s %n" \ |
600 |
--with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,&procetime,procprog,&pos' \ |
601 |
--with-ps-cols=10 \ |
602 |
--with-ipv6 |
603 |
|
604 |
find . -type f -name "Makefile" -exec /usr/bin/perl -pi -e "s|-L/usr/lib|-L%{_libdir}|g" \{\} \; |
605 |
|
606 |
# anti recheck hack |
607 |
touch * |
608 |
|
609 |
export CPPFLAGS="-I%{_includedir}/ldap -I%{_includedir}/mysql -I%{_includedir}/pgsql -I%{_includedir}/openssl" |
610 |
|
611 |
make |
612 |
|
613 |
make -C plugins \ |
614 |
check_ide_smart check_ldap check_pgsql check_radius |
615 |
|
616 |
%install |
617 |
install -d -m0755 %{buildroot}%{_sysconfdir}/nagios/conf.d |
618 |
%makeinstall_std MKDIR_P="/usr/bin/mkdir -p" |
619 |
|
620 |
install -m0755 plugins/check_pgsql %{buildroot}%{_libdir}/nagios/plugins/ |
621 |
install -m0755 plugins/check_radius %{buildroot}%{_libdir}/nagios/plugins/ |
622 |
install -m0755 plugins/check_ide_smart %{buildroot}%{_libdir}/nagios/plugins/ |
623 |
install -m0755 plugins-root/check_dhcp %{buildroot}%{_libdir}/nagios/plugins/ |
624 |
install -m0755 plugins-root/check_icmp %{buildroot}%{_libdir}/nagios/plugins/ |
625 |
|
626 |
# magic by anssi |
627 |
pushd %{buildroot}%{_sysconfdir}/nagios/conf.d |
628 |
%{expand:%(for i in {101..124}; do echo "install -m 644 %%SOURCE$i ."; done)} |
629 |
%{expand:%(for i in {127..152}; do echo "install -m 644 %%SOURCE$i ."; done)} |
630 |
popd |
631 |
|
632 |
perl -pi -e 's|\@libexecdir\@|%{_libdir}/nagios/plugins|g' \ |
633 |
%{buildroot}%{_sysconfdir}/nagios/conf.d/* |
634 |
|
635 |
# fix bad paths (again!) |
636 |
for i in check_breeze check_disk_smb check_file_age check_flexlm check_ifoperstatus \ |
637 |
check_ifstatus check_ircd check_mailq check_ntp check_rpc check_wave; do |
638 |
perl -pi -e "s|\"nagios/plugins\"|\"%{_libdir}/nagios/plugins\"|g" \ |
639 |
%{buildroot}%{_libdir}/nagios/plugins/$i |
640 |
done |
641 |
|
642 |
%find_lang %{name} |
643 |
|
644 |
# make noarch pluginds installable under %{_datadir} also |
645 |
install -d -m 755 %{buildroot}%{_datadir}/nagios/plugins |
646 |
pushd %{buildroot}%{_datadir}/nagios/plugins |
647 |
ln -sf ../../../%_lib/nagios/plugins/utils.pm . |
648 |
ln -sf ../../../%_lib/nagios/plugins/utils.sh . |
649 |
popd |
650 |
|
651 |
# delete unusable plugins |
652 |
rm -f %{buildroot}%{_libdir}/nagios/plugins/check_apt |
653 |
rm -f %{buildroot}%{_libdir}/nagios/plugins/check_mrtg |
654 |
rm -f %{buildroot}%{_libdir}/nagios/plugins/check_mrtgtraf |
655 |
|
656 |
%pre |
657 |
%{_sbindir}/useradd -r -M -s /bin/sh -d /var/log/nagios -c "system user for %{nsusr}" %{nsusr} >/dev/null 2>&1 || : |
658 |
%{_bindir}/gpasswd -a %{cmdusr} %{nsgrp} >/dev/null 2>&1 || : |
659 |
|
660 |
%postun |
661 |
%_postun_userdel %{nsusr} |
662 |
|
663 |
%files -f %{name}.lang |
664 |
%doc AUTHORS CODING ChangeLog FAQ LEGAL NEWS README* REQUIREMENTS SUPPORT |
665 |
%dir %{_libdir}/nagios |
666 |
%dir %{_libdir}/nagios/plugins |
667 |
%{_libdir}/nagios/plugins/negate |
668 |
%{_libdir}/nagios/plugins/urlize |
669 |
%{_libdir}/nagios/plugins/utils.pm |
670 |
%{_libdir}/nagios/plugins/utils.sh |
671 |
%{_datadir}/nagios/plugins |
672 |
|
673 |
%files -n nagios-check_breeze |
674 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_breeze.cfg |
675 |
%{_libdir}/nagios/plugins/check_breeze |
676 |
|
677 |
%files -n nagios-check_by_ssh |
678 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_by_ssh.cfg |
679 |
%{_libdir}/nagios/plugins/check_by_ssh |
680 |
|
681 |
%files -n nagios-check_cluster |
682 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_cluster.cfg |
683 |
%{_libdir}/nagios/plugins/check_cluster |
684 |
|
685 |
%files -n nagios-check_dbi |
686 |
%{_libdir}/nagios/plugins/check_dbi |
687 |
|
688 |
%files -n nagios-check_dhcp |
689 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_dhcp.cfg |
690 |
%attr(4550,root,nagios) %{_libdir}/nagios/plugins/check_dhcp |
691 |
|
692 |
%files -n nagios-check_dig |
693 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_dig.cfg |
694 |
%{_libdir}/nagios/plugins/check_dig |
695 |
|
696 |
%files -n nagios-check_disk |
697 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_disk.cfg |
698 |
%{_libdir}/nagios/plugins/check_disk |
699 |
|
700 |
%files -n nagios-check_disk_smb |
701 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_disk_smb.cfg |
702 |
%{_libdir}/nagios/plugins/check_disk_smb |
703 |
|
704 |
%files -n nagios-check_dns |
705 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_dns.cfg |
706 |
%{_libdir}/nagios/plugins/check_dns |
707 |
|
708 |
%files -n nagios-check_dummy |
709 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_dummy.cfg |
710 |
%{_libdir}/nagios/plugins/check_dummy |
711 |
|
712 |
%files -n nagios-check_file_age |
713 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_file_age.cfg |
714 |
%{_libdir}/nagios/plugins/check_file_age |
715 |
|
716 |
%files -n nagios-check_flexlm |
717 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_flexlm.cfg |
718 |
%{_libdir}/nagios/plugins/check_flexlm |
719 |
|
720 |
%files -n nagios-check_fping |
721 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_fping.cfg |
722 |
%{_libdir}/nagios/plugins/check_fping |
723 |
|
724 |
%files -n nagios-check_game |
725 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_game.cfg |
726 |
%{_libdir}/nagios/plugins/check_game |
727 |
|
728 |
%files -n nagios-check_hpjd |
729 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_hpjd.cfg |
730 |
%{_libdir}/nagios/plugins/check_hpjd |
731 |
|
732 |
%files -n nagios-check_http |
733 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_http.cfg |
734 |
%{_libdir}/nagios/plugins/check_http |
735 |
|
736 |
%files -n nagios-check_icmp |
737 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_icmp.cfg |
738 |
%attr(4550,root,nagios) %{_libdir}/nagios/plugins/check_icmp |
739 |
|
740 |
%files -n nagios-check_ide_smart |
741 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ide_smart.cfg |
742 |
%{_libdir}/nagios/plugins/check_ide_smart |
743 |
|
744 |
%files -n nagios-check_ifoperstatus |
745 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ifoperstatus.cfg |
746 |
%{_libdir}/nagios/plugins/check_ifoperstatus |
747 |
|
748 |
%files -n nagios-check_ifstatus |
749 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ifstatus.cfg |
750 |
%{_libdir}/nagios/plugins/check_ifstatus |
751 |
|
752 |
%files -n nagios-check_ircd |
753 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ircd.cfg |
754 |
%{_libdir}/nagios/plugins/check_ircd |
755 |
|
756 |
%files -n nagios-check_ldap |
757 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ldap.cfg |
758 |
%{_libdir}/nagios/plugins/check_ldap |
759 |
%{_libdir}/nagios/plugins/check_ldaps |
760 |
|
761 |
%files -n nagios-check_load |
762 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_load.cfg |
763 |
%{_libdir}/nagios/plugins/check_load |
764 |
|
765 |
%files -n nagios-check_log |
766 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_log.cfg |
767 |
%{_libdir}/nagios/plugins/check_log |
768 |
|
769 |
%files -n nagios-check_mailq |
770 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_mailq.cfg |
771 |
%{_libdir}/nagios/plugins/check_mailq |
772 |
|
773 |
%files -n nagios-check_mysql |
774 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_mysql.cfg |
775 |
%{_libdir}/nagios/plugins/check_mysql |
776 |
|
777 |
%files -n nagios-check_mysql_query |
778 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_mysql_query.cfg |
779 |
%{_libdir}/nagios/plugins/check_mysql_query |
780 |
|
781 |
%files -n nagios-check_nagios |
782 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_nagios.cfg |
783 |
%{_libdir}/nagios/plugins/check_nagios |
784 |
|
785 |
%files -n nagios-check_nt |
786 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_nt.cfg |
787 |
%{_libdir}/nagios/plugins/check_nt |
788 |
|
789 |
%files -n nagios-check_ntp |
790 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ntp.cfg |
791 |
%{_libdir}/nagios/plugins/check_ntp |
792 |
|
793 |
%files -n nagios-check_ntp_peer |
794 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ntp_peer.cfg |
795 |
%{_libdir}/nagios/plugins/check_ntp_peer |
796 |
|
797 |
%files -n nagios-check_ntp_time |
798 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ntp_time.cfg |
799 |
%{_libdir}/nagios/plugins/check_ntp_time |
800 |
|
801 |
%files -n nagios-check_nwstat |
802 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_nwstat.cfg |
803 |
%{_libdir}/nagios/plugins/check_nwstat |
804 |
|
805 |
%files -n nagios-check_oracle |
806 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_oracle.cfg |
807 |
%{_libdir}/nagios/plugins/check_oracle |
808 |
|
809 |
%files -n nagios-check_overcr |
810 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_overcr.cfg |
811 |
%{_libdir}/nagios/plugins/check_overcr |
812 |
|
813 |
%files -n nagios-check_pgsql |
814 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_pgsql.cfg |
815 |
%{_libdir}/nagios/plugins/check_pgsql |
816 |
|
817 |
%files -n nagios-check_ping |
818 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ping.cfg |
819 |
%{_libdir}/nagios/plugins/check_ping |
820 |
|
821 |
%files -n nagios-check_procs |
822 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_procs.cfg |
823 |
%{_libdir}/nagios/plugins/check_procs |
824 |
|
825 |
%files -n nagios-check_radius |
826 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_radius.cfg |
827 |
%{_libdir}/nagios/plugins/check_radius |
828 |
|
829 |
%files -n nagios-check_real |
830 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_real.cfg |
831 |
%{_libdir}/nagios/plugins/check_real |
832 |
|
833 |
%files -n nagios-check_rpc |
834 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_rpc.cfg |
835 |
%{_libdir}/nagios/plugins/check_rpc |
836 |
|
837 |
%files -n nagios-check_sensors |
838 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_sensors.cfg |
839 |
%{_libdir}/nagios/plugins/check_sensors |
840 |
|
841 |
%files -n nagios-check_smtp |
842 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_smtp.cfg |
843 |
%{_libdir}/nagios/plugins/check_smtp |
844 |
|
845 |
%files -n nagios-check_snmp |
846 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_snmp.cfg |
847 |
%{_libdir}/nagios/plugins/check_snmp |
848 |
|
849 |
%files -n nagios-check_ssh |
850 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ssh.cfg |
851 |
%{_libdir}/nagios/plugins/check_ssh |
852 |
|
853 |
%files -n nagios-check_swap |
854 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_swap.cfg |
855 |
%{_libdir}/nagios/plugins/check_swap |
856 |
|
857 |
%files -n nagios-check_tcp |
858 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_tcp.cfg |
859 |
%{_libdir}/nagios/plugins/check_tcp |
860 |
%{_libdir}/nagios/plugins/check_imap |
861 |
%{_libdir}/nagios/plugins/check_spop |
862 |
%{_libdir}/nagios/plugins/check_simap |
863 |
%{_libdir}/nagios/plugins/check_udp |
864 |
%{_libdir}/nagios/plugins/check_pop |
865 |
%{_libdir}/nagios/plugins/check_nntp |
866 |
%{_libdir}/nagios/plugins/check_jabber |
867 |
%{_libdir}/nagios/plugins/check_clamd |
868 |
%{_libdir}/nagios/plugins/check_ftp |
869 |
%{_libdir}/nagios/plugins/check_ssmtp |
870 |
%{_libdir}/nagios/plugins/check_nntps |
871 |
|
872 |
%files -n nagios-check_time |
873 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_time.cfg |
874 |
%{_libdir}/nagios/plugins/check_time |
875 |
|
876 |
%files -n nagios-check_ups |
877 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_ups.cfg |
878 |
%{_libdir}/nagios/plugins/check_ups |
879 |
|
880 |
%files -n nagios-check_uptime |
881 |
%{_libdir}/nagios/plugins/check_uptime |
882 |
|
883 |
%files -n nagios-check_users |
884 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_users.cfg |
885 |
%{_libdir}/nagios/plugins/check_users |
886 |
|
887 |
%files -n nagios-check_wave |
888 |
%config(noreplace) %{_sysconfdir}/nagios/conf.d/check_wave.cfg |
889 |
%{_libdir}/nagios/plugins/check_wave |