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