1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
|
From 48c83ab1bc1ef596129fad8634b8ec09f4a1e329 Mon Sep 17 00:00:00 2001
From: Christian Ruppert <idl0r@gentoo.org>
Date: Tue, 31 Jul 2012 23:47:20 +0200
Subject: [PATCH] Fix some paths, bug 366403
---
contrib/check_apc_ups.pl | 2 +-
contrib/check_appletalk.pl | 2 +-
contrib/check_dns_random.pl | 9 ++++-----
contrib/check_flexlm.pl | 2 +-
contrib/check_ica_master_browser.pl | 2 +-
contrib/check_ica_metaframe_pub_apps.pl | 2 +-
contrib/check_inodes-freebsd.pl | 2 +-
contrib/check_linux_raid.pl | 2 +-
contrib/check_lmmon.pl | 2 +-
contrib/check_lotus.pl | 2 +-
contrib/check_ms_spooler.pl | 2 +-
contrib/check_nagios_db.pl | 4 ++--
contrib/check_nmap.py | 2 +-
contrib/check_oracle_tbs | 4 ++--
contrib/check_pfstate | 2 +-
contrib/check_snmp_disk_monitor.pl | 4 ++--
contrib/check_snmp_printer.pl | 2 +-
contrib/check_snmp_process_monitor.pl | 6 +++---
contrib/check_snmp_procs.pl | 2 +-
contrib/check_wins.pl | 2 +-
contrib/sched_downtime.pl | 2 +-
21 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/contrib/check_apc_ups.pl b/contrib/check_apc_ups.pl
index 6bf1766..758da2f 100644
--- a/contrib/check_apc_ups.pl
+++ b/contrib/check_apc_ups.pl
@@ -13,7 +13,7 @@ use strict;
use Getopt::Long;
use vars qw($opt_V $opt_h $opt_H $opt_T $opt_t $opt_R $opt_r
$opt_L $opt_l $PROGNAME);
-use lib "/usr/local/nagios/libexec";
+use lib "/usr/lib/nagios/plugins";
use utils qw(%ERRORS &print_revision &support &usage);
sub print_help ();
diff --git a/contrib/check_appletalk.pl b/contrib/check_appletalk.pl
index 9277686..2b18084 100644
--- a/contrib/check_appletalk.pl
+++ b/contrib/check_appletalk.pl
@@ -22,7 +22,7 @@ BEGIN {
}
use strict;
-use lib "/usr/local/nagios/libexec";
+use lib "/usr/lib/nagios/plugins";
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use vars qw($PROGNAME);
diff --git a/contrib/check_dns_random.pl b/contrib/check_dns_random.pl
index 4bed412..efd5587 100644
--- a/contrib/check_dns_random.pl
+++ b/contrib/check_dns_random.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
# ------------------------------------------------------------------------------
# File Name: check_dns_random.pl
# Author: Richard Mayhew - South Africa
@@ -33,9 +33,9 @@ $|=1;
my $host = shift || &usage;
-my $domainfile = "/usr/local/nagios/etc/domains.list";
+my $domainfile = "/etc/domains.list";
my $wc = `/usr/bin/wc -l $domainfile`;
-my $check = "/usr/local/nagios/libexec/check_dns";
+my $check = "/usr/lib/nagios/plugins/check_dns";
my $x = 0;
my $srv_file = "";
my $z = "";
@@ -49,8 +49,7 @@ open(DOMAIN,"<$domainfile") or die "Error Opening $domainfile File!\n";
my @data = split(/\n/,$srv_file);
chomp $wc;
-$wc =~ s/ //g;
-$wc =~ s/domains//g;
+$wc =~ s/([[:digit:]]+) .*/$1/g;
$x = rand $wc;
($z,$y) = split(/\./,$x);
diff --git a/contrib/check_flexlm.pl b/contrib/check_flexlm.pl
index 8fa0e33..3b9b57d 100644
--- a/contrib/check_flexlm.pl
+++ b/contrib/check_flexlm.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
#
# usage:
# check_flexlm.pl license_file
diff --git a/contrib/check_ica_master_browser.pl b/contrib/check_ica_master_browser.pl
index 922e718..ed8b9db 100755
--- a/contrib/check_ica_master_browser.pl
+++ b/contrib/check_ica_master_browser.pl
@@ -12,7 +12,7 @@ use IO::Socket;
use IO::Select;
use Getopt::Long ;
-use lib qw(/usr/local/nagios/libexec) ;
+use lib qw(/usr/lib/nagios/plugins) ;
use utils qw(%ERRORS &print_revision &support &usage);
use packet_utils qw(&pdump &tethereal) ;
diff --git a/contrib/check_ica_metaframe_pub_apps.pl b/contrib/check_ica_metaframe_pub_apps.pl
index 0edbdca..8110030 100755
--- a/contrib/check_ica_metaframe_pub_apps.pl
+++ b/contrib/check_ica_metaframe_pub_apps.pl
@@ -17,7 +17,7 @@ use Getopt::Long ;
my ($bcast_addr, $timeout, $debug, @citrix_servers, $crit_pub_apps, $warn_pub_apps, $long_list) ;
-use lib qw(/usr/local/nagios/libexec) ;
+use lib qw(/usr/lib/nagios/plugins) ;
use utils qw(%ERRORS &print_revision &support &usage) ;
use packet_utils qw(&pdump &tethereal) ;
diff --git a/contrib/check_inodes-freebsd.pl b/contrib/check_inodes-freebsd.pl
index d66e5e3..ebd1f49 100644
--- a/contrib/check_inodes-freebsd.pl
+++ b/contrib/check_inodes-freebsd.pl
@@ -15,7 +15,7 @@
use strict;
use Getopt::Long;
use vars qw($opt_V $opt_h $opt_w $opt_c $opt_f $verbose $PROGNAME);
-use lib "/usr/local/libexec/nagios" ;
+use lib "/usr/lib/nagios/plugins" ;
use utils qw($TIMEOUT %ERRORS &print_revision &support);
my $df = "/bin/df";
diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl
index 77e75f6..ab982cd 100644
--- a/contrib/check_linux_raid.pl
+++ b/contrib/check_linux_raid.pl
@@ -23,7 +23,7 @@
# WARNING md0 status=[UUU_U], recovery=46.4%, finish=123.0min
use strict;
-use lib "/usr/local/nagios/libexec";
+use lib "/usr/lib/nagios/plugins";
use utils qw(%ERRORS);
# die with an error if we're not on Linux
diff --git a/contrib/check_lmmon.pl b/contrib/check_lmmon.pl
index bf4b438..7fb471b 100644
--- a/contrib/check_lmmon.pl
+++ b/contrib/check_lmmon.pl
@@ -6,7 +6,7 @@ if ($#ARGV < 1) {
print "Usage: $0 <critical temp> <warning temp> <normal temp>\n";
exit; } $crit = shift; $warn = shift; $norm = shift; if ($warn >
$crit) { print "Warning level cannot be greater than critical
-level!\n"; exit; } @b = qx{/usr/local/bin/lmmon -s}; foreach(@b) { @c
+level!\n"; exit; } @b = qx{/usr/bin/lmmon -s}; foreach(@b) { @c
= split(/ \/ /, $_); $d = $c[1]; } @e = split(/F/, $d); $f = $e[0];
$status = "$f degrees F\n";
diff --git a/contrib/check_lotus.pl b/contrib/check_lotus.pl
index 8bedced..9cda571 100755
--- a/contrib/check_lotus.pl
+++ b/contrib/check_lotus.pl
@@ -17,7 +17,7 @@ use Getopt::Long ;
my ($timeout, $debug, $lotus_host, $server, $indiv_dn, $packet_debug) ;
-use lib qw(/usr/local/nagios/libexec) ;
+use lib qw(/usr/lib/nagios/plugins) ;
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage) ;
use packet_utils qw(pdump &tethereal) ;
diff --git a/contrib/check_ms_spooler.pl b/contrib/check_ms_spooler.pl
index 3a80a76..748203c 100755
--- a/contrib/check_ms_spooler.pl
+++ b/contrib/check_ms_spooler.pl
@@ -52,7 +52,7 @@ sub version ();
delete @ENV{'PATH', 'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
-use constant SMBCLIENT_PATH => '/usr/local/samba/bin/smbclient' ;
+use constant SMBCLIENT_PATH => '/usr/bin/smbclient' ;
use constant MAX_QUEUES_TO_CHECK => 20 ; # So that the check doesn't take longer than $TIMEOUT
use constant SMBCLIENT_SVC => sub { return `${\SMBCLIENT_PATH} -L //$_[0] -U $_[1]%$_[2]` } ;
diff --git a/contrib/check_nagios_db.pl b/contrib/check_nagios_db.pl
index 5811d7c..3774ab0 100644
--- a/contrib/check_nagios_db.pl
+++ b/contrib/check_nagios_db.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!/usr/bin/perl -w
use strict;
$|++;
@@ -12,7 +12,7 @@ use DBI;
my $driver = "mysql";
-my $CFG_DEF = "/opt/nagios/etc/cgi.cfg";
+my $CFG_DEF = "/etc/nagios/cgi.cfg";
my $QUERY = "select *, UNIX_TIMESTAMP(last_update) as ut from programstatus;";
my $EXPIRE_DEF = 5; ## expressed in minutes
my $PROCCNT = 0;
diff --git a/contrib/check_nmap.py b/contrib/check_nmap.py
index 07f6d7f..07e2e54 100644
--- a/contrib/check_nmap.py
+++ b/contrib/check_nmap.py
@@ -54,7 +54,7 @@ from getopt import getopt
import utils
# Where temp files should be placed
-tempfile.tempdir='/usr/local/nagios/var'
+tempfile.tempdir='/var/nagios'
# Base name for tempfile
tempfile.template='check_nmap_tmp.'
diff --git a/contrib/check_oracle_tbs b/contrib/check_oracle_tbs
index 8281a4e..b35a232 100644
--- a/contrib/check_oracle_tbs
+++ b/contrib/check_oracle_tbs
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!/usr/bin/perl -w
# (c)2004 John Koyle, RFP Depot, LLC.
# This is free software use it however you would like.
@@ -6,7 +6,7 @@
use strict;
use DBI;
use Getopt::Long 2.16;
-use lib "/usr/local/nagios/libexec";
+use lib "/usr/lib/nagios/plugins";
use utils qw(%ERRORS);
diff --git a/contrib/check_pfstate b/contrib/check_pfstate
index 57dde3f..14d15f4 100644
--- a/contrib/check_pfstate
+++ b/contrib/check_pfstate
@@ -3,7 +3,7 @@
use strict;
use Getopt::Long;
use vars qw($opt_V $opt_h $opt_P $opt_H $opt_w $opt_c $PROGNAME);
-use lib "/usr/local/nagios/libexec" ;
+use lib "/usr/lib/nagios/plugins" ;
use utils qw(%ERRORS &print_revision &support &usage);
my $remote_user = "root";
diff --git a/contrib/check_snmp_disk_monitor.pl b/contrib/check_snmp_disk_monitor.pl
index 9a2edaa..f752afb 100644
--- a/contrib/check_snmp_disk_monitor.pl
+++ b/contrib/check_snmp_disk_monitor.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
# author: Al Tobey <albert.tobey@priority-health.com>
# what: monitor diskspace using the host-resources mib
# license: GPL - http://www.fsf.org/licenses/gpl.txt
@@ -7,7 +7,7 @@
use strict;
require 5.6.0;
-use lib qw( /opt/nagios/libexec );
+use lib qw( /usr/lib/nagios/plugins );
use utils qw(%ERRORS $TIMEOUT &print_revision &support &usage);
use SNMP 5.0;
use Getopt::Long;
diff --git a/contrib/check_snmp_printer.pl b/contrib/check_snmp_printer.pl
index cc7943b..83b05af 100755
--- a/contrib/check_snmp_printer.pl
+++ b/contrib/check_snmp_printer.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl -w
+#!/usr/bin/perl -w
# check_snmp_printer - check for printer status via snmp
# Supports both standard PRINT-MIB (RFC-1759) and HP Enterprise print-mib
diff --git a/contrib/check_snmp_process_monitor.pl b/contrib/check_snmp_process_monitor.pl
index 0f44597..abfd40a 100644
--- a/contrib/check_snmp_process_monitor.pl
+++ b/contrib/check_snmp_process_monitor.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
# author: Al Tobey <albert.tobey@priority-health.com>
# what: monitor a process using the host-resources mib
# license: GPL - http://www.fsf.org/licenses/gpl.txt
@@ -15,7 +15,7 @@
use strict;
require 5.6.0;
-use lib qw( /opt/nagios/libexec /usr/local/libexec );
+use lib qw( /usr/lib/nagios/plugins );
use utils qw(%ERRORS $TIMEOUT &print_revision &support &usage);
use SNMP 5.0;
use Getopt::Long;
@@ -37,7 +37,7 @@ $opt_nocache = undef;
$cache_exp = 600;
$exit = $ERRORS{OK};
$interpreters = '(perl|/bin/sh|/usr/bin/sh|/bin/bash|/bin/ksh|python)';
-our $cachefile = '/var/opt/nagios/tmp/'; # completed later
+our $cachefile = '/var/nagios/tmp/'; # completed later
our %processes = ();
sub process_options {
diff --git a/contrib/check_snmp_procs.pl b/contrib/check_snmp_procs.pl
index 4d19ff1..de5a8fe 100644
--- a/contrib/check_snmp_procs.pl
+++ b/contrib/check_snmp_procs.pl
@@ -35,7 +35,7 @@
#use strict;
use Getopt::Long;
use Net::SNMP qw (oid_lex_sort oid_base_match SNMP_VERSION_1);
-use lib "/usr/local/nagios/libexec";
+use lib "/usr/lib/nagios/plugins";
use utils qw(%ERRORS &print_revision &support &usage);
my $PROGNAME="check_snmp_procs";
diff --git a/contrib/check_wins.pl b/contrib/check_wins.pl
index f11f864..701fa30 100755
--- a/contrib/check_wins.pl
+++ b/contrib/check_wins.pl
@@ -17,7 +17,7 @@ use strict ;
use Getopt::Long ;
use vars qw($opt_H $opt_D $opt_W $opt_T $debug @my_dcs);
-use lib '/usr/local/nagios/libexec/' ;
+use lib '/usr/lib/nagios/plugins/' ;
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage);
my $PROGNAME = 'check_wins' ;
diff --git a/contrib/sched_downtime.pl b/contrib/sched_downtime.pl
index b46b482..1e358f4 100644
--- a/contrib/sched_downtime.pl
+++ b/contrib/sched_downtime.pl
@@ -7,7 +7,7 @@
#
use POSIX qw(strtol);
-my $command_file = '/usr/local/nagios/var/rw/nagios.cmd';
+my $command_file = '/var/nagios/rw/nagios.cmd';
my $hour = (60*60);
my $next_day = (24*60*60);
--
1.7.8.6
|