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:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -63,37 +63,37 @@ my @lines=split(/\n/,$output);
|
|||
if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
|
||||
my $lcount = 0;
|
||||
my $base_config = "graph_category virtualization\n";
|
||||
|
||||
|
||||
if( $type eq "pcpu" ) {
|
||||
print $base_config;
|
||||
print "graph_args --base 1000 -l 0 -u 100 -r\n";
|
||||
print "graph_scale no\n";
|
||||
print "graph_args --base 1000 -l 0 -u 100 -r\n";
|
||||
print "graph_scale no\n";
|
||||
print "graph_title CPU usage in % per VM\n";
|
||||
print "graph_vlabel % of CPU usage\n";
|
||||
print "graph_info The Graph shows the CPU usage in % per VM\n";
|
||||
print "graph_info The Graph shows the CPU usage in % per VM\n";
|
||||
foreach my $line(@lines) {
|
||||
if( $line =~ /(?<!grep)$/) {
|
||||
if( $line =~ /(?<!grep)$/) {
|
||||
my @vm = ();
|
||||
my $count = 0;
|
||||
my @array=split(/ /,$line);
|
||||
my @array=split(/ /,$line);
|
||||
foreach my $entry(@array) {
|
||||
if( length($entry) > 2 ){
|
||||
$vm[$count]=$entry;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$vm[3] =~ s/\.vmx//;
|
||||
my $cat = clean_vmname($vm[3]);
|
||||
my $cat = clean_vmname($vm[3]);
|
||||
if( $cat =~ /(?<!comm)$/) {
|
||||
if( $lcount > 0 ){
|
||||
print $cat,"_pcpu.draw STACK\n";
|
||||
} else {
|
||||
print $cat,"_pcpu.draw AREA\n";
|
||||
}
|
||||
$lcount++;
|
||||
$lcount++;
|
||||
print $cat,"_pcpu.label $vm[3]\n";
|
||||
print $cat,"_pcpu.type GAUGE\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,64 +104,64 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
|
|||
print "graph_scale no\n";
|
||||
print "graph_title Memory usage in % per VM\n";
|
||||
print "graph_vlabel % of Memory usage\n";
|
||||
print "graph_info The Graph shows the Memory usage in % per VM\n";
|
||||
print "graph_info The Graph shows the Memory usage in % per VM\n";
|
||||
foreach my $line(@lines) {
|
||||
if( $line =~ /(?<!grep)$/ ) {
|
||||
if( $line =~ /(?<!grep)$/ ) {
|
||||
my @vm = ();
|
||||
my $count = 0;
|
||||
my @array=split(/ /,$line);
|
||||
foreach my $entry(@array) {
|
||||
if( length($entry) > 2 ){
|
||||
$vm[$count]=$entry;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
$vm[3] =~ s/\.vmx//;
|
||||
my $cat = clean_vmname($vm[3]);
|
||||
if( $cat =~ /(?<!comm)$/) {
|
||||
if( $lcount > 0 ){
|
||||
print $cat,"_pmem.draw STACK\n";
|
||||
} else {
|
||||
print $cat,"_pmem.draw AREA\n";
|
||||
}
|
||||
$lcount++;
|
||||
print $cat,"_pmem.label $vm[3]\n";
|
||||
print $cat,"_pmem.type GAUGE\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $type eq "mem" ) {
|
||||
print $base_config;
|
||||
print "graph_args --base 1024 -r --lower-limit 0\n";
|
||||
print "graph_title absolute Memory usage per VM\n";
|
||||
print "graph_vlabel Memory usage\n";
|
||||
print "graph_info The Graph shows the absolute Memory usage per VM\n";
|
||||
foreach my $line(@lines) {
|
||||
if( $line =~ /(?<!grep)$/ ) {
|
||||
my @vm = ();
|
||||
my $count = 0;
|
||||
my @array=split(/ /,$line);
|
||||
my @array=split(/ /,$line);
|
||||
foreach my $entry(@array) {
|
||||
if( length($entry) > 2 ){
|
||||
$vm[$count]=$entry;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
$vm[3] = clean_vmname($vm[3]);
|
||||
if( $vm[3] =~ /(?<!comm)$/) {
|
||||
$vm[3] =~ s/\.vmx//;
|
||||
my $cat = clean_vmname($vm[3]);
|
||||
if( $cat =~ /(?<!comm)$/) {
|
||||
if( $lcount > 0 ){
|
||||
print $cat,"_pmem.draw STACK\n";
|
||||
} else {
|
||||
print $cat,"_pmem.draw AREA\n";
|
||||
}
|
||||
$lcount++;
|
||||
print $cat,"_pmem.label $vm[3]\n";
|
||||
print $cat,"_pmem.type GAUGE\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $type eq "mem" ) {
|
||||
print $base_config;
|
||||
print "graph_args --base 1024 -r --lower-limit 0\n";
|
||||
print "graph_title absolute Memory usage per VM\n";
|
||||
print "graph_vlabel Memory usage\n";
|
||||
print "graph_info The Graph shows the absolute Memory usage per VM\n";
|
||||
foreach my $line(@lines) {
|
||||
if( $line =~ /(?<!grep)$/ ) {
|
||||
my @vm = ();
|
||||
my $count = 0;
|
||||
my @array=split(/ /,$line);
|
||||
foreach my $entry(@array) {
|
||||
if( length($entry) > 2 ){
|
||||
$vm[$count]=$entry;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
$vm[3] = clean_vmname($vm[3]);
|
||||
if( $vm[3] =~ /(?<!comm)$/) {
|
||||
if( $lcount > 0 ){
|
||||
print "$vm[3]_mem.draw STACK\n";
|
||||
} else {
|
||||
print "$vm[3]_mem.draw AREA\n";
|
||||
}
|
||||
print "$vm[3]_mem.label $vm[3]\n";
|
||||
print "$vm[3]_mem.type GAUGE\n";
|
||||
$lcount++;
|
||||
}
|
||||
print "$vm[3]_mem.type GAUGE\n";
|
||||
$lcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -169,7 +169,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
|
|||
if( $line =~ /(?<!grep)$/ ) {
|
||||
my @vm = ();
|
||||
my $count = 0;
|
||||
my @array=split(/ /,$line);
|
||||
my @array=split(/ /,$line);
|
||||
foreach my $entry(@array) {
|
||||
if( length($entry) > 2 ){
|
||||
$vm[$count]=$entry;
|
||||
|
@ -177,7 +177,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
|
|||
}
|
||||
}
|
||||
$vm[3] = clean_vmname($vm[3]);
|
||||
if( $vm[3] =~ /(?<!comm)$/) {
|
||||
if( $vm[3] =~ /(?<!comm)$/) {
|
||||
if( $type eq "pcpu" ) {
|
||||
print "$vm[3]_pcpu.value $vm[0]\n";
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub clean_vmname {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue