I am attempting to monitor my devices with Munin and the mikrotikwirelessinterface_ script. I keep getting warning alerts (100 for the day now!) that the txccq has dropped to 0.0. I am looking for some assistance if anyone has seen this issue, or may be able to point me in the right direction.
#!/usr/bin/perl
###############################################################################
use diagnostics;
use Net::Telnet::Cisco;
use strict;
use warnings;
##############################################################################
my $TelnetPort = "23";
my $TelnetUser = "xx";
my $TelnetPass = "xxxx";
###############################################################################
## Determine Hostname
my $Host = undef;
$0 =~ /mwi_(.+)*$/;
unless ($Host = $1) {
exit 2;
}
###############################################################################
## Initiate Telnet Session
my $MT = Net::Telnet::Cisco->new(Host => $Host,
Port => $TelnetPort,
Prompt => '/[\>\#] $/',
Timeout => 50);
###############################################################################
## Configuration
if ($ARGV[0] && $ARGV[0] eq "config") {
print "host_name " . $Host . "\n";
print "graph_args -l 0 --lower-limit -100 --upper-limit 100\n";
print "graph_title Wireless Interface Quality (MACAddress)\n";
print "graph_vlabel Comms Quality\n";
print "graph_category network\n";
print "graph_info This graph shows the wireless interface statistics\n";
print "graph_order txccq rxccq txsignal txrate rxrate acttimeout noisefloor\n";
print "txccq.warning 40:\n";
print "rxccq.warning 40:\n";
print "graph_scale no\n";
print "txccq.label TX CCQ (%)\n";
print "rxccq.label RX CCQ (%)\n";
print "txsignal.label TX Signal Strength (dBm)\n";
print "acttimeout.label ACT Timeout (us)\n";
print "noisefloor.label Noise Floor (dBm)\n";
print "txrate.label TX Rate (Mbps)\n";
print "rxrate.label RX Rate (Mbps)\n";
exit;
}
###############################################################################
## Execution
if (!defined($MT->login($TelnetUser . "+ct", $TelnetPass))) {
die "Croaking: $MT->error";
} else {
my @Output = $MT->cmd("/interface wireless monitor 0 once\nD\n");
my ($rest, $tmp, $txccq, $rxccq, $txsignal, $stn, $otxccq, $acttimeout, $noisefloor, $txrate, $rxrate) = undef;
foreach my $Line (@Output) {
if (($Line =~ /tx-ccq/ && $Line !~ /overall-tx-ccq/) && $Line =~ m/(\d+)/) {
$txccq = $1;
}
if ($Line =~ /rx-ccq/ && $Line =~ m/(\d+)/) {
$rxccq = $1;
}
if ($Line =~ /tx-signal-strength/ && $Line =~ m/(.\d+)/) {
$txsignal = $1;
}
if ($Line =~ /current-ack-timeout/ && $Line =~ m/(.\d+)/) {
$acttimeout = $1;
}
if ($Line =~ /noise-floor/ && $Line =~ m/(.\d+)/) {
$noisefloor = $1;
}
if ($Line =~ /tx-rate/ && $Line =~ m/(\d+)/) {
$txrate = $1;
}
if ($Line =~ /rx-rate/ && $Line =~ m/(\d+)/) {
$rxrate = $1;
}
}
print "txccq.value " . $txccq . "\n";
print "rxccq.value " . $rxccq . "\n";
print "txsignal.value " . $txsignal . "\n";
print "acttimeout.value " . $acttimeout . "\n";
print "noisefloor.value " . $noisefloor . "\n";
print "txrate.value " . $txrate . "\n";
print "rxrate.value " . $rxrate . "\n";
exit;
}