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

@ -26,7 +26,7 @@ def print_config(tubes, graph_title='Beanstalkd jobs', graph_vlabel='count'):
for state in STATES:
print '%s.label %s' % (state, state,)
print
def run():
c = connect()
tubes = c.list_tubes()['data']

View file

@ -27,27 +27,27 @@ case $1 in
echo host_name $HOST
case $VAR in
temp)
echo graph_title Temperature
echo graph_title Temperature
echo graph_vlabel degrees C
echo temp.notify_alias Temperature
echo temp.warning 26
echo temp.critical 31
echo "temp.label Temperature (degrees C)" ;;
rh)
echo graph_title Relative Humidity
echo graph_title Relative Humidity
echo graph_vlabel per cent
echo rh.notify_alias Relative Humidity
echo "rh.label Relative Humidity (%)" ;;
air)
echo graph_title Airflow
echo graph_title Airflow
echo air.notify_alias Airflow
echo air.label Airflow ;;
light)
echo graph_title Light level
echo graph_title Light level
echo light.notify_alias Light Level
echo light.label Light level ;;
sound)
echo graph_title Sound level
echo graph_title Sound level
echo sound.notify_alias Sound Level
echo sound.label Sound Level ;;
esac

View file

@ -31,7 +31,7 @@ jobs.type GAUGE
def get_data
mysql = Mysql.new(@db_conf['host'] || 'localhost',
@db_conf['username'] || 'root', @db_conf['password'],
@db_conf['username'] || 'root', @db_conf['password'],
@db_conf['database'], @db_conf['port'],
@db_conf['socket'])
result = mysql.query("SELECT count(*) FROM delayed_jobs WHERE \

View file

@ -27,9 +27,9 @@ use warnings;
# place locations here separated by commas
# names must match Region from the link below
my @regions = ("Southern California",
"Central California",
"Northern California",
my @regions = ("Southern California",
"Central California",
"Northern California",
"Greater Los Angeles area");
my $url = "http://earthquake.usgs.gov/eqcenter/catalogs/eqs1hour-M1.txt";
@ -59,7 +59,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "config")
print "graph_args --base 1000\n";
print "graph_category other\n";
print "graph_info This graph shows earthquakes by region of magnitude 1.0 or greater.\n";
print "graph_vlabel Number of Earthquakes\n";
print "graph_vlabel Number of Earthquakes\n";
for my $locale (@regions) {
$locale =~ s/\s/_/g; # replace whitespace with underscores

View file

@ -32,7 +32,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
print 'ps3.label Playstation3'
print 'graph_args --base 1000 -l 0'
else:
else:
u = urllib.urlopen(url)
soup = BeautifulSoup(u)
u.close()

View file

@ -1,7 +1,7 @@
#!/bin/sh
#
#
# Script to the signal strength of a Open GlobeSurfer II 3G router.
#
#
# Script to the signal strength of a Open GlobeSurfer II 3G router.
#
# Parameters understood:
#
@ -31,5 +31,5 @@ if [ "$1" = "config" ]; then
fi
wget -q http://192.168.1.1 -O /tmp/index.html
grep "dBm" /tmp/index.html | perl -ne 'if (/(-\d+) dBm/) {print "-en signal_strength.value ".$1}';
grep "dBm" /tmp/index.html | perl -ne 'if (/(-\d+) dBm/) {print "-en signal_strength.value ".$1}';
rm /tmp/index.html

View file

@ -30,7 +30,7 @@ Matt West < https://github.com/mhwest13/OpenTracker-Munin-Plugin >
GPLv2
=head1 MAGIC MARKERS
#%# family=auto
#%# capabilities=autoconf suggest
@ -193,8 +193,8 @@ $graphs{udp4} = {
=head2 Config Check
This block of code looks at the argument that is possibly supplied,
should it be config, it then checks to make sure the plugin
specified exists, assuming it does, it will run the do_config
should it be config, it then checks to make sure the plugin
specified exists, assuming it does, it will run the do_config
subroutine for the plugin specified, otherwise it dies complaining
about an unknown plugin.
@ -313,7 +313,7 @@ sub print_output {
This subroutine prints out the main config information for all of the graphs.
It takes one parameters, $plugin
$plugin; graph being called up to print config for
$plugin; graph being called up to print config for
Example: print_config($plugin);

View file

@ -8,7 +8,7 @@ GRAPH="pid"
SECTION="system"
run_autoconf() {
echo yes
echo yes
}
run_config() {

View file

@ -55,7 +55,7 @@ class PortMonit < Munin::Plugin
:type => :GAUGE, :min => 0
def retrieve_values
@_netstat = %x[netstat -n -P tcp | egrep "\.#{PORT} "].split( "\n" )
@ -73,7 +73,7 @@ class PortMonit < Munin::Plugin
@_result = 0
source.each { |obj| @_result += 1 if obj.match( regex ) }
return @_result
end
end

View file

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/perl
# -*- perl -*-
#
# proc_ - Munin plugin to for Process information
@ -7,17 +7,17 @@
#
# Author: Kristian Lyngstøl <kristian@redpill-linpro.com>
# Author: Trygve Vea <tv@redpill-linpro.com>
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@ -39,7 +39,7 @@ The configuration section shows the defaults
env.procname init
env.category Process Info
env.procname defines the processname as seen inside the parenthesis of the
env.procname defines the processname as seen inside the parenthesis of the
second column in /proc/pid/stat. If you don't get the data you expect, you
can check if the value is what you expect here.
@ -121,15 +121,15 @@ my @field_parameters = ('graph', 'min', 'max', 'draw', 'cdef', 'warning',
'colour', 'info', 'type');
# Data structure that defines all possible graphs (aspects) and how they
# are to be plotted. Every top-level entry is a graph/aspect. Each top-level graph
# MUST have title set and 'values'.
#
# MUST have title set and 'values'.
#
# Graphs with 'DEBUG' set to anything is omitted from 'suggest'.
#
#
# 'rpn' on values allows easy access to graphs consisting of multiple
# values from procstats. (Reverse polish notation). The RPN
# implementation only accepts +-*/ and procstats-values.
#
# Any value left undefined will be left up to Munin to define/ignore/yell
# Any value left undefined will be left up to Munin to define/ignore/yell
# about.
#
# See munin documentation or rrdgraph/rrdtool for more information.
@ -258,7 +258,7 @@ sub autoconf
exit 0;
}
# Suggest relevant aspects/values of $self.
# Suggest relevant aspects/values of $self.
# 'DEBUG'-graphs are excluded.
sub suggest
{
@ -292,7 +292,7 @@ sub print_if_exist
}
# Walk through the relevant aspect and print all top-level configuration
# values and value-definitions.
# values and value-definitions.
sub get_config
{
my $graph = $_[0];
@ -328,7 +328,7 @@ sub get_config
}
}
# Read and verify the aspect ($self).
# Read and verify the aspect ($self).
sub set_aspect
{
$self = $0;

View file

@ -1,8 +1,8 @@
#!/bin/bash
# $Id: s9y 7 2010-02-24 22:15:37Z root $
# $Id: s9y 7 2010-02-24 22:15:37Z root $
# $Rev: 7 $
# $Author: root $
# $Date: 2010-02-24 23:15:37 +0100 (Mi, 24. Feb 2010) $
# $Date: 2010-02-24 23:15:37 +0100 (Mi, 24. Feb 2010) $
#
#
: <<EOF
@ -30,7 +30,7 @@ The following configuration parameters are used by this plugin
env.critical Critical Count of Spam
env.resettype one of monthly weekly daily number (must be greater than env.critical)
(currently only monthly is supported)
=head2 DEFAULT CONFIGURATION
[s9y]
@ -93,7 +93,7 @@ if [ "$1" = "config" ]; then
echo 'spam.label SPAM'
echo "resettype $resettype"
echo "spam.value $SPAM"
exit 0
fi
@ -107,7 +107,7 @@ then
then
mysql --defaults-extra-file=$extrafile -D $database -B --skip-column-names -e "delete from serendipity_spamblocklog where 1=1;"
fi
fi
fi
fi
echo "spam.value $SPAM"

View file

@ -8,7 +8,7 @@ require LWP::UserAgent;
#
# Installation / Configuration
#
# - place munin_xcache.php in a directory on your webserver
# - place munin_xcache.php in a directory on your webserver
# - add the url config to plugin-conf.d/munin-node
#
#

View file

@ -7,7 +7,7 @@ require LWP::UserAgent;
#
# Installation / Configuration
#
# - place munin_xcache.php in a directory on your webserver
# - place munin_xcache.php in a directory on your webserver
# - add the url config to plugin-conf.d/munin-node
#
#