summaryrefslogtreecommitdiffstats
path: root/contrib/check_wave.pl
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-02 13:16:24 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-02 13:16:24 +0200
commitb15adb7762b6caaecaa83637abfcf5fdb4802092 (patch)
tree64eddbe2aa1a7f98a140be0f7973f05d7a781ae0 /contrib/check_wave.pl
parentc4d5882b9e1d07c7b61091062b7d085fa5f00284 (diff)
downloadmonitoring-plugins-b15adb7762b6caaecaa83637abfcf5fdb4802092.tar.gz
Remove "contrib" plugins
These days, sites such as "Nagios Exchange" are a much better place for publishing plugins not maintained by the Plugins Development Team.
Diffstat (limited to 'contrib/check_wave.pl')
-rw-r--r--contrib/check_wave.pl77
1 files changed, 0 insertions, 77 deletions
diff --git a/contrib/check_wave.pl b/contrib/check_wave.pl
deleted file mode 100644
index 56b59fe0..00000000
--- a/contrib/check_wave.pl
+++ /dev/null
@@ -1,77 +0,0 @@
1#!/usr/bin/perl
2
3# CHECK_WAVE.PL
4# Plugin to test signal strength on Speedlan wireless equipment
5# Contributed by Jeffry Blank
6
7$Host=$ARGV[0];
8$sig_crit=$ARGV[1];
9$sig_warn=$ARGV[2];
10
11
12
13
14$low1 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
15@test=split(/ /,$low1);
16$low1=@test[2];
17
18
19$med1 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
20@test=split(/ /,$med1);
21$med1=@test[2];
22
23
24$high1 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
25@test=split(/ /,$high1);
26$high1=@test[2];
27
28sleep(2);
29
30
31
32$snr = `snmpget $Host public .1.3.6.1.4.1.762.2.5.2.1.17.1`;
33@test=split(/ /,$snr);
34$snr=@test[2];
35$snr=int($snr*25);
36$low2 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.8.1`;
37@test=split(/ /,$low2);
38$low2=@test[2];
39
40
41$med2 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.9.1`;
42@test=split(/ /,$med2);
43$med2=@test[2];
44
45
46$high2 = `snmpget $Host public .1.3.6.1.4.1.74.2.21.1.2.1.10.1`;
47@test=split(/ /,$high2);
48$high2=@test[2];
49
50
51
52$low=$low2-$low1;
53$med=$med2-$med1;
54$high=$high2-$high1;
55
56$tot=$low+$med+$high;
57
58
59if ($tot==0)
60 {
61 $ss=0;
62 }
63else
64 {
65 $lowavg=$low/$tot;
66 $medavg=$med/$tot;
67 $highavg=$high/$tot;
68 $ss=($medavg*50)+($highavg*100);
69 }
70printf("Signal Strength at: %3.0f%, SNR at $snr%",$ss);
71#print "Signal Strength at: $ss%, SNR at $snr%";
72if ($ss<$sig_crit)
73 {exit(2)}
74if ($ss<$sig_warn)
75 {exit(1)}
76
77exit(0);