@@ -, +, @@ just "libwww-perl/$version" --- plugins/node.d/apache_accesses.in | 6 ++++-- plugins/node.d/apache_processes.in | 6 ++++-- plugins/node.d/apache_volume.in | 6 ++++-- plugins/node.d/haproxy_.in | 3 ++- plugins/node.d/nginx_request.in | 6 ++++-- plugins/node.d/nginx_status.in | 6 ++++-- plugins/node.d/tomcat_access.in | 6 ++++-- plugins/node.d/tomcat_jvm.in | 6 ++++-- plugins/node.d/tomcat_threads.in | 6 ++++-- plugins/node.d/tomcat_volume.in | 6 ++++-- 10 files changed, 38 insertions(+), 19 deletions(-) --- a/plugins/node.d/apache_accesses.in +++ a/plugins/node.d/apache_accesses.in @@ -98,7 +98,8 @@ if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) exit 0; } - my $ua = LWP::UserAgent->new(timeout => 30); + my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); foreach my $port (@PORTS) { my $url = sprintf $URL, $port; @@ -144,7 +145,8 @@ if ( defined $ARGV[0] and $ARGV[0] eq "config" ) exit 0; } -my $ua = LWP::UserAgent->new(timeout => 30); +my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); foreach my $port (@PORTS) { my $url = sprintf $URL, $port; --- a/plugins/node.d/apache_processes.in +++ a/plugins/node.d/apache_processes.in @@ -103,7 +103,8 @@ if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) print "no ($ret)\n"; exit 0; } - my $ua = LWP::UserAgent->new(timeout => 30); + my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); foreach my $port (@PORTS) { my $url = sprintf $URL, $port; @@ -170,7 +171,8 @@ if ( defined $ARGV[0] and $ARGV[0] eq "config" ) foreach my $port (@PORTS) { - my $ua = LWP::UserAgent->new(timeout => 30); + my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $url = sprintf $URL, $port; my $response = $ua->request(HTTP::Request->new('GET',$url)); if ($response->content =~ /^Busy(?:Servers|Workers):\s+(.+)$/im) { --- a/plugins/node.d/apache_volume.in +++ a/plugins/node.d/apache_volume.in @@ -98,7 +98,8 @@ if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) exit 0; } - my $ua = LWP::UserAgent->new(timeout => 30); + my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); foreach my $port (@PORTS) { my $url = sprintf $URL, $port; @@ -143,7 +144,8 @@ if ( defined $ARGV[0] and $ARGV[0] eq "config" ) exit 0; } -my $ua = LWP::UserAgent->new(timeout => 30); +my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); foreach my $port (@PORTS) { my $url = sprintf $URL, $port; --- a/plugins/node.d/haproxy_.in +++ a/plugins/node.d/haproxy_.in @@ -60,7 +60,8 @@ if (! eval "require LWP::UserAgent;") my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://localhost/haproxy-status;csv;norefresh"; -my $ua = LWP::UserAgent->new(timeout => 30); +my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $url = $URL; my $response = $ua->request(HTTP::Request->new('GET',$url)); --- a/plugins/node.d/nginx_request.in +++ a/plugins/node.d/nginx_request.in @@ -73,7 +73,8 @@ if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) exit 0; } - my $ua = LWP::UserAgent->new(timeout => 30); + my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $response = $ua->request(HTTP::Request->new('GET',$URL)); unless ($response->is_success and $response->content =~ /server/im) @@ -103,7 +104,8 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) exit 0; } -my $ua = LWP::UserAgent->new(timeout => 30); +my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $response = $ua->request(HTTP::Request->new('GET',$URL)); --- a/plugins/node.d/nginx_status.in +++ a/plugins/node.d/nginx_status.in @@ -69,7 +69,8 @@ if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) { exit 0; } - my $ua = LWP::UserAgent->new(timeout => 30); + my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $response = $ua->request(HTTP::Request->new('GET',$URL)); unless ($response->is_success and $response->content =~ /server/im) { @@ -106,7 +107,8 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { exit 0; } -my $ua = LWP::UserAgent->new(timeout => 30); +my $ua = LWP::UserAgent->new(timeout => 30, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $response = $ua->request(HTTP::Request->new('GET',$URL)); --- a/plugins/node.d/tomcat_access.in +++ a/plugins/node.d/tomcat_access.in @@ -76,7 +76,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { print "no ($ret)\n"; exit 0; } - my $au = LWP::UserAgent->new(timeout => $TIMEOUT); + my $au = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $repsonse = $au->request(HTTP::Request->new('GET',$url)); if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { print "yes\n"; @@ -99,7 +100,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") { exit 0; } -my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); +my $ua = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $xs = new XML::Simple; my $response = $ua->request(HTTP::Request->new('GET',$url)); my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 ); --- a/plugins/node.d/tomcat_jvm.in +++ a/plugins/node.d/tomcat_jvm.in @@ -88,7 +88,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { print "no ($ret)\n"; exit 0; } - my $au = LWP::UserAgent->new(timeout => $TIMEOUT); + my $au = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $repsonse = $au->request(HTTP::Request->new('GET',$url)); if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { print "yes\n"; @@ -114,7 +115,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") { exit 0; } -my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); +my $ua = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $xs = new XML::Simple; my $response = $ua->request(HTTP::Request->new('GET',$url)); my $xml = $xs->XMLin($response->content); --- a/plugins/node.d/tomcat_threads.in +++ a/plugins/node.d/tomcat_threads.in @@ -75,7 +75,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { print "no ($ret)\n"; exit 0; } - my $au = LWP::UserAgent->new(timeout => $TIMEOUT); + my $au = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $repsonse = $au->request(HTTP::Request->new('GET',$url)); if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { print "yes\n"; @@ -100,7 +101,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") { exit 0; } -my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); +my $ua = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $xs = new XML::Simple; my $response = $ua->request(HTTP::Request->new('GET',$url)); my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 ); --- a/plugins/node.d/tomcat_volume.in +++ a/plugins/node.d/tomcat_volume.in @@ -96,7 +96,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { print "no ($ret)\n"; exit 0; } - my $au = LWP::UserAgent->new(timeout => $TIMEOUT); + my $au = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $repsonse = $au->request(HTTP::Request->new('GET',$url)); if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { print "yes\n"; @@ -119,7 +120,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") { exit 0; } -my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); +my $ua = LWP::UserAgent->new(timeout => $TIMEOUT, + agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION)); my $xs = new XML::Simple; my $response = $ua->request(HTTP::Request->new('GET',$url)); my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 ); --