mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -81,8 +81,3 @@ done
|
||||||
|
|
||||||
|
|
||||||
echo "threads.value `echo $((SUM / $COUNT))`"
|
echo "threads.value `echo $((SUM / $COUNT))`"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ sub count {
|
||||||
|
|
||||||
if ($time) {
|
if ($time) {
|
||||||
# microsec to millisec
|
# microsec to millisec
|
||||||
$time=sprintf("%d",$time/1000);
|
$time=sprintf("%d",$time/1000);
|
||||||
|
|
||||||
# min/max execution time
|
# min/max execution time
|
||||||
$temp{$vpm}{'max_time'}=max($temp{$vpm}{'max_time'},$time) || 0;
|
$temp{$vpm}{'max_time'}=max($temp{$vpm}{'max_time'},$time) || 0;
|
||||||
|
|
|
@ -17,23 +17,23 @@ use LWP;
|
||||||
use Mail::Sendmail;
|
use Mail::Sendmail;
|
||||||
|
|
||||||
# -------------------------- DEBUG VARS ---------------------------------
|
# -------------------------- DEBUG VARS ---------------------------------
|
||||||
my $DEBUG = 0; # for debugging purpose
|
my $DEBUG = 0; # for debugging purpose
|
||||||
my $EMAILDEBUG = 0; # for email debugging
|
my $EMAILDEBUG = 0; # for email debugging
|
||||||
my $pluginname = &basename( "$0" ); # get the basename of the plugin
|
my $pluginname = &basename( "$0" ); # get the basename of the plugin
|
||||||
my @to = qw( webmaster@bguel.info ); # the list of admins receivced messages on an
|
my @to = qw( webmaster@bguel.info ); # the list of admins receivced messages on an
|
||||||
my $from = "$pluginname-at-host\@guel.info"; # the host from where it comes
|
my $from = "$pluginname-at-host\@guel.info"; # the host from where it comes
|
||||||
my $muninnodename = "mail.guel.info"; # the Node from where it comes
|
my $muninnodename = "mail.guel.info"; # the Node from where it comes
|
||||||
my $smtp = "mail.guel.info"; # the smtp relay to send the mail
|
my $smtp = "mail.guel.info"; # the smtp relay to send the mail
|
||||||
|
|
||||||
# ------------------------- GLOBAL VARS ---------------------------------
|
# ------------------------- GLOBAL VARS ---------------------------------
|
||||||
my $version = "1.0"; # UA Version
|
my $version = "1.0"; # UA Version
|
||||||
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
|
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
|
||||||
my $url = "http://localhost:55553/"; # (defaults to localhost)
|
my $url = "http://localhost:55553/"; # (defaults to localhost)
|
||||||
my $response = 0; # the server output
|
my $response = 0; # the server output
|
||||||
my @content = (); # the content we're retrive from $response
|
my @content = (); # the content we're retrive from $response
|
||||||
my %index = ( # for Version 2
|
my %index = ( # for Version 2
|
||||||
'from' => 66, # <-- index frame from ( a tweak for other ASSP Versions )
|
'from' => 66, # <-- index frame from ( a tweak for other ASSP Versions )
|
||||||
'to' => 100 # <-- index frame to ( "" )
|
'to' => 100 # <-- index frame to ( "" )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,5 +42,3 @@ os_memory_vm.label os vmem committed
|
||||||
os_memory_vm.jmxObjectName java.lang:type=OperatingSystem
|
os_memory_vm.jmxObjectName java.lang:type=OperatingSystem
|
||||||
os_memory_vm.jmxAttributeName CommittedVirtualMemorySize
|
os_memory_vm.jmxAttributeName CommittedVirtualMemorySize
|
||||||
os_memory_vm.graph no
|
os_memory_vm.graph no
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,3 @@ java_thread_count.jmxAttributeName ThreadCount
|
||||||
java_thread_count_peak.label peak
|
java_thread_count_peak.label peak
|
||||||
java_thread_count_peak.jmxObjectName java.lang:type=Threading
|
java_thread_count_peak.jmxObjectName java.lang:type=Threading
|
||||||
java_thread_count_peak.jmxAttributeName PeakThreadCount
|
java_thread_count_peak.jmxAttributeName PeakThreadCount
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,3 @@ catalina_proc_tpr.cdef catalina_request_count,0,EQ,0,catalina_proc_time,catalina
|
||||||
catalina_max_time.label peak
|
catalina_max_time.label peak
|
||||||
catalina_max_time.jmxObjectName Catalina:name=http-8080,type=GlobalRequestProcessor
|
catalina_max_time.jmxObjectName Catalina:name=http-8080,type=GlobalRequestProcessor
|
||||||
catalina_max_time.jmxAttributeName maxTime
|
catalina_max_time.jmxAttributeName maxTime
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ ${JAVA_HOME}/bin/jstat -gc ${PidNum} | tail -1 | awk \
|
||||||
EC = $5; \
|
EC = $5; \
|
||||||
EU = $6; \
|
EU = $6; \
|
||||||
OC = $7; \
|
OC = $7; \
|
||||||
OU = $8;
|
OU = $8; \
|
||||||
PC = $9; \
|
PC = $9; \
|
||||||
PU = $10; \
|
PU = $10; \
|
||||||
YGC = $11; \
|
YGC = $11; \
|
||||||
|
|
|
@ -137,7 +137,7 @@ ${JAVA_HOME}/bin/jstat -gc ${PidNum} | tail -1 | awk \
|
||||||
EC = $5; \
|
EC = $5; \
|
||||||
EU = $6; \
|
EU = $6; \
|
||||||
OC = $7; \
|
OC = $7; \
|
||||||
OU = $8;
|
OU = $8; \
|
||||||
PC = $9; \
|
PC = $9; \
|
||||||
PU = $10; \
|
PU = $10; \
|
||||||
\
|
\
|
||||||
|
|
|
@ -55,5 +55,3 @@ for id in ids:
|
||||||
# print """Domain: %s, %s state (%s), %d CPUs, %d seconds, %d milliseconds, mem/max (%d/%d) """ \
|
# print """Domain: %s, %s state (%s), %d CPUs, %d seconds, %d milliseconds, mem/max (%d/%d) """ \
|
||||||
# % (nodeName, ostype, state, numVirtCpu, cpuTime/float(1000000000), cpuTime/float(1000000), memory, maxMem )
|
# % (nodeName, ostype, state, numVirtCpu, cpuTime/float(1000000000), cpuTime/float(1000000), memory, maxMem )
|
||||||
print "%s.value %d" % (nodeName, cpuTime/float(1000000))
|
print "%s.value %d" % (nodeName, cpuTime/float(1000000))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_category cpu'
|
echo 'graph_category cpu'
|
||||||
|
|
||||||
|
|
||||||
for guest_name in $guest_names;
|
for guest_name in $guest_names; do
|
||||||
do
|
|
||||||
guest="$(clean_fieldname $guest_name)"
|
guest="$(clean_fieldname $guest_name)"
|
||||||
echo 'cpu_user_'$guest'.label '$guest_name': User'
|
echo 'cpu_user_'$guest'.label '$guest_name': User'
|
||||||
echo 'cpu_user_'$guest'.type DERIVE'
|
echo 'cpu_user_'$guest'.type DERIVE'
|
||||||
|
@ -77,8 +76,7 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for guest_name in $guest_names;
|
for guest_name in $guest_names; do
|
||||||
do
|
|
||||||
guest="$(clean_fieldname $guest_name)"
|
guest="$(clean_fieldname $guest_name)"
|
||||||
|
|
||||||
tmp_g=`$f_comm -n $guest_name cpuacct.stat | grep user`
|
tmp_g=`$f_comm -n $guest_name cpuacct.stat | grep user`
|
||||||
|
|
|
@ -98,8 +98,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_category processes'
|
echo 'graph_category processes'
|
||||||
|
|
||||||
|
|
||||||
for guest_name in $guest_names;
|
for guest_name in $guest_names; do
|
||||||
do
|
|
||||||
guest="$(clean_fieldname $guest_name)"
|
guest="$(clean_fieldname $guest_name)"
|
||||||
echo 'lxc_proc_'$guest'.label '$guest_name': processes'
|
echo 'lxc_proc_'$guest'.label '$guest_name': processes'
|
||||||
echo 'lxc_proc_'$guest'.type GAUGE'
|
echo 'lxc_proc_'$guest'.type GAUGE'
|
||||||
|
@ -108,8 +107,7 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for guest_name in $guest_names;
|
for guest_name in $guest_names; do
|
||||||
do
|
|
||||||
guest="$(clean_fieldname $guest_name)"
|
guest="$(clean_fieldname $guest_name)"
|
||||||
|
|
||||||
count_processes $guest_name
|
count_processes $guest_name
|
||||||
|
|
|
@ -90,7 +90,7 @@ my $Channel="";
|
||||||
} else {
|
} else {
|
||||||
if ( $gata > 12 ) {
|
if ( $gata > 12 ) {
|
||||||
print "Channel" . $Channel . "EPG.value 12.0\n";
|
print "Channel" . $Channel . "EPG.value 12.0\n";
|
||||||
} else {
|
} else {
|
||||||
print "Channel" . $Channel . "EPG.value $gata\n";
|
print "Channel" . $Channel . "EPG.value $gata\n";
|
||||||
}
|
}
|
||||||
$Ptr=0;
|
$Ptr=0;
|
||||||
|
|
|
@ -16,7 +16,7 @@ Unfortunately, SNMPv3 is not fully supported on all NetApp equipments.
|
||||||
For this reason, this plugin will use SNMPv2 by default, which is
|
For this reason, this plugin will use SNMPv2 by default, which is
|
||||||
insecure because it doesn't encrypt the community string.
|
insecure because it doesn't encrypt the community string.
|
||||||
|
|
||||||
The following parameters will help you get this plugin working :
|
The following parameters will help you get this plugin working:
|
||||||
|
|
||||||
[snmp_*]
|
[snmp_*]
|
||||||
env.community MyCommunity
|
env.community MyCommunity
|
||||||
|
|
|
@ -16,7 +16,7 @@ Counts the in/out bandwidth used by each projects/vhost. [Logtail](https://www.f
|
||||||
## Installation
|
## Installation
|
||||||
The setup is pretty straight forward. First you need to configure the plugin:
|
The setup is pretty straight forward. First you need to configure the plugin:
|
||||||
|
|
||||||
In your munin plugin configuration file (for example, a new dedicated /etc/munin/plugin-conf.d/nginx_byprojects), configure the plugins :
|
In your munin plugin configuration file (for example, a new dedicated /etc/munin/plugin-conf.d/nginx_byprojects), configure the plugins:
|
||||||
|
|
||||||
[byprojects_*]
|
[byprojects_*]
|
||||||
env.logtail /usr/local/bin/logtail
|
env.logtail /usr/local/bin/logtail
|
||||||
|
|
|
@ -99,7 +99,6 @@ while (<SERVICE>) {
|
||||||
# if (/^rate exceeded:\s*(\d*)/) {
|
# if (/^rate exceeded:\s*(\d*)/) {
|
||||||
# $queries += $1;
|
# $queries += $1;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
}
|
}
|
||||||
close(SERVICE);
|
close(SERVICE);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
|
||||||
mktempfile () {
|
mktempfile () {
|
||||||
mktemp -t
|
mktemp -t
|
||||||
}
|
}
|
||||||
|
|
||||||
MAIL_LOG=${logfile:-/var/log/mail.log}
|
MAIL_LOG=${logfile:-/var/log/mail.log}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
|
||||||
mktempfile () {
|
mktempfile () {
|
||||||
mktemp -t
|
mktemp -t
|
||||||
}
|
}
|
||||||
|
|
||||||
MAIL_LOG=${logfile:-/var/log/mail.log}
|
MAIL_LOG=${logfile:-/var/log/mail.log}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
mktempfile () {
|
mktempfile () {
|
||||||
mktemp -t
|
mktemp -t
|
||||||
}
|
}
|
||||||
|
|
||||||
MAIL_LOG=${logfile:-/var/log/mail.info}
|
MAIL_LOG=${logfile:-/var/log/mail.info}
|
||||||
|
|
|
@ -49,7 +49,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "config")
|
||||||
}
|
}
|
||||||
print "temperature.label temperature\n";
|
print "temperature.label temperature\n";
|
||||||
|
|
||||||
exit 0
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$telnet = new Net::Telnet (Telnetmode => 0);
|
$telnet = new Net::Telnet (Telnetmode => 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue