File: check_breeze.pl

package info (click to toggle)
nagios-plugins 1.4.5-1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 6,520 kB
  • ctags: 3,564
  • sloc: ansic: 34,372; perl: 12,573; sh: 10,669; python: 444; makefile: 440; awk: 45
file content (22 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

# Plugin to test signal strength on Breezecom wireless equipment
# Contributed by Jeffrey Blank

$Host=$ARGV[0];
$sig_crit=$ARGV[1];
$sig_warn=$ARGV[2];
$sig=0;
$sig = `snmpget $Host public .1.3.6.1.4.1.710.3.2.3.1.3.0`;
@test=split(/ /,$sig);
$sig=@test[2];
$sig=int($sig);
if ($sig>100){$sig=100}

print "Signal Strength at: $sig%\n";
if ($sig<$sig_crit)
  {exit(2)}
if ($sig<$sig_warn)
  {exit(1)}

exit(0);