diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-12 08:00:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-12 08:00:29 (GMT) |
commit | 0e0c574e555bb12bbb3a4884f331f8d9d4ccbe0a (patch) | |
tree | e6e35a4ca63d939807327aeb8282757056c46cf8 /plugins-scripts/check_wave.pl | |
parent | b8908efa07b0649528e129b667deee3922e3d6d2 (diff) | |
parent | 42f593c5f2ec18ec435d56d5ba29d9317afdf6b4 (diff) | |
download | monitoring-plugins-0e0c574e555bb12bbb3a4884f331f8d9d4ccbe0a.tar.gz |
Merge pull request #1917 from RincewindsHat/additional_perl_tain_fixes
Additional perl taint fixes
Diffstat (limited to 'plugins-scripts/check_wave.pl')
-rwxr-xr-x | plugins-scripts/check_wave.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins-scripts/check_wave.pl b/plugins-scripts/check_wave.pl index 41e15f5..c24015c 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 | ||