1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-02 06:08:23 +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

@ -11,7 +11,7 @@ Any system running squid and avialable cache_object://
=head1 CONFIGURATION
The following environment settings are the default configuration.
The following environment settings are the default configuration.
[squid]
env.squidhost localhost
@ -82,9 +82,9 @@ _
return sprintf($r_text, $squid_host, $what, &make_auth_header());
}
sub make_auth_header
sub make_auth_header
{
if(defined $squid_passwd && $squid_passwd ne "")
if(defined $squid_passwd && $squid_passwd ne "")
{
my $h_text = <<_;
Authorization: Basic %s
@ -99,22 +99,22 @@ _
sub squid_requst
{
my $what = $_[0];
die "Could not connect: $!\n" unless my $cachemgr = IO::Socket::INET->new(PeerAddr => $squid_host,
PeerPort => $squid_port,
Proto => 'tcp',
die "Could not connect: $!\n" unless my $cachemgr = IO::Socket::INET->new(PeerAddr => $squid_host,
PeerPort => $squid_port,
Proto => 'tcp',
Timeout => $squid_request_timeout);
my $request = &make_request($what);
$cachemgr->syswrite($request, length($request));
return $cachemgr;
}
if($ARGV[0] and $ARGV[0] eq "autoconf")
if($ARGV[0] and $ARGV[0] eq "autoconf")
{
if (squid_requst('menu')->getline ne "") { print "yes\n"; }
exit 0;
}
if($ARGV[0] and $ARGV[0] eq "config")
if($ARGV[0] and $ARGV[0] eq "config")
{
my %config;
# ------------------------------------------------- squid_efficiency_ -----------------------------------------
@ -349,7 +349,7 @@ my $cm;
my %data;
# ----------------- squid_efficiency_ and squid_memory --------------------
$cm = squid_requst('info');
while (my $line = $cm->getline)
while (my $line = $cm->getline)
{
# ----------------- squid_efficiency_ --------------------
if($line =~ /Hits as % of all requests:.*/) { ($data{'squid_efficiency_5'}{'all'}, $data{'squid_efficiency_60'}{'all'}) = $line =~ /([\d.]+)%/g; next; }
@ -392,7 +392,7 @@ while (my $line = $cm->getline)
# ----------------- squid_ipcache --------------------
$cm = squid_requst('ipcache');
while (my $line = $cm->getline)
while (my $line = $cm->getline)
{
if($line =~ /IPcache Entries:.*/) { $data{'squid_ipcache'}{'entries'} = ($line =~ /(\d+)/g)[0]; next; }
if($line =~ /IPcache Requests:.*/) { $data{'squid_ipcache'}{'request'} = ($line =~ /(\d+)/g)[0]; next; }