1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 09:57:09 +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

@ -2,7 +2,7 @@
###################################################################################################
#
# Multigraph munin plugin to monitor 2wcom DSR01/DSR02 Professional Audio Satellite-Receivers
# Multigraph munin plugin to monitor 2wcom DSR01/DSR02 Professional Audio Satellite-Receivers
# through their web interface status page.
#
# To use this plugin, copy it to the munin's plugin directory (eg. /usr/share/munin/plugins)
@ -140,7 +140,7 @@ echo "graph_info Detected bit error rate (BER) before the Reed Solomon error cor
echo "ber_rs.label RS/BCH BER"
echo "ber_rs.critical 0.0002"
echo "ber_rs.info BER before Reed Solomon error correction"
echo
echo
exit 0;;
esac

View file

@ -2,8 +2,8 @@
# -*- encoding: iso-8859-1 -*-
#
# Wildcard-plugin to monitor DVB signal information via femon command line utility,
#
# To monitor a dvb device, link femon_<device> to this file.
#
# To monitor a dvb device, link femon_<device> to this file.
# E.g.
# ln -s /usr/share/munin/plugins/femon_ /etc/munin/plugins/femon_adapter0
# ...will monitor /dev/dvb/adapter0.
@ -15,13 +15,13 @@
# Parameters
# femonpath - Specify path to femon program (Default: /usr/bin/femon)
# graph_args - Specify graph args (Default: --lower-limit 0 --upper-limit 100 --rigid)
#
#
# Author: Nicolas Knotzer <nknotzer@gmail.com>
#
#
# v1.0 02/10/2011
# v1.1 20/10/2011 - Prints OSError.strerror in verbose mode, uses rsplit instead of split for parsing femon output
# v1.2 21/10/2011 - Uses subprocess.Popen instead of subprocess.check_output for better compatibility with older python versions (i.e. works with python version >= 2.4)
# v1.3 25/10/2011 - Configure upper and lower graph limits with graph_args environment variable.
# v1.3 25/10/2011 - Configure upper and lower graph limits with graph_args environment variable.
#
# Copyright (c) 2011 Nicolas Knotzer.
#
@ -70,7 +70,7 @@ def find_dvb_adapters() :
adapters.append(adapter)
except :
continue
except :
except :
verboselog('Failed to list adapters in /dev/dvb')
return(adapters)
@ -78,7 +78,7 @@ def get_dvb_adapter_name() :
global plugin_name
try :
name=[plugin_name[string.rindex(plugin_name,'_')+1:]]
# Check that the adapter exists in /dev/dvb
if not os.path.exists('/dev/dvb/'+name[0]):
verboselog('/dev/dvb/'+name[0]+' not found!')
@ -117,7 +117,7 @@ def print_dvb_adapter_values(dvb_adapter) :
try :
verboselog('Reading values from '+dvb_adapter[0])
mypipe = subprocess.Popen([os.getenv('femonpath','/usr/bin/femon'), '-H', '-c 1', '-a '+dvb_adapter[0].replace('adapter','')], stdout=subprocess.PIPE)
femon_output = mypipe.communicate()[0]
femon_output = mypipe.communicate()[0]
verboselog(femon_output)
except OSError, e:
verboselog('Cannot access femon values! Check user rights or proper femon installation.')
@ -145,13 +145,13 @@ if len(sys.argv)>1 :
print_adapter_config (dvb_adapter)
sys.exit(0)
elif sys.argv[1]=="autoconf" :
if os.path.exists(os.getenv('femonpath','/usr/bin/femon')) :
if os.path.exists(os.getenv('femonpath','/usr/bin/femon')) :
if not find_dvb_adapters():
print('no (no dvb adapters accessible)')
else :
print('yes')
sys.exit(0)
else :
else :
print('no (femon not found)')
sys.exit(0)
elif sys.argv[1]=="suggest" :
@ -179,16 +179,16 @@ femon_ - Munin wildcard-plugin to monitor dvb signal information attribute value
=head1 APPLICABLE SYSTEMS
Node with B<Python> interpreter and B<femon>
Node with B<Python> interpreter and B<femon>
installed and in function.
=head1 CONFIGURATION
=head2 Create link in service directory
To monitor a dvb device, create a link in the service directory
of the munin-node named femon_<device>, which is pointing to this file.
E.g.
ln -s /usr/share/munin/plugins/femon_ /etc/munin/plugins/femon_adapter0
@ -211,7 +211,7 @@ So following minimal configuration in plugin-conf.d/munin-node is needed.
=head2 Set Parameter if needed
femonpath - Specify path to femon program (Default: /usr/bin/femon)
=head1 INTERPRETATION