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