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

@ -18,8 +18,8 @@
# - php file placed on web server , paste there below code (strip hash files first)
#
# <?php
# $error_reporting(E_NONE);
# // notice keys orders is very important
# $error_reporting(E_NONE);
# // notice keys orders is very important
# $keys = array("memorySize"=>0,"memoryAvailable"=>0,"memoryAllocated"=>0,"cachedScripts"=>0,"removedScripts"=>0,"cachedKeys"=>0);
# if(!function_exists("eaccelerator_info"))
# $info = $keys;
@ -35,7 +35,7 @@
# http://localhost/eaccelerator_status.php
# if you see the plain text with values then its working ok!
# if you see the plain text and all values are zero then probalby eaccelerator is not enabled.
# - installed wget
# - installed wget
#
#################################################################
#
@ -53,8 +53,8 @@ WGET_FLAGS="-Yoff"; # refer to wget manual, you may set extra parameters like di
# Changelog
#
# Revision 0.1 Tue 03 Feb 2009 02:16:02 PM CET _KaszpiR_
# - initial release,
#
# - initial release,
#
#################################################################
@ -79,7 +79,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args -l 0'
echo 'graph_category webserver'
echo 'graph_info This graph shows performance of the eaccelerator module on WWW server.'
echo 'memorysize.label total'
echo 'memorysize.draw AREA'
echo 'memorysize.min 0'
@ -91,7 +91,7 @@ if [ "$1" = "config" ]; then
# echo "memoryallocated.warning 92"
# echo "memoryallocated.critical 98"
echo 'memoryallocated.info Memory allocated .'
echo 'memoryavailable.label available'
echo 'memoryavailable.min 0'
echo 'memoryavailable.info Memory available .'

View file

@ -2,7 +2,7 @@
'''
Plugin to monitor performance of eaccelerator module for PHP.
To use:
To use:
1. Copy script to munin plugins folder
2. Symbolically link to eacc_memory and eacc_cached
* eacc_memory shows memory usage
@ -33,27 +33,27 @@ config = {
'graph_info This graph shows memory performance of PHP eaccelerator module\n' +
'graphs_args -1 0\n' +
'graph_category webserver\n' +
'memorysize.label total\n' +
'memorysize.draw AREA\n' +
'memorysize.min 0\n' +
'memorysize.info Total memory\n' +
'memoryallocated.label allocated\n' +
'memoryallocated.draw LINE1\n' +
'memoryallocated.min 0\n' +
'memoryallocated.info Memory allocated',
'cached':
'cached':
'graph_title eacceleratory cached scripts\n' +
'graph_info This graph shows how many scripts are cached by PHP eaccelerator module\n' +
'graphs_args -1 0\n' +
'graph_category webserver\n' +
'cachedscripts.label cached scripts\n' +
'cachedscripts.draw LINE1\n' +
'cachedscripts.min 0\n' +
'cachedscripts.info Cached scripts\n' +
'removedscripts.label removed scripts\n' +
'removedscripts.draw LINE1\n' +
'removedscripts.min 0\n' +
@ -68,16 +68,16 @@ def get_stats():
if 'auth_user' in os.environ and 'auth_pwd' in os.environ:
fetcher.add_credentials(os.environ['auth_user'], os.environ['auth_pwd'])
resp, content = fetcher.request(os.environ["cpanel"])
if resp['status'] != '200':
content = '0 0 0 0'
bits = content.split(' ')
return {'memorysize': bits[0], 'memoryallocated': bits[1], 'cachedscripts': bits[2], 'removedscripts': bits[3]}
def print_stats(command):
stats = get_stats()
for var in command_vars[command]:
print "%s.value %s" % (var, stats[var])
@ -87,19 +87,19 @@ if __name__ == "__main__":
except ImportError:
print "httplib2 not found"
sys.exit(1)
if os.environ['cpanel'] == '':
print "env.cpanel not defined in munin config"
sys.exit()
underscore = sys.argv[0].find('_')
if underscore == -1:
print "Symbolically link this file to eacc_memory or eacc_cached"
sys.exit(1)
else:
command = sys.argv[0][underscore+1:]
if len(sys.argv) > 1 and sys.argv[1] != '':
if sys.argv[1] == 'config':
print_config(command)

View file

@ -89,7 +89,7 @@ if ($resp->is_success) {
print "cached.value $v\n" if $b =~ /cached/i;
print "removed.value $v\n" if $b =~ /removed/i;
print "keys.value $v\n" if $b =~ /keys/i;
}
$b = $_;
}

View file

@ -3,7 +3,7 @@
# Plugin to monitor php5-fpm process manager, php5-fpm 5.3.3 is required
# 20100726 21:15:39 radar AT aol DOT pl
# modified by Daniel Caillibaud on 20110926
#
#
# /etc/php5/fpm/php5-fpm.conf:
#
# pm.status_path = /fpm-status

View file

@ -2,7 +2,7 @@
#################################################################
#
# Script to monitor apc usage
#
#
#################################################################
#
# Parameters understood: config, autoconf and suggest
@ -10,9 +10,9 @@
#################################################################
#
# Configuration section
#
#
# Configuration example
#
#
# [php_apc_*]
# user root
# env.URL http://localhost/php_apc.php # URL to fetch APC status
@ -30,7 +30,7 @@
#%# family=auto
#%# capabilities=autoconf suggest
# URL to the script to check APC status (defaults to
# URL to the script to check APC status (defaults to
# 'http://localhost/php_apc.php' if not configured)
URL=${URL:-'http://localhost/php_apc.php'}

View file

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# Monitor your EAccelerator usage.
# Monitor your EAccelerator usage.
# Requires: ruby
# Mandatory Parameters
@ -35,11 +35,11 @@ if ARGV[0]=="config"
print "EAccelerator Monitoring\n"
print "graph_title PHP Eaccelerator\n"
print "graph_category webserver\n"
print "Memoryusagepercentage.label Memory Usage %\n"
print "Memoryusagepercentage.warning 95\n"
print "Memoryusagepercentage.critical 95\n"
print "Memoryusage.label Memory Usage MB\n"
print "Memorymax.label Cache Size MB\n"
print "Memoryusagepercentage.label Memory Usage %\n"
print "Memoryusagepercentage.warning 95\n"
print "Memoryusagepercentage.critical 95\n"
print "Memoryusage.label Memory Usage MB\n"
print "Memorymax.label Cache Size MB\n"
print "Freememory.label Free Memory MB\n"
print "Cachedscripts.label Cached Scripts\n"
print "Removedscripts.label Removed Scripts\n"

View file

@ -30,8 +30,8 @@ Revision 0.1 2011/06/17 12:00:00 Ulrich Lusseau
. $MUNIN_LIBDIR/plugins/plugin.sh
LOGS=${logfile:-/var/log/apache2/error.log}
if [[ $1 == autoconf ]]; then
for LOG in $LOGS; do
if [[ ! -r $LOGS ]]; then
@ -43,7 +43,7 @@ if [[ $1 == autoconf ]]; then
echo yes
exit 0
fi
if [[ $1 == config ]]; then
echo 'graph_title PHP Errors from ' $LOGS
echo 'graph_args --base 1000 -l 0'

View file

@ -3,7 +3,7 @@
* Part of Munin PHP OPcache plugin - Refer to php_opcache for installation instructions.
*/
if (function_exists('opcache_get_status'))
if (function_exists('opcache_get_status'))
{
$data = opcache_get_status(false);
$output = array(

View file

@ -31,12 +31,12 @@
#env.sitename mon-code
#env.nbrpage 10
#
LOG=${logfile:-/var/log/apache2/access.log}
NAME=${sitename:undefined}
NBRPAGE=${nbrpage}
if [ "$1" = "autoconf" ]; then
if [ -r "$LOG" ]; then
echo yes
@ -46,13 +46,13 @@ if [ "$1" = "autoconf" ]; then
exit 1
fi
fi
if [ "$1" = "config" ]; then
echo 'graph_title Time to generate PHP page ' $NAME 'v2'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel Time in microsecond'
echo "graph_category webserver"
echo "graph_info This graph shows load time in ms of $target"
echo "minloadtime.label Min time"
@ -61,9 +61,9 @@ if [ "$1" = "config" ]; then
echo "avgloadtime.info Avg time"
echo "maxloadtime.label Max time"
echo "maxloadtime.info Max time"
exit 0
fi
awk '($4 ~ /[0-9]+\/[0-9]+/ && $8 !~ /\.(jpg|JPG|jpeg|JPEG|gif|GIF|png|PNG|txt|TXT|css|CSS|js|JS|zip|ZIP|bmp|BMP)$/)' $LOG | sed -e :a -e '$q;N;'$NBRPAGE',$D;ba' | awk '{print $4}' | awk -F\/ ' MIN=="" || $2 < MIN {MIN=$2} MAX=="" || $2 > MAX {MAX=$2} {SUM += $2} END {print "minloadtime.value ",MIN/1000,"\navgloadtime.value ",SUM/(NR*1000),"\nmaxloadtime.value ",MAX/1000}'

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
#
#