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

@ -1,21 +1,21 @@
#!/bin/sh
#
#
# Plugin to monitor icecast2 streams / listeners
#
#
# Contributed by drew Roberts
#
# based on the postfix_mailqueue plugin as per below
#
#
# Plugin to monitor postfix mail spools
#
#
# Contributed by Nicolai Langfeldt
#
#
# $Log$
# Revision 1.0 2008/07/04 16:02:36 zotz
# Initial work
#
#
#
#%# family=auto
#%# capabilities=autoconf

View file

@ -147,7 +147,7 @@ def hent_XML():
print "%s_%s_ogg.value %s" % (sourcename, bitrate, listeners)
else:
print sys.argv[1]
if __name__ == "__main__":
hent_XML()

View file

@ -66,7 +66,7 @@ def hent_XML():
print "%s.label %s" % (source, "/" + source)
else:
print sys.argv[1]
if __name__ == "__main__":
hent_XML()

View file

@ -1,7 +1,7 @@
#!/usr/bin/env ruby
#
# Plugin author: Gunnar Wolf <gwolf@gwolf.org>
#
#
# You are hereby granted authorization to copy, use, modify, distribute,
# and in general do anything you please with this plugin. It is too simple
# even to GPL-protect it.
@ -18,7 +18,7 @@ require 'open-uri'
def get_conf
# Default values
conf = {:host => '127.0.0.1', :port => 8000,
conf = {:host => '127.0.0.1', :port => 8000,
:username => 'admin', :password => 'hackme' }
conf.keys.each do |key|
env_key = sprintf('icecast_%s', key)
@ -28,10 +28,10 @@ def get_conf
end
def get_data(conf)
begin
data = Hpricot(open(sprintf('http://%s:%s/admin/stats',
begin
data = Hpricot(open(sprintf('http://%s:%s/admin/stats',
conf[:host], conf[:port]),
:http_basic_authentication=>[conf[:username],
:http_basic_authentication=>[conf[:username],
conf[:password]]))
rescue OpenURI::HTTPError
puts "Cannot connect: HTTP connection error"

View file

@ -50,7 +50,7 @@ pw = "yourpassword"
#exclude = ("123.123.123.123",)
exclude = ()
# Exclude these sources from calculation. This is useful to excluse special sources like
# Exclude these sources from calculation. This is useful to excluse special sources like
# fallback sources which doesn't expose the same informations and then break this script
# Ever add fallback sources to this list
#source_exclude = ["/fallback.mp3", "/fallback.ogg"]
@ -141,7 +141,7 @@ except IndexError:
if plugin_name == "icecast_uptime":
for s in sources:
print "%s.value %s" % (s["mount"].strip("/").replace(".","_").replace("-","_"), int(s["connected"]) / 3600.)
elif plugin_name == "icecast_traffic":
f = opener.open("http://%s/admin/stats.xml" % server)
tree = ElementTree()