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