1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-13 17:24:26 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -4,7 +4,7 @@
# Multigraph munin plugin to monitor Ubiquiti AirOS F (airFiber) devices various parameters. It needs
# Perl's Net::Telnet or Net::OpenSSH to be able to connect.
#
# To use this plugin, copy it to the munin's plugin directory (eg. /usr/share/munin/plugins)
# To use this plugin, copy it to the munin's plugin directory (eg. /usr/share/munin/plugins)
# under the name "ubiquiti_airfiber_". Don't change this filename! Follow these steps:
#
# 1. Give names to your devices, in fqdn style. Like "master.wlan" or "slave.wlan". To make the
@ -22,7 +22,7 @@
#
# 3. In /etc/munin/plugin-conf.d/munin-node add the following, to be able to contact
# those devices via telnet (obviously replacing these with your own data):
#
#
# [ubiquiti_airos_master.wlan]
# user root # User and Group are required only if using any of the SSH modes to store
# group root # the keys in /root/.ssh directory (or any user with homedir and shell)
@ -53,12 +53,12 @@
#
# 5. Restart the munin node by 'service munin-node restart'.
#
# If all went well, after 5 minutes or so you should have two additional nodes listed
# If all went well, after 5 minutes or so you should have two additional nodes listed
# on the Web Interface of munin.
#
# To use the script with public keys authentication and no password, set env.NetMode SSHkey, and
# create a pair of keys using command 'sudo ssh-keygen -t rsa'. This will generate in /root/.ssh
# directory two files, id_rsa and id_rsa.pub. Upload id_rsa.pub to your Ubiquiti device using
# To use the script with public keys authentication and no password, set env.NetMode SSHkey, and
# create a pair of keys using command 'sudo ssh-keygen -t rsa'. This will generate in /root/.ssh
# directory two files, id_rsa and id_rsa.pub. Upload id_rsa.pub to your Ubiquiti device using
# Services > SSH Server > Authorized Keys window. Try to log in to the device by command line
# first ('sudo ssh foobar@slave.wlan'), to save the RSA key fingerprint in the root account.
#
@ -82,7 +82,7 @@ use warnings;
my $NetMode = $ENV{'NetMode'};
if ($NetMode =~ /Telnet/) {
use Net::Telnet;
}
}
elsif ($NetMode =~ /SSH/) {
use Net::OpenSSH;
}
@ -350,20 +350,20 @@ if ($NetMode =~ /Telnet/) {
elsif ($NetMode =~ /SSHPass/) {
## Initiate SSH Session using password authentication
$SSH = Net::OpenSSH->new($Hostname,
$SSH = Net::OpenSSH->new($Hostname,
port => $Port,
user => $User,
user => $User,
password => $Pass,
timeout => 10,
# master_stderr_discard => 1,
master_opts => [-o => "StrictHostKeyChecking=no"]);
$SSH->error and
$SSH->error and
# warn "Couldn't establish SSH connection: " . $SSH->error;
&printResults(); # Nothing happens, except printing undefined results to munin
}
elsif ($NetMode =~ /SSHKey/) {
## Initiate SSH Session using public key authentication
## Initiate SSH Session using public key authentication
$SSH = Net::OpenSSH->new($Hostname,
port => $Port,
user => $User,
@ -541,8 +541,8 @@ $ping_timelo = ($1 / 1000) if ($pinglo =~ m@min/avg/max.*\s\d+(?:\.\d+)?/(\d+(?:
$packet_losslo = $1 if ($pinglo =~ /(\d+)% packet loss/);
chomp($load, $uptime, $ping_time, $packet_loss, $cpuuser, $cpusystem, $cpunice, $cpuidle, $cpuiowait, $cpuirq, $cpusoftirq, $ping_timelo, $packet_losslo,
$rxrate, $txrate, $rxpower0, $rxpower1, $powerout, $feet, $dist, $temp0, $temp1,
chomp($load, $uptime, $ping_time, $packet_loss, $cpuuser, $cpusystem, $cpunice, $cpuidle, $cpuiowait, $cpuirq, $cpusoftirq, $ping_timelo, $packet_losslo,
$rxrate, $txrate, $rxpower0, $rxpower1, $powerout, $feet, $dist, $temp0, $temp1,
$rssi0, $rssi1, $baseline, $fade, $txfreq, $rxfreq, $txmodrate, $speed);
&printResults();