1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +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

@ -9,7 +9,7 @@
# as per the instructions on the munin wiki
# http://munin.projects.linpro.no/wiki/Using_SNMP_plugins
# By default the SNMP server is disabled, you can enable it in the web admin
# You will need to set up the "virtual node" configuration as detailed
# You will need to set up the "virtual node" configuration as detailed
# for snmp plugins
# Plugin will require some configuration in /etc/munin/plugin-conf.d/ag241_MODEMADDRESS
@ -35,7 +35,7 @@
require 'net/http'
#default parameters
host = nil
host = nil
port = ENV['port'] || 80
user = ENV['user'] || 'admin'
pass = ENV['pass'] || 'forhax' #dont remember what the default admin password was

View file

@ -6,7 +6,7 @@
#
# Author: Andreas Kreisl
#
# Licence: Creative Commons - Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
# Licence: Creative Commons - Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
# http://creativecommons.org/licenses/by-sa/3.0/
#
##############################

View file

@ -5,7 +5,7 @@
=head1 NAME
epc3010_ - munin-plugin to monitor Upstream/Downstream Power Levels and Signal to Noise Ratio on Cisco EPC3010 EuroDocsis 3.0 Data Modem
epc3010_ - munin-plugin to monitor Upstream/Downstream Power Levels and Signal to Noise Ratio on Cisco EPC3010 EuroDocsis 3.0 Data Modem
=head1 CONFIGURATION
@ -43,9 +43,9 @@ DIRECTION=${0##*epc3010_}
# Check if argument is autoconfig or config
case "$1" in
autoconfig)
autoconfig)
# Does your network have a Cisco EPC3010?
curl -s http://192.168.100.1/Docsis_system.asp | grep -q "Cisco EPC3010"
curl -s http://192.168.100.1/Docsis_system.asp | grep -q "Cisco EPC3010"
if [ $? -eq 0 ]; then
echo "yes"
exit 0
@ -54,7 +54,7 @@ autoconfig)
exit 1
fi
;;
config)
config)
if [ $DIRECTION == "downstream" ]; then
printf "graph_title Cisco EPC3010 Downstream measurements\n";
printf "graph_args -l 0 --base 1000\n"

View file

@ -1,6 +1,6 @@
#!/bin/bash
#
#
#
#
# Script to show adsl router stats for routers with Conexant based chips and the standard Conexant web admin gui like the eTec EpicRouter...
#
# Parameters understood:

View file

@ -43,15 +43,15 @@ def output
agent = Mechanize.new
x = agent.get(router_path)
salt = x.body.match(/salt = "(.*)"/)[1]
# pad the pasword to length 16
pad_size = (16 - password.length)
padded_password = password + "\x01" * pad_size
# pad it the rest of the way, length 64 for user
salted_password = salt + padded_password + ("\x01" * (63 - salt.length - padded_password.length)) + "U"
login_hash = salt + Digest::MD5.hexdigest(salted_password)
# authenticate against the router using the hash that we just built
login_path = "#{router_path}/post_login.xml?hash=#{login_hash}"
x = agent.get(login_path)
@ -120,7 +120,7 @@ def output
puts "#{i}_coll.value " + nics[i]["tx_collisions"]
puts "#{i}_err.value " + nics[i]["rx_errors"]
end
# graph stats for each interface
for i in [ "LAN", "WAN", "WLAN" ] do
puts "multigraph if_packets.#{i}"
@ -215,7 +215,7 @@ def config
puts 'send.type DERIVE'
puts 'send.negative recv'
puts 'send.min 0'
puts "multigraph if_drop.#{i}"
puts "graph_title D-Link DIR-655 #{i} drops"
puts 'graph_category network'
@ -229,7 +229,7 @@ def config
puts 'send.type DERIVE'
puts 'send.negative recv'
puts 'send.min 0'
puts "multigraph if_collerr.#{i}"
puts "graph_title D-Link DIR-655 #{i} collisions & errors"
puts 'graph_category network'

View file

@ -28,7 +28,7 @@ fi
# create temp file for storing wget output
TMPFILE=$(mktemp)
# if we have auth variables then add them to
# if we have auth variables then add them to
# wget cmdline
if [[ "$DSLUSER" != "" && "$DSLPASS" != "" ]]
then

View file

@ -41,7 +41,7 @@ fi
TMPFILE=$(mktemp)
# if we have auth variables then add them to
# if we have auth variables then add them to
# wget cmdline
if [[ "$DSLUSER" != "" && "$DSLPASS" != "" ]]
then

View file

@ -22,7 +22,7 @@
# Running: HP embedded
# OS details: HP Onboard Administrator management console
# Uptime: 7.226 days (since Thu Dec 9 21:01:44 2010)
#
#
# OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
# Nmap done: 1 IP address (1 host up) scanned in 29.279 seconds
# ----------------------------------------------------------------------------------------------------
@ -71,7 +71,7 @@ if [ "$1" = "autoconf" ]; then
echo "no (Freebox not reachable)"
exit 2
else
echo yes
echo yes
exit 0
fi
fi
@ -87,7 +87,7 @@ if [ "$1" = "config" ]; then
graph_info="Shows the uptime of your freebox (cache: ${CACHE_HOURS}h"
if [ -f $CACHE_FILE ]; then
lastCheck=$(stat -c %z $CACHE_FILE | cut -d"." -f1)
lastReboot=$(awk -F"@" '{print $2}' $CACHE_FILE)
lastReboot=$(awk -F"@" '{print $2}' $CACHE_FILE)
graph_info="${graph_info} - last check: ${lastCheck} - last reboot: $lastReboot"
else
graph_info="${graph_info})"

View file

@ -126,7 +126,7 @@ class JunOSSnmpClient(object):
return int(varBindTable[0][1])
def get_data(self):
devs = self.get_devices()
@ -179,7 +179,7 @@ else:
if not (host and port and community):
print "# Bad configuration. Cannot run with Host=%s, port=%s and community=%s" % (host, port, community)
sys.exit(1)
if "config" in sys.argv[1:]:
c.print_config()
else:

View file

@ -222,7 +222,7 @@ else:
if not (host and port and community):
print "# Bad configuration. Cannot run with Host=%s, port=%s and community=%s" % (host, port, community)
sys.exit(1)
if "config" in sys.argv[1:]:
c.print_config()
else:

View file

@ -33,7 +33,7 @@ PoE ports.
Information is gathered from Linksys' private MIB space, so it's probably only
applicable to Linksys devices. I have been unable to get an actual copy of
the appropriate MIB, so I don't know the actual names of the values I'm
the appropriate MIB, so I don't know the actual names of the values I'm
retrieving.
=head1 MAGIC MARKERS

View file

@ -1,8 +1,8 @@
#!/bin/bash
#
#
# Munin plugin to show the up- / download stream of the actual
# internet connection by reading the top_status.htm from the
# Munin plugin to show the up- / download stream of the actual
# internet connection by reading the top_status.htm from the
# Speedport 300
#
#

View file

@ -13,7 +13,7 @@ Requires perl and either WWW::Mechanize or Net::Telnet.
=head1 CONFIGURATION
The plugin needs HTML access to the router. If you can get to http://YOUR_ROUTER/,
and are greeting with a page titled "THOMSON TG585 v7", then you can probably use this plugin.
and are greeting with a page titled "THOMSON TG585 v7", then you can probably use this plugin.
This is a wildcard plugin, so you will need to create symlinks to this plugin (or create copies if your filesystem doesn't support linking). Links should be of the form: