diff options
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-x | plugins-scripts/check_breeze.pl | 3 | ||||
-rw-r--r-- | plugins-scripts/check_disk_smb.pl | 2 | ||||
-rwxr-xr-x | plugins-scripts/check_ifoperstatus.pl | 8 | ||||
-rwxr-xr-x | plugins-scripts/check_ifstatus.pl | 2 | ||||
-rwxr-xr-x | plugins-scripts/check_ircd.pl | 4 | ||||
-rwxr-xr-x | plugins-scripts/check_log.sh | 4 | ||||
-rwxr-xr-x | plugins-scripts/check_mailq.pl | 2 | ||||
-rwxr-xr-x | plugins-scripts/check_oracle.sh | 16 | ||||
-rwxr-xr-x | plugins-scripts/check_rpc.pl | 2 | ||||
-rwxr-xr-x | plugins-scripts/check_sensors.sh | 8 | ||||
-rwxr-xr-x | plugins-scripts/check_uptime.pl | 2 | ||||
-rwxr-xr-x | plugins-scripts/check_wave.pl | 15 | ||||
-rw-r--r-- | plugins-scripts/utils.pm.in | 1 |
13 files changed, 36 insertions, 33 deletions
diff --git a/plugins-scripts/check_breeze.pl b/plugins-scripts/check_breeze.pl index 05b99203..531625c4 100755 --- a/plugins-scripts/check_breeze.pl +++ b/plugins-scripts/check_breeze.pl | |||
@@ -14,8 +14,9 @@ sub print_help (); | |||
14 | sub print_usage (); | 14 | sub print_usage (); |
15 | 15 | ||
16 | $ENV{'PATH'}='@TRUSTED_PATH@'; | 16 | $ENV{'PATH'}='@TRUSTED_PATH@'; |
17 | $ENV{'BASH_ENV'}=''; | 17 | $ENV{'BASH_ENV'}=''; |
18 | $ENV{'ENV'}=''; | 18 | $ENV{'ENV'}=''; |
19 | $ENV{'CDPATH'}=''; | ||
19 | 20 | ||
20 | Getopt::Long::Configure('bundling'); | 21 | Getopt::Long::Configure('bundling'); |
21 | GetOptions | 22 | GetOptions |
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index 15d16340..f4d33a7b 100644 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl | |||
@@ -28,7 +28,7 @@ use FindBin; | |||
28 | use lib "$FindBin::Bin"; | 28 | use lib "$FindBin::Bin"; |
29 | use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); | 29 | use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); |
30 | 30 | ||
31 | # make us session leader which makes all childs exit if we do | 31 | # make us session leader which makes all children exit if we do |
32 | setsid; | 32 | setsid; |
33 | 33 | ||
34 | sub print_help (); | 34 | sub print_help (); |
diff --git a/plugins-scripts/check_ifoperstatus.pl b/plugins-scripts/check_ifoperstatus.pl index c190ce95..e335cdad 100755 --- a/plugins-scripts/check_ifoperstatus.pl +++ b/plugins-scripts/check_ifoperstatus.pl | |||
@@ -134,7 +134,7 @@ if (defined $ifdescr || defined $iftype) { | |||
134 | } | 134 | } |
135 | if ($status==0) { | 135 | if ($status==0) { |
136 | $state = "UNKNOWN"; | 136 | $state = "UNKNOWN"; |
137 | printf "$state: could not retrive ifdescr/iftype snmpkey - $status-$snmpkey\n"; | 137 | printf "$state: could not retrieve ifdescr/iftype snmpkey - $status-$snmpkey\n"; |
138 | $session->close; | 138 | $session->close; |
139 | exit $ERRORS{$state}; | 139 | exit $ERRORS{$state}; |
140 | } | 140 | } |
@@ -187,7 +187,7 @@ if (defined $ifXTable) { | |||
187 | $name = $response->{$snmpIfDescr} ; | 187 | $name = $response->{$snmpIfDescr} ; |
188 | } | 188 | } |
189 | 189 | ||
190 | ## if AdminStatus is down - some one made a consious effort to change config | 190 | ## if AdminStatus is down - some one made a conscious effort to change config |
191 | ## | 191 | ## |
192 | if ( not ($response->{$snmpIfAdminStatus} == 1) ) { | 192 | if ( not ($response->{$snmpIfAdminStatus} == 1) ) { |
193 | $answer = "Interface $name (index $snmpkey) is administratively down."; | 193 | $answer = "Interface $name (index $snmpkey) is administratively down."; |
@@ -286,7 +286,7 @@ sub print_usage() { | |||
286 | printf "check_ifoperstatus -k <IF_KEY> -H <HOSTNAME> [-C <community>]\n"; | 286 | printf "check_ifoperstatus -k <IF_KEY> -H <HOSTNAME> [-C <community>]\n"; |
287 | printf "Copyright (C) 2000 Christoph Kron\n"; | 287 | printf "Copyright (C) 2000 Christoph Kron\n"; |
288 | printf "check_ifoperstatus.pl comes with ABSOLUTELY NO WARRANTY\n"; | 288 | printf "check_ifoperstatus.pl comes with ABSOLUTELY NO WARRANTY\n"; |
289 | printf "This programm is licensed under the terms of the "; | 289 | printf "This program is licensed under the terms of the "; |
290 | printf "GNU General Public License\n(check source code for details)\n"; | 290 | printf "GNU General Public License\n(check source code for details)\n"; |
291 | printf "\n\n"; | 291 | printf "\n\n"; |
292 | } | 292 | } |
@@ -424,7 +424,7 @@ sub process_arguments() { | |||
424 | if (defined $seclevel && defined $secname) { | 424 | if (defined $seclevel && defined $secname) { |
425 | $session_opts{'-username'} = $secname; | 425 | $session_opts{'-username'} = $secname; |
426 | 426 | ||
427 | # Must define a security level even though defualt is noAuthNoPriv | 427 | # Must define a security level even though default is noAuthNoPriv |
428 | unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) { | 428 | unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) { |
429 | usage("Must define a valid security level even though default is noAuthNoPriv"); | 429 | usage("Must define a valid security level even though default is noAuthNoPriv"); |
430 | } | 430 | } |
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl index 32984e53..38b87fcc 100755 --- a/plugins-scripts/check_ifstatus.pl +++ b/plugins-scripts/check_ifstatus.pl | |||
@@ -354,7 +354,7 @@ sub process_arguments() { | |||
354 | if (defined $seclevel && defined $secname) { | 354 | if (defined $seclevel && defined $secname) { |
355 | $session_opts{'-username'} = $secname; | 355 | $session_opts{'-username'} = $secname; |
356 | 356 | ||
357 | # Must define a security level even though defualt is noAuthNoPriv | 357 | # Must define a security level even though default is noAuthNoPriv |
358 | unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) { | 358 | unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv authPriv) ) { |
359 | usage("Must define a valid security level even though default is noAuthNoPriv"); | 359 | usage("Must define a valid security level even though default is noAuthNoPriv"); |
360 | } | 360 | } |
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl index d869ae7b..84f20229 100755 --- a/plugins-scripts/check_ircd.pl +++ b/plugins-scripts/check_ircd.pl | |||
@@ -60,7 +60,7 @@ sub print_usage (); | |||
60 | sub connection ($$$$); | 60 | sub connection ($$$$); |
61 | sub bindRemote ($$); | 61 | sub bindRemote ($$); |
62 | 62 | ||
63 | # -------------------------------------------------------------[ Enviroment ]-- | 63 | # -------------------------------------------------------------[ Environment ]-- |
64 | 64 | ||
65 | $ENV{'PATH'}='@TRUSTED_PATH@'; | 65 | $ENV{'PATH'}='@TRUSTED_PATH@'; |
66 | $ENV{'BASH_ENV'}=''; | 66 | $ENV{'BASH_ENV'}=''; |
@@ -208,7 +208,7 @@ MAIN: | |||
208 | 208 | ||
209 | # Just in case of problems, let's not hang the monitoring system | 209 | # Just in case of problems, let's not hang the monitoring system |
210 | $SIG{'ALRM'} = sub { | 210 | $SIG{'ALRM'} = sub { |
211 | print "Somthing is Taking a Long Time, Increase Your TIMEOUT (Currently Set At $TIMEOUT Seconds)\n"; | 211 | print "Something is Taking a Long Time, Increase Your TIMEOUT (Currently Set At $TIMEOUT Seconds)\n"; |
212 | exit $ERRORS{"UNKNOWN"}; | 212 | exit $ERRORS{"UNKNOWN"}; |
213 | }; | 213 | }; |
214 | 214 | ||
diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index c623a8d6..8ecdd316 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh | |||
@@ -105,11 +105,11 @@ while test -n "$1"; do | |||
105 | case "$1" in | 105 | case "$1" in |
106 | -h | --help) | 106 | -h | --help) |
107 | print_help | 107 | print_help |
108 | exit "$STATE_OK" | 108 | exit "$STATE_UNKNOWN" |
109 | ;; | 109 | ;; |
110 | -V | --version) | 110 | -V | --version) |
111 | print_revision "$PROGNAME" "$REVISION" | 111 | print_revision "$PROGNAME" "$REVISION" |
112 | exit "$STATE_OK" | 112 | exit "$STATE_UNKNOWN" |
113 | ;; | 113 | ;; |
114 | -F | --filename) | 114 | -F | --filename) |
115 | logfile=$2 | 115 | logfile=$2 |
diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl index f02c90fb..49156af3 100755 --- a/plugins-scripts/check_mailq.pl +++ b/plugins-scripts/check_mailq.pl | |||
@@ -4,7 +4,7 @@ | |||
4 | # transmittal. | 4 | # transmittal. |
5 | # | 5 | # |
6 | # Initial version support sendmail's mailq command | 6 | # Initial version support sendmail's mailq command |
7 | # Support for mutiple sendmail queues (Carlos Canau) | 7 | # Support for multiple sendmail queues (Carlos Canau) |
8 | # Support for qmail (Benjamin Schmid) | 8 | # Support for qmail (Benjamin Schmid) |
9 | 9 | ||
10 | # License Information: | 10 | # License Information: |
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index b14ec50e..59981386 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh | |||
@@ -86,20 +86,20 @@ esac | |||
86 | # Information options | 86 | # Information options |
87 | case "$cmd" in | 87 | case "$cmd" in |
88 | --help) | 88 | --help) |
89 | print_help | 89 | print_help |
90 | exit "$STATE_OK" | 90 | exit "$STATE_UNKNOWN" |
91 | ;; | 91 | ;; |
92 | -h) | 92 | -h) |
93 | print_help | 93 | print_help |
94 | exit "$STATE_OK" | 94 | exit "$STATE_UNKNOWN" |
95 | ;; | 95 | ;; |
96 | --version) | 96 | --version) |
97 | print_revision "$PROGNAME" "$REVISION" | 97 | print_revision "$PROGNAME" "$REVISION" |
98 | exit "$STATE_OK" | 98 | exit "$STATE_UNKNOWN" |
99 | ;; | 99 | ;; |
100 | -V) | 100 | -V) |
101 | print_revision "$PROGNAME" "$REVISION" | 101 | print_revision "$PROGNAME" "$REVISION" |
102 | exit "$STATE_OK" | 102 | exit "$STATE_UNKNOWN" |
103 | ;; | 103 | ;; |
104 | esac | 104 | esac |
105 | 105 | ||
diff --git a/plugins-scripts/check_rpc.pl b/plugins-scripts/check_rpc.pl index 47d6e49e..8a56b9fc 100755 --- a/plugins-scripts/check_rpc.pl +++ b/plugins-scripts/check_rpc.pl | |||
@@ -5,7 +5,7 @@ | |||
5 | # usage: | 5 | # usage: |
6 | # check_rpc host service | 6 | # check_rpc host service |
7 | # | 7 | # |
8 | # Check if an rpc serice is registered and running | 8 | # Check if an rpc service is registered and running |
9 | # using rpcinfo - $proto $host $prognum 2>&1 |"; | 9 | # using rpcinfo - $proto $host $prognum 2>&1 |"; |
10 | # | 10 | # |
11 | # Use these hosts.cfg entries as examples | 11 | # Use these hosts.cfg entries as examples |
diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh index 921e7b36..866e0e0f 100755 --- a/plugins-scripts/check_sensors.sh +++ b/plugins-scripts/check_sensors.sh | |||
@@ -26,19 +26,19 @@ print_help() { | |||
26 | case "$1" in | 26 | case "$1" in |
27 | --help) | 27 | --help) |
28 | print_help | 28 | print_help |
29 | exit "$STATE_OK" | 29 | exit "$STATE_UNKNOWN" |
30 | ;; | 30 | ;; |
31 | -h) | 31 | -h) |
32 | print_help | 32 | print_help |
33 | exit "$STATE_OK" | 33 | exit "$STATE_UNKNOWN" |
34 | ;; | 34 | ;; |
35 | --version) | 35 | --version) |
36 | print_revision "$PROGNAME" "$REVISION" | 36 | print_revision "$PROGNAME" "$REVISION" |
37 | exit "$STATE_OK" | 37 | exit "$STATE_UNKNOWN" |
38 | ;; | 38 | ;; |
39 | -V) | 39 | -V) |
40 | print_revision "$PROGNAME" "$REVISION" | 40 | print_revision "$PROGNAME" "$REVISION" |
41 | exit "$STATE_OK" | 41 | exit "$STATE_UNKNOWN" |
42 | ;; | 42 | ;; |
43 | *) | 43 | *) |
44 | sensordata=$(sensors 2>&1) | 44 | sensordata=$(sensors 2>&1) |
diff --git a/plugins-scripts/check_uptime.pl b/plugins-scripts/check_uptime.pl index f9542872..d73e40e1 100755 --- a/plugins-scripts/check_uptime.pl +++ b/plugins-scripts/check_uptime.pl | |||
@@ -110,7 +110,7 @@ $pretty_uptime .= sprintf( "%d week%s, ", $weeks, $weeks == 1 ? "" : "s" ) if | |||
110 | $pretty_uptime .= sprintf( "%d day%s, ", $days, $days == 1 ? "" : "s" ) if $days; | 110 | $pretty_uptime .= sprintf( "%d day%s, ", $days, $days == 1 ? "" : "s" ) if $days; |
111 | $pretty_uptime .= sprintf( "%d hour%s, ", $hours, $hours == 1 ? "" : "s" ) if $hours; | 111 | $pretty_uptime .= sprintf( "%d hour%s, ", $hours, $hours == 1 ? "" : "s" ) if $hours; |
112 | $pretty_uptime .= sprintf( "%d minute%s, ", $mins, $mins == 1 ? "" : "s" ) if $mins; | 112 | $pretty_uptime .= sprintf( "%d minute%s, ", $mins, $mins == 1 ? "" : "s" ) if $mins; |
113 | # Replace last occurence of comma with "and" | 113 | # Replace last occurrence of comma with "and" |
114 | $pretty_uptime =~ s/, $/ and /; | 114 | $pretty_uptime =~ s/, $/ and /; |
115 | # Always print the seconds (though it may be 0 seconds) | 115 | # Always print the seconds (though it may be 0 seconds) |
116 | $pretty_uptime .= sprintf( "%d second%s", $secs, $secs == 1 ? "" : "s" ); | 116 | $pretty_uptime .= sprintf( "%d second%s", $secs, $secs == 1 ? "" : "s" ); |
diff --git a/plugins-scripts/check_wave.pl b/plugins-scripts/check_wave.pl index 41e15f50..c24015c0 100755 --- a/plugins-scripts/check_wave.pl +++ b/plugins-scripts/check_wave.pl | |||
@@ -19,6 +19,7 @@ sub print_usage (); | |||
19 | $ENV{'PATH'}='@TRUSTED_PATH@'; | 19 | $ENV{'PATH'}='@TRUSTED_PATH@'; |
20 | $ENV{'BASH_ENV'}=''; | 20 | $ENV{'BASH_ENV'}=''; |
21 | $ENV{'ENV'}=''; | 21 | $ENV{'ENV'}=''; |
22 | $ENV{'CDPATH'}=''; | ||
22 | 23 | ||
23 | Getopt::Long::Configure('bundling'); | 24 | Getopt::Long::Configure('bundling'); |
24 | GetOptions | 25 | GetOptions |
@@ -50,34 +51,34 @@ my $critical = $1 if ($opt_c =~ /([0-9]+)/); | |||
50 | ($opt_w) || ($opt_w = shift) || ($opt_w = 60); | 51 | ($opt_w) || ($opt_w = shift) || ($opt_w = 60); |
51 | my $warning = $1 if ($opt_w =~ /([0-9]+)/); | 52 | my $warning = $1 if ($opt_w =~ /([0-9]+)/); |
52 | 53 | ||
53 | $low1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`; | 54 | $low1 = `$utils::PATH_TO_SNMPGET $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`; |
54 | @test = split(/ /,$low1); | 55 | @test = split(/ /,$low1); |
55 | $low1 = $test[2]; | 56 | $low1 = $test[2]; |
56 | 57 | ||
57 | $med1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`; | 58 | $med1 = `$utils::PATH_TO_SNMPGET $host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`; |
58 | @test = split(/ /,$med1); | 59 | @test = split(/ /,$med1); |
59 | $med1 = $test[2]; | 60 | $med1 = $test[2]; |
60 | 61 | ||
61 | $high1 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`; | 62 | $high1 = `$utils::PATH_TO_SNMPGET $host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`; |
62 | @test = split(/ /,$high1); | 63 | @test = split(/ /,$high1); |
63 | $high1 = $test[2]; | 64 | $high1 = $test[2]; |
64 | 65 | ||
65 | sleep(2); | 66 | sleep(2); |
66 | 67 | ||
67 | $snr = `snmpget $host public .1.3.6.1.4.1.762.2.5.2.1.17.1`; | 68 | $snr = `$utils::PATH_TO_SNMPGET $host public .1.3.6.1.4.1.762.2.5.2.1.17.1`; |
68 | @test = split(/ /,$snr); | 69 | @test = split(/ /,$snr); |
69 | $snr = $test[2]; | 70 | $snr = $test[2]; |
70 | $snr = int($snr*25); | 71 | $snr = int($snr*25); |
71 | 72 | ||
72 | $low2 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`; | 73 | $low2 = `$utils::PATH_TO_SNMPGET $host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`; |
73 | @test = split(/ /,$low2); | 74 | @test = split(/ /,$low2); |
74 | $low2 = $test[2]; | 75 | $low2 = $test[2]; |
75 | 76 | ||
76 | $med2 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`; | 77 | $med2 = `$utils::PATH_TO_SNMPGET $host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`; |
77 | @test = split(/ /,$med2); | 78 | @test = split(/ /,$med2); |
78 | $med2 = $test[2]; | 79 | $med2 = $test[2]; |
79 | 80 | ||
80 | $high2 = `snmpget $host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`; | 81 | $high2 = `$utils::PATH_TO_SNMPGET $host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`; |
81 | @test = split(/ /,$high2); | 82 | @test = split(/ /,$high2); |
82 | $high2 = $test[2]; | 83 | $high2 = $test[2]; |
83 | 84 | ||
diff --git a/plugins-scripts/utils.pm.in b/plugins-scripts/utils.pm.in index 386831eb..c84769fb 100644 --- a/plugins-scripts/utils.pm.in +++ b/plugins-scripts/utils.pm.in | |||
@@ -23,6 +23,7 @@ $PATH_TO_LMSTAT = "@PATH_TO_LMSTAT@" ; | |||
23 | $PATH_TO_SMBCLIENT = "@PATH_TO_SMBCLIENT@" ; | 23 | $PATH_TO_SMBCLIENT = "@PATH_TO_SMBCLIENT@" ; |
24 | $PATH_TO_MAILQ = "@PATH_TO_MAILQ@"; | 24 | $PATH_TO_MAILQ = "@PATH_TO_MAILQ@"; |
25 | $PATH_TO_QMAIL_QSTAT = "@PATH_TO_QMAIL_QSTAT@"; | 25 | $PATH_TO_QMAIL_QSTAT = "@PATH_TO_QMAIL_QSTAT@"; |
26 | $PATH_TO_SNMPGET = "@PATH_TO_SNMPGET@"; | ||
26 | 27 | ||
27 | ## common variables | 28 | ## common variables |
28 | $TIMEOUT = 15; | 29 | $TIMEOUT = 15; |