]> git.pld-linux.org Git - packages/monitoring-plugins.git/blob - monitoring-plugins.spec
e5576f3111b060f25681449c7a474681a51dbf4d
[packages/monitoring-plugins.git] / monitoring-plugins.spec
1 # TODO:
2 # - package requisites for unifished packages -nwstat
3 #   REQUIREMENTS explains the dependencies.
4 # - handle --without-dbi (new package)
5 # - add --without-radius bcond
6 # - check_ide_smart deps
7
8 # Conditional build:
9 %bcond_without  ldap            # build without ldap
10
11 %include        /usr/lib/rpm/macros.perl
12 Summary:        Network Monitoring Plugins for Nagios and compatible
13 Summary(pl.UTF-8):      Wtyczki do monitorowania hostów/usług/sieci dla Nagiosa
14 Name:           monitoring-plugins
15 Version:        2.1.2
16 Release:        1
17 License:        GPL v3+
18 Group:          Networking
19 Source0:        https://www.monitoring-plugins.org/download/%{name}-%{version}.tar.gz
20 # Source0-md5:  4a210f7db012571ea58e214cef74f612
21 # https://git.pld-linux.org/projects/nagios-config
22 Source1:        nagios-plugins-config-20150412.tar.xz
23 # Source1-md5:  2f0f29735345c158d11c2009be3e1478
24 Source2:        nagios-utils.php
25 #Patch:         nagios-plugins-shared.patch # needs finishing
26 Patch0:         nagios-plugins-tainted.patch
27 Patch4:         nagios-plugins-noroot.patch
28 Patch5:         nagios-plugins-check_ping-socket-filter-warning.patch
29 Patch7:         nagios-plugins-pgsql.patch
30 Patch9:         nagios-plugins-check_log_paths.patch
31 Patch13:        nagios-plugins-check_radius_segfault.patch
32 Patch21:        nagios-plugins-check_hpjd-no-paper-out.patch
33 Patch23:        nagios-plugins-check_disk_smb-zero-cap.patch
34 Patch24:        nagios-plugins-paths.patch
35 Patch27:        nagios-plugins-ping.patch
36 URL:            https://www.monitoring-plugins.org/
37 BuildRequires:  autoconf
38 BuildRequires:  automake
39 BuildRequires:  file
40 BuildRequires:  gettext-tools >= 0.15
41 BuildRequires:  libdbi-devel
42 BuildRequires:  libtap-devel
43 BuildRequires:  libtool
44 BuildRequires:  mysql-devel
45 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.0}
46 BuildRequires:  openssl-devel >= 0.9.7d
47 BuildRequires:  perl-Net-SNMP
48 BuildRequires:  postgresql-devel
49 BuildRequires:  tar >= 1:1.22
50 BuildRequires:  xz
51 %if "%{pld_release}" == "ac"
52 BuildRequires:  radiusclient-devel
53 %else
54 BuildRequires:  radiusclient-ng-devel
55 BuildConflicts: radiusclient-devel
56 %endif
57 BuildRequires:  rpm >= 4.4.9-56
58 BuildRequires:  rpm-perlprov >= 4.1-13
59 BuildRequires:  rpmbuild(macros) >= 1.654
60 Requires:       nagios-common
61 Obsoletes:      nagios-plugins
62 Obsoletes:      netsaint-plugins
63 Conflicts:      nagios < 3.1.2-3
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %define         _sysconfdir             /etc/nagios/plugins
67 %define         plugindir               %{_prefix}/lib/nagios/plugins
68 %define         nrpeddir                /etc/nagios/nrpe.d
69 %define         _noautoprovfiles        utils.pm
70 %define         _noautoreq_perl DBD::Oracle RRD::File packet_utils snmputil utils
71
72 %description
73 Nagios is a program that will monitor hosts and services on your
74 network, and to email or page you when a problem arises or is
75 resolved. Nagios runs on a Unix server as a background or daemon
76 process, intermittently running checks on various services that you
77 specify. The actual service checks are performed by separate "plugin"
78 programs which return the status of the checks to Nagios.
79
80 This package contains the basic plugins necessary for use with the
81 nagios package.
82
83 %description -l pl.UTF-8
84 Nagios to program monitorujący hosty i usługi w sieci i powiadamiający
85 pocztą elektroniczną lub na pager o wystąpieniu lub rozwiązaniu
86 problemów. Nagios działa na serwerze uniksowym w tle lub jako demon,
87 regularnie przeprowadzając kontrolę różnych podanych mu usług. Sama
88 kontrola usług jest wykonywana poprzez oddzielne "wtyczki" - programy
89 zwracajace stan danej usługi do Nagiosa.
90
91 Ten pakiet zawiera podstawowe wtyczki do używania z pakietem nagios.
92
93 %package libs
94 Summary:        Nagios plugins base libraries
95 Summary(pl.UTF-8):      Podstawowe biblioteki wtyczek Nagiosa
96 Group:          Networking
97
98 %description libs
99 This package contains nagios plugins base libraries that plugins
100 depend on.
101
102 %description libs -l pl.UTF-8
103 Ten pakiet zawiera podstawowe biblioteki wtyczek Nagiosa, wymagane
104 przez wtyczki.
105
106 %package devel
107 Summary:        Include files that Nagios plugins may compile against
108 Group:          Development/Libraries
109 # doesn't require base
110
111 %description devel
112 This package provides include files that Nagios plugins may compile
113 against.
114
115 # NOTE for sub package requires:
116 # Requires:     nagios-common for plugins directory and nagios group
117 # and add Requires:     %{name}-libs = %{version}-%{release} for utils.{sh,pm,php}
118 ##############################################################################
119
120 %package mysql
121 Summary:        Nagios plugin to test a MySQL DBMS
122 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania systemu baz danych MySQL
123 Group:          Networking
124 Requires:       nagios-common
125
126 %description mysql
127 This plugin tests a MySQL DBMS to determine whether it is active and
128 accepting queries.
129
130 %description mysql -l pl.UTF-8
131 Ta wtyczka sprawdza serwer baz danych MySQL, aby określić, czy jest
132 aktywny i przyjmuje zapytania.
133
134 %package perl
135 Summary:        Nagios plugins written in Perl
136 Summary(pl.UTF-8):      Wtyczki Nagiosa napisane w Perlu
137 Group:          Networking
138 Requires:       nagios-common
139 # for utils.pm
140 Requires:       %{name}-libs = %{version}-%{release}
141 %if "%{_rpmversion}" >= "5"
142 BuildArch:      noarch
143 %endif
144
145 %description perl
146 This package contains Nagios plugins written in Perl.
147
148 %description perl -l pl.UTF-8
149 Ten pakiet zawiera wtyczki Nagiosa napisane w Perlu.
150
151 %package samba
152 Summary:        Nagios plugin to check remote disk using smbclient
153 Summary(pl.UTF-8):      Wtyczka Nagiosa do zdalnego sprawdzania dysku z użyciem smbclienta
154 Group:          Networking
155 Requires:       nagios-common
156 # for utils.pm
157 Requires:       %{name}-libs = %{version}-%{release}
158 Requires:       samba-client
159 %if "%{_rpmversion}" >= "5"
160 BuildArch:      noarch
161 %endif
162
163 %description samba
164 Perl Check SMB Disk plugin for Nagios.
165
166 %description samba -l pl.UTF-8
167 Perlowa wtyczka dla Nagiosa sprawdzająca dyski SMB.
168
169 %package snmp
170 Summary:        Nagios plugins using SNMP protocol to query information
171 Summary(pl.UTF-8):      Wtyczki Nagiosa używające protokołu SNMP w celu uzyskania informacji
172 Group:          Networking
173 Requires:       nagios-common
174 # for utils.pm
175 Requires:       %{name}-libs = %{version}-%{release}
176 Requires:       net-snmp-utils
177 Requires:       perl-Net-SNMP
178
179 %description snmp
180 Nagios plugins using SNMP protocol to query information.
181
182 %description snmp -l pl.UTF-8
183 Wtyczki Nagiosa używające protokołu SNMP w celu uzyskania informacji.
184
185 %package ssh
186 Summary:        Nagios plugins to check remote services via SSH
187 Summary(pl.UTF-8):      Wtyczki Nagiosa do sprawdzania zdalnych usług po SSH
188 Group:          Networking
189 Requires:       nagios-common
190 Requires:       openssh-clients
191
192 %description ssh
193 This plugin uses SSH to execute commands on a remote host.
194
195 %description ssh -l pl.UTF-8
196 Ta wtyczka używa SSH do wykonywania poleceń na zdalnym hoście.
197
198 %package -n monitoring-plugin-check_dig
199 Summary:        Nagios plugin to check DNS servers with dig
200 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania DNS-u przy użyciu programu dig
201 Group:          Networking
202 Requires:       bind-utils
203 Requires:       nagios-common
204 Provides:       nagios-plugins-dig = %{version}-%{release}
205 Obsoletes:      nagios-plugin-check_dig
206 Obsoletes:      nagios-plugins-dig
207
208 %description -n monitoring-plugin-check_dig
209 Test the DNS service on the specified host using dig.
210
211 %description -n monitoring-plugin-check_dig -l pl.UTF-8
212 Ta wtyczka sprawdza usługę DNS na podanym hoście przy użyciu programu
213 dig.
214
215 %package -n monitoring-plugin-check_dns
216 Summary:        Nagios plugin to check DNS with nslookup
217 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania DNS-u przy użyciu nslookup
218 Group:          Networking
219 Requires:       bind-utils
220 Requires:       nagios-common
221 Provides:       nagios-plugins-dns = %{version}-%{release}
222 Obsoletes:      nagios-plugin-check_dns
223 Obsoletes:      nagios-plugins-dns
224
225 %description -n monitoring-plugin-check_dns
226 This plugin uses the nslookup program to obtain the IP address for the
227 given host/domain query. A optional DNS server to use may be
228 specified. If no DNS server is specified, the default server(s)
229 specified in /etc/resolv.conf will be used.
230
231 %description -n monitoring-plugin-check_dns -l pl.UTF-8
232 Ta wtyczka używa programu nslookup do uzyskania adresu IP danego dla
233 danego zapytania o host/domenę. Można opcjonalnie podać serwer DNS,
234 który ma być użyty. Jeśli nie podano serwera DNS, używany jest
235 domyślny serwer (lub serwery) podany w /etc/resolv.conf.
236
237 %package -n monitoring-plugin-check_file_age
238 Summary:        Nagios plugin to check local file age and size
239 Group:          Networking
240 Requires:       nagios-common
241 # for utils.pm
242 Requires:       %{name}-libs = %{version}-%{release}
243 %if "%{_rpmversion}" >= "5"
244 BuildArch:      noarch
245 %endif
246
247 %description -n monitoring-plugin-check_file_age
248 Nagios plugin to check local file age and size.
249
250 %package -n monitoring-plugin-check_fping
251 Summary:        Nagios plugin to check host up state with fping
252 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania działania hosta przy użyciu programu fping
253 Group:          Networking
254 Requires:       fping
255 Requires:       nagios-common
256 Provides:       nagios-plugins-fping = %{version}-%{release}
257 Obsoletes:      nagios-plugin-check_fping
258 Obsoletes:      nagios-plugins-fping
259
260 %description -n monitoring-plugin-check_fping
261 This plugin will use the /bin/fping command to ping the specified host
262 for a fast check if the host is alive.
263
264 %description -n monitoring-plugin-check_fping -l pl.UTF-8
265 Ta wtyczka używa polecenia /bin/fping do szybkiego sprawdzenia, czy
266 dany host działa.
267
268 %package -n monitoring-plugin-check_game
269 Summary:        Nagios plugin to check status of Internet game servers
270 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania stanu serwerów gier internetowych
271 Group:          Networking
272 Requires:       nagios-common
273 Requires:       qstat
274 Provides:       nagios-plugins-qstat = %{version}-%{release}
275 Obsoletes:      nagios-plugin-check_game
276 Obsoletes:      nagios-plugins-qstat
277
278 %description -n monitoring-plugin-check_game
279 This plugin uses the 'qstat' command, the popular game server status
280 query tool.
281
282 QStat is a command-line program that displays information about
283 Internet game servers.
284
285 The servers are either down, non-responsive, or running a game. For
286 servers running a game, the server name, map name, current number of
287 players, and response time are displayed. Server rules and player
288 information may also be displayed.
289
290 %description -n monitoring-plugin-check_game -l pl.UTF-8
291 Ta wtyczka używa polecenia 'qstat' - popularnego narzędzia do zapytań
292 o stan serwerów gier.
293
294 QStat to program działający z linii poleceń wyświetlający informacje o
295 serwerach gier internetowych.
296
297 Serwery mogą być wyłączone, nie odpowiadać, bądź mieć uruchomioną grę.
298 Dla serwerów z grami wyświetlanea są: nazwa serwera, nazwa mapy,
299 aktualna liczba graczy i czas odpowiedzi. Mogą być dodatkowo
300 wyświetlone reguły serwera i informacje o graczach.
301
302 %package -n monitoring-plugin-check_ldap
303 Summary:        Nagios plugin to check LDAP servers
304 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwerów LDAP
305 Group:          Networking
306 Requires:       nagios-common
307 Suggests:       openldap
308 Provides:       nagios-plugins-ldap = %{version}-%{release}
309 Obsoletes:      nagios-plugin-check_ldap
310 Obsoletes:      nagios-plugins-ldap
311
312 %description -n monitoring-plugin-check_ldap
313 Nagios plugin to check LDAP servers.
314
315 %description -n monitoring-plugin-check_ldap -l pl.UTF-8
316 Wtyczka Nagiosa do sprawdzania serwerów LDAP.
317
318 %package -n monitoring-plugin-check_load
319 Summary:        Nagios plugin to check uptime using procps
320 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania uptime'u przy użyciu procps
321 Group:          Networking
322 Requires:       nagios-common
323 Requires:       procps
324 Provides:       nagios-plugins-procps = %{version}-%{release}
325 Obsoletes:      nagios-plugin-check_load
326 Obsoletes:      nagios-plugins-procps
327
328 %description -n monitoring-plugin-check_load
329 Nagios plugin to check uptime using procps.
330
331 %description -n monitoring-plugin-check_load -l pl.UTF-8
332 Wtyczka Nagiosa do sprawdzania uptime'u przy użyciu procps.
333
334 %package -n monitoring-plugin-check_mailq
335 Summary:        Nagios plugin to check the number of messages in the local mail queue
336 Group:          Networking
337 Requires:       nagios-common
338 # for utils.pm
339 Requires:       %{name}-libs = %{version}-%{release}
340 %if "%{_rpmversion}" >= "5"
341 BuildArch:      noarch
342 %endif
343 Obsoletes:      nagios-plugin-check_mailq
344
345 %description -n monitoring-plugin-check_mailq
346 Checks the number of messages in the mail queue (supports multiple
347 sendmail queues, qmail).
348
349 %package -n monitoring-plugin-check_nt
350 Summary:        Nagios plugin to check NT server with NSClient
351 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwera NT przy użyciu NSClienta
352 Group:          Networking
353 Requires:       %{name}-libs = %{version}-%{release}
354 Requires:       nagios-common
355 Obsoletes:      nagios-plugin-check_nt
356
357 %description -n monitoring-plugin-check_nt
358 Nagios plugin to check NT server with NSClient.
359
360 %description -n monitoring-plugin-check_nt -l pl.UTF-8
361 Wtyczka Nagiosa do sprawdzania serwera NT przy użyciu NSClienta.
362
363 %package -n monitoring-plugin-check_ntp
364 Summary:        Nagios plugin to check time using NTP protocol
365 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania czasu przy użyciu protokołu NTP
366 Group:          Networking
367 Requires:       nagios-common
368 # for utils.pm
369 Requires:       %{name}-libs = %{version}-%{release}
370 Requires:       ntp-client
371 Provides:       nagios-plugins-ntp = %{version}-%{release}
372 Obsoletes:      nagios-plugin-check_ntp
373 Obsoletes:      nagios-plugins-ntp
374
375 %description -n monitoring-plugin-check_ntp
376 Checks the local timestamp offset versus <host> with ntpdate. Checks
377 the jitter/dispersion of clock signal between <host> and its sys.peer
378 with ntpq.
379
380 %description -n monitoring-plugin-check_ntp -l pl.UTF-8
381 Ta wtyczka sprawdza przesunięcie lokalnego czasu względem danego hosta
382 przy użyciu ntpdate. Sprawdza wahania/dyspersję sygnału zegara
383 pomiędzy hostem a jego sys.peer przy użyciu ntpq.
384
385 %package -n monitoring-plugin-check_pgsql
386 Summary:        Nagios plugin to test a PostgreSQL DBMS
387 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania systemu baz danych PostgreSQL
388 Group:          Networking
389 Requires:       nagios-common
390 Provides:       nagios-plugins-pgsql = %{version}-%{release}
391 Obsoletes:      nagios-plugin-check_pgsql
392 Obsoletes:      nagios-plugins-pgsql
393
394 %description -n monitoring-plugin-check_pgsql
395 This plugin tests a PostgreSQL DBMS to determine whether it is active
396 and accepting queries. In its current operation, it simply connects to
397 the specified database, and then disconnects. If no database is
398 specified, it connects to the template1 database, which is present in
399 every functioning PostgreSQL DBMS.
400
401 %description -n monitoring-plugin-check_pgsql -l pl.UTF-8
402 Ta wtyczka sprawdza serwer baz danych PostgreSQL, aby określić, czy
403 jest aktywny i przyjmuje zapytania. Aktualnie po prostu łączy się do
404 określonej bazy danych i rozłącza. Jeśli nie podano bazy danych, łączy
405 się do bazy danych template1, obecnej w każdym działającym systemie
406 PostgreSQL.
407
408 %package -n monitoring-plugin-check_ping
409 Summary:        Nagios plugin to check host up state with ping
410 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania działania hosta przy użyciu programu ping
411 Group:          Networking
412 Requires:       iputils-ping >= 1:s20070202-1
413 Requires:       nagios-common
414 Obsoletes:      nagios-plugin-check_ping
415
416 %description -n monitoring-plugin-check_ping
417 This plugin will use the /bin/ping command to ping the specified host
418 if the host is alive.
419
420 %description -n monitoring-plugin-check_ping -l pl.UTF-8
421 Ta wtyczka używa polecenia /bin/ping do sprawdzenia, czy dany host
422 działa.
423
424 %package -n monitoring-plugin-check_radius
425 Summary:        Nagios plugin to test a radius server to see if it is accepting connections
426 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwera radius pod kątem przyjmowania połączeń
427 Group:          Networking
428 Requires:       nagios-common
429 Requires:       radiusclient
430 Provides:       nagios-plugins-radius = %{version}-%{release}
431 Obsoletes:      nagios-plugin-check_radius
432 Obsoletes:      nagios-plugins-radius
433
434 %description -n monitoring-plugin-check_radius
435 This plugin tests a radius server to see if it is accepting
436 connections.
437
438 %description -n monitoring-plugin-check_radius -l pl.UTF-8
439 Ta wtyczka sprawdza serwer usługi radius, aby zobaczyć, czy przyjmuje
440 połączenia.
441
442 %package -n monitoring-plugin-check_sensors
443 Summary:        Nagios plugin to check hardware status using the lm_sensors package
444 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania stanu sprzętu przy użyciu pakietu lm_sensors
445 Group:          Networking
446 Requires:       nagios-common
447 # for utils.sh
448 Requires:       %{name}-libs = %{version}-%{release}
449 Requires:       lm_sensors
450 Provides:       nagios-plugins-sensors = %{version}-%{release}
451 Obsoletes:      nagios-plugin-check_sensors
452 Obsoletes:      nagios-plugins-sensors
453 %if "%{_rpmversion}" >= "5"
454 BuildArch:      noarch
455 %endif
456
457 %description -n monitoring-plugin-check_sensors
458 This plugin checks hardware status using the lm_sensors package.
459
460 %description -n monitoring-plugin-check_sensors -l pl.UTF-8
461 Ta wtyczka sprawdza stan sprzętu przy użyciu pakietu lm_sensors.
462
463 %package -n monitoring-plugin-check_dbi
464 Summary:        Nagios plugin to check database with libdbi
465 Group:          Networking
466 Requires:       nagios-common
467 Suggests:       libdbi-drivers-firebird
468 Suggests:       libdbi-drivers-freetds
469 Suggests:       libdbi-drivers-mysql
470 Suggests:       libdbi-drivers-pgsql
471 Suggests:       libdbi-drivers-sqlite
472 Suggests:       libdbi-drivers-sqlite3
473 Obsoletes:      nagios-plugin-check_dbi
474
475 %description -n monitoring-plugin-check_dbi
476 Nagios plugin to check database with libdbi.
477
478 # requisite not packaged in PLD
479 %package nwstat
480 Summary:        Nagios plugin nwstat
481 Summary(pl.UTF-8):      Wtyczka nwstat do Nagiosa
482 Group:          Networking
483 Requires:       %{name}-libs = %{version}-%{release}
484 Requires:       mrtgext
485 Requires:       nagios-common
486
487 %description nwstat
488 Nagios plugin using MRTGEXT module
489 <http://forge.novell.com/modules/xfmod/project/?mrtgext>.
490
491 %description nwstat -l pl.UTF-8
492 Wtyczka nagiosa używająca modułu MRTGEXT
493 <http://forge.novell.com/modules/xfmod/project/?mrtgext>.
494
495 %package contrib
496 Summary:        Contributed nagios plugins
497 Summary(pl.UTF-8):      Wtyczki przekazane do projektu Nagios
498 Group:          Networking
499 Requires:       nagios-common
500 # for utils.pm, utils.sh, utils.py
501 Requires:       %{name}-libs = %{version}-%{release}
502 # check_apache
503 Suggests:       perl-URI
504 Suggests:       perl-libwww
505 # check_apc_ups
506 Suggests:       net-snmp-utils
507 # check_arping
508 Suggests:       perl-Net-Arping
509 # check_bgpstate
510 Suggests:       perl-Net-SNMP
511 Suggests:       whois
512 # check_traceroute
513 Suggests:       traceroute
514 # check_traceroute-pure_perl
515 Suggests:       perl-Net-Traceroute
516 # check_temp_fsc
517 Suggests:       perl-SNMP_Session
518 # check_smart
519 Suggests:       smartmontools
520 # check_smb
521 Suggests:       samba
522 # check_adptraid
523 #Suggests:      dptutil
524 # unfinished... more deps are actually needed.
525
526 %description contrib
527 Contributed nagios plugins. Some of them work, some do not. Use at
528 your own risk.
529
530 %description contrib -l pl.UTF-8
531 Wtyczki przekazane do projektu Nagios. Część z nich działa, część nie.
532
533 %prep
534 %setup -q -a1
535 mv nagios-plugins-config-*/* .
536 %patch0 -p1
537 %patch4 -p1
538 %patch5 -p1
539 %patch7 -p1
540 %patch13 -p1
541 %patch21 -p1
542 %patch23 -p1
543 %patch24 -p1
544 %patch27 -p1
545
546 # remove libtool m4 macro copies, breaks when system libtool is older
547 %{__rm} gl/m4/libtool.m4 gl/m4/lt*.m4
548
549 # cleanup backups after patching
550 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
551
552 # force regen in build
553 rm -f configure
554
555 %build
556 if [ ! -f configure ]; then
557         %{__gettextize}
558         %{__libtoolize}
559         %{__aclocal} -I m4 -I gl/m4
560         %{__autoconf}
561         %{__autoheader}
562         %{__automake}
563 fi
564
565 %configure \
566         --libexecdir=%{plugindir} \
567         --enable-libtap=/usr \
568         --with-cgiurl=/nagios/cgi-bin \
569         --with-mysql=/usr \
570         --with-pgsql=/usr \
571         --with-openssl=/usr \
572         --with-ping-command='/bin/ping -n -U -w %%d -c %%d %%s' \
573         --with-ping6-command='/bin/ping6 -n -U -w %%d -c %%d %%s' \
574         --with-ps-command="/bin/ps axwo 'stat uid ppid vsz rss pcpu comm args'" \
575         --with-ps-format="%%s %%d %%d %%d %%d %%f %%s %%n" \
576         --with-ps-cols=8 \
577         --with-ps-varlist="procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" \
578         --with-proc-meminfo=/proc/meminfo \
579         --with-proc-loadavg=/proc/loadavg \
580         --with-nslookup-command="/usr/bin/nslookup -sil" \
581         --with-uptime-command=/usr/bin/uptime \
582         --with-rpcinfo-command=/usr/sbin/rpcinfo \
583         --with-ntpdate-command=/usr/sbin/ntpdate \
584         --with-smbclient-command=/usr/bin/smbclient \
585         --with-dig-command=/usr/bin/dig \
586         --with-fping-command=/usr/sbin/fping \
587         --with-fping6-command=/usr/sbin/fping6 \
588         --with-qstat-command=/usr/bin/qstat \
589         --with-ssh-command=/usr/bin/ssh \
590         --with-snmpget-command=/usr/bin/snmpget \
591         --with-snmpgetnext-command=/usr/bin/snmpgetnext \
592         --with-df-command='/bin/df -P' \
593         --with-apt-get-command=/usr/bin/apt-get \
594         --with-qmail-qstat-command=/usr/bin/qmail-qstat \
595         --with-mailq-command=/usr/bin/mailq \
596         --without-included-regex
597
598 %{__make}
599
600 %install
601 rm -rf $RPM_BUILD_ROOT
602
603 %{__make} install \
604         DESTDIR=$RPM_BUILD_ROOT
605
606 %{__make} install-root -C plugins-root \
607         DESTDIR=$RPM_BUILD_ROOT
608
609 %{__rm} $RPM_BUILD_ROOT%{plugindir}/check_nwstat
610
611 # for nagios-plugin-check_mysql_perf (at least)
612 install -d $RPM_BUILD_ROOT%{_libdir}
613 cp -p lib/libmonitoringplug.a $RPM_BUILD_ROOT%{_libdir}
614 cp -p gl/libgnu.a $RPM_BUILD_ROOT%{_libdir}
615 cp -p plugins/utils.o $RPM_BUILD_ROOT%{_libdir}
616 cp -p plugins/netutils.o $RPM_BUILD_ROOT%{_libdir}
617 install -d $RPM_BUILD_ROOT%{_includedir}/nagiosplug/{plugins,gl,lib}
618 cp -p *.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug
619 cp -p plugins/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/plugins
620 cp -p gl/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/gl
621 cp -p lib/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/lib
622
623 install -d $RPM_BUILD_ROOT%{_sysconfdir}
624 cp -p commands/*.cfg $RPM_BUILD_ROOT%{_sysconfdir}
625
626 %find_lang %{name}
627
628 # replace USER1 macro with actual value
629 plugins=$(grep -Eoh 'command_line.*USER1\$/[^ ]+' $RPM_BUILD_ROOT%{_sysconfdir}/*.cfg | awk -F/ '{print $NF}' | sort -u)
630 for plugin in $plugins; do
631         sed -i -e "s,\\\$USER1\\\$/$plugin ,%{plugindir}/$plugin ," $RPM_BUILD_ROOT%{_sysconfdir}/*.cfg
632 done
633
634 install -d $RPM_BUILD_ROOT%{nrpeddir}
635 touch $RPM_BUILD_ROOT%{nrpeddir}/check_mailq.cfg
636
637 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{plugindir}/utils.php
638 chmod a-x $RPM_BUILD_ROOT%{plugindir}/utils.*
639
640 %clean
641 rm -rf $RPM_BUILD_ROOT
642
643 %if 0
644 # this is for shared lib
645 %post   libs    -p /sbin/ldconfig
646 %postun libs    -p /sbin/ldconfig
647 %endif
648
649 %triggerin -n monitoring-plugin-check_mailq -- nagios-nrpe
650 %nagios_nrpe -a check_mailq -f %{_sysconfdir}/check_mailq.cfg
651
652 %triggerun -n monitoring-plugin-check_mailq -- nagios-nrpe
653 %nagios_nrpe -d check_mailq -f %{_sysconfdir}/check_mailq.cfg
654
655 %files -f %{name}.lang
656 %defattr(644,root,root,755)
657 %doc ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog
658 %doc FAQ LEGAL NEWS README REQUIREMENTS SUPPORT THANKS
659
660 # plugins
661 %attr(755,root,root) %{plugindir}/check_apt
662 %attr(755,root,root) %{plugindir}/check_cluster
663 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_disk.cfg
664 %attr(755,root,root) %{plugindir}/check_disk
665 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dummy.cfg
666 %attr(755,root,root) %{plugindir}/check_dummy
667 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_http.cfg
668 %attr(755,root,root) %{plugindir}/check_http
669 %attr(755,root,root) %{plugindir}/check_ide_smart
670 %attr(755,root,root) %{plugindir}/check_mrtg
671 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mrtgtraf.cfg
672 %attr(755,root,root) %{plugindir}/check_mrtgtraf
673 %attr(755,root,root) %{plugindir}/check_nagios
674 # req: over-cr >= 0.99.53 http://www.molitor.org/overcr
675 %attr(755,root,root) %{plugindir}/check_overcr
676 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_procs.cfg
677 %attr(755,root,root) %{plugindir}/check_procs
678 %attr(755,root,root) %{plugindir}/check_real
679 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_smtp.cfg
680 %attr(755,root,root) %{plugindir}/check_smtp
681 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ssh.cfg
682 %attr(755,root,root) %{plugindir}/check_ssh
683 %attr(755,root,root) %{plugindir}/check_time
684 %attr(755,root,root) %{plugindir}/check_ups
685 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_users.cfg
686 %attr(755,root,root) %{plugindir}/check_users
687 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_swap.cfg
688 %attr(755,root,root) %{plugindir}/check_swap
689 %attr(755,root,root) %{plugindir}/check_log
690
691 # check_tcp and symlinks
692 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_tcp.cfg
693 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_telnet.cfg
694 %attr(755,root,root) %{plugindir}/check_tcp
695 %attr(755,root,root) %{plugindir}/check_clamd
696 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ftp.cfg
697 %attr(755,root,root) %{plugindir}/check_ftp
698 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_imap.cfg
699 %attr(755,root,root) %{plugindir}/check_imap
700 %attr(755,root,root) %{plugindir}/check_jabber
701 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_nntp.cfg
702 %attr(755,root,root) %{plugindir}/check_nntp
703 %attr(755,root,root) %{plugindir}/check_nntps
704 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_pop.cfg
705 %attr(755,root,root) %{plugindir}/check_pop
706 %attr(755,root,root) %{plugindir}/check_simap
707 %attr(755,root,root) %{plugindir}/check_spop
708 %attr(755,root,root) %{plugindir}/check_ssmtp
709 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_udp.cfg
710 %attr(755,root,root) %{plugindir}/check_udp
711 #%attr(755,root,root) %{plugindir}/check_uptime
712
713 # these plugins need suid bit to operate
714 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dhcp.cfg
715 %attr(755,root,root) %{plugindir}/check_dhcp
716 %attr(755,root,root) %{plugindir}/check_icmp
717
718 # Cannot determine ORACLE_HOME for sid
719 # probably needs some external programs. can't test
720 %attr(755,root,root) %{plugindir}/check_oracle
721
722 %files libs
723 %defattr(644,root,root,755)
724 #%attr(755,root,root) %{_libdir}/libmonitoringplug.so.*.*.*
725 %attr(755,root,root) %{plugindir}/negate
726 %attr(755,root,root) %{plugindir}/urlize
727
728 %{plugindir}/utils.pm
729 %{plugindir}/utils.php
730 %{plugindir}/utils.sh
731
732 %files devel
733 %defattr(644,root,root,755)
734 %{_libdir}/libgnu.a
735 %{_libdir}/libmonitoringplug.a
736 %{_libdir}/netutils.o
737 %{_libdir}/utils.o
738 %{_includedir}/nagiosplug
739
740 %files mysql
741 %defattr(644,root,root,755)
742 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mysql.cfg
743 %attr(755,root,root) %{plugindir}/check_mysql
744 %attr(755,root,root) %{plugindir}/check_mysql_query
745
746 %files perl
747 %defattr(644,root,root,755)
748 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ircd.cfg
749 %attr(755,root,root) %{plugindir}/check_ircd
750 %attr(755,root,root) %{plugindir}/check_rpc
751
752 # requires license.dat
753 %attr(755,root,root) %{plugindir}/check_flexlm
754
755 %files samba
756 %defattr(644,root,root,755)
757 %attr(755,root,root) %{plugindir}/check_disk_smb
758
759 # Not to be confused with nagios-snmp-plugins
760 %files snmp
761 %defattr(644,root,root,755)
762 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_snmp.cfg
763 %attr(755,root,root) %{plugindir}/check_snmp
764 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_hpjd.cfg
765 %attr(755,root,root) %{plugindir}/check_hpjd
766 %attr(755,root,root) %{plugindir}/check_ifoperstatus
767 %attr(755,root,root) %{plugindir}/check_ifstatus
768 %attr(755,root,root) %{plugindir}/check_wave
769 %attr(755,root,root) %{plugindir}/check_breeze
770
771 %files ssh
772 %defattr(644,root,root,755)
773 %attr(755,root,root) %{plugindir}/check_by_ssh
774
775 %files -n monitoring-plugin-check_dig
776 %defattr(644,root,root,755)
777 %attr(755,root,root) %{plugindir}/check_dig
778
779 %files -n monitoring-plugin-check_dns
780 %defattr(644,root,root,755)
781 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dns.cfg
782 %attr(755,root,root) %{plugindir}/check_dns
783
784 %files -n monitoring-plugin-check_file_age
785 %defattr(644,root,root,755)
786 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_file_age.cfg
787 %attr(755,root,root) %{plugindir}/check_file_age
788
789 %files -n monitoring-plugin-check_fping
790 %defattr(644,root,root,755)
791 %attr(2755,root,adm) %{plugindir}/check_fping
792
793 %files -n monitoring-plugin-check_game
794 %defattr(644,root,root,755)
795 %attr(755,root,root) %{plugindir}/check_game
796
797 %if %{with ldap}
798 %files -n monitoring-plugin-check_ldap
799 %defattr(644,root,root,755)
800 %attr(755,root,root) %{plugindir}/check_ldap
801 %attr(755,root,root) %{plugindir}/check_ldaps
802 %endif
803
804 %files -n monitoring-plugin-check_load
805 %defattr(644,root,root,755)
806 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_load.cfg
807 %attr(755,root,root) %{plugindir}/check_load
808
809 %files -n monitoring-plugin-check_mailq
810 %defattr(644,root,root,755)
811 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mailq.cfg
812 %attr(755,root,root) %{plugindir}/check_mailq
813 %ghost %{nrpeddir}/check_mailq.cfg
814
815 %files -n monitoring-plugin-check_nt
816 %defattr(644,root,root,755)
817 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_nt.cfg
818 %attr(755,root,root) %{plugindir}/check_nt
819
820 %files -n monitoring-plugin-check_ntp
821 %defattr(644,root,root,755)
822 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ntp.cfg
823 %attr(755,root,root) %{plugindir}/check_ntp
824 %attr(755,root,root) %{plugindir}/check_ntp_peer
825 %attr(755,root,root) %{plugindir}/check_ntp_time
826
827 %files -n monitoring-plugin-check_pgsql
828 %defattr(644,root,root,755)
829 %attr(755,root,root) %{plugindir}/check_pgsql
830
831 %files -n monitoring-plugin-check_ping
832 %defattr(644,root,root,755)
833 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ping.cfg
834 %attr(2755,root,adm) %{plugindir}/check_ping
835
836 %files -n monitoring-plugin-check_radius
837 %defattr(644,root,root,755)
838 %attr(755,root,root) %{plugindir}/check_radius
839
840 %files -n monitoring-plugin-check_sensors
841 %defattr(644,root,root,755)
842 %attr(755,root,root) %{plugindir}/check_sensors
843
844 %files -n monitoring-plugin-check_dbi
845 %defattr(644,root,root,755)
846 %attr(755,root,root) %{plugindir}/check_dbi
This page took 0.10024 seconds and 2 git commands to generate.