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