Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 370131 | Differences between
and this patch

Collapse All | Expand All

(-)a/plugins/node.d/apache_accesses.in (-2 / +4 lines)
Lines 98-104 if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) Link Here
98
		exit 0;
98
		exit 0;
99
	}
99
	}
100
100
101
	my $ua = LWP::UserAgent->new(timeout => 30);
101
	my $ua = LWP::UserAgent->new(timeout => 30,
102
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
102
103
103
	foreach my $port (@PORTS) {
104
	foreach my $port (@PORTS) {
104
		my $url = sprintf $URL, $port;
105
		my $url = sprintf $URL, $port;
Lines 144-150 if ( defined $ARGV[0] and $ARGV[0] eq "config" ) Link Here
144
	exit 0;
145
	exit 0;
145
}
146
}
146
147
147
my $ua = LWP::UserAgent->new(timeout => 30);
148
my $ua = LWP::UserAgent->new(timeout => 30,
149
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
148
150
149
foreach my $port (@PORTS) {
151
foreach my $port (@PORTS) {
150
	my $url = sprintf $URL, $port;
152
	my $url = sprintf $URL, $port;
(-)a/plugins/node.d/apache_processes.in (-2 / +4 lines)
Lines 103-109 if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) Link Here
103
		print "no ($ret)\n";
103
		print "no ($ret)\n";
104
		exit 0;
104
		exit 0;
105
	}
105
	}
106
	my $ua = LWP::UserAgent->new(timeout => 30);
106
	my $ua = LWP::UserAgent->new(timeout => 30,
107
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
107
108
108
        foreach my $port (@PORTS) {
109
        foreach my $port (@PORTS) {
109
                my $url = sprintf $URL, $port;
110
                my $url = sprintf $URL, $port;
Lines 170-176 if ( defined $ARGV[0] and $ARGV[0] eq "config" ) Link Here
170
171
171
foreach my $port (@PORTS)
172
foreach my $port (@PORTS)
172
{
173
{
173
    my $ua = LWP::UserAgent->new(timeout => 30);
174
    my $ua = LWP::UserAgent->new(timeout => 30,
175
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
174
    my $url = sprintf $URL, $port;
176
    my $url = sprintf $URL, $port;
175
    my $response = $ua->request(HTTP::Request->new('GET',$url));
177
    my $response = $ua->request(HTTP::Request->new('GET',$url));
176
    if ($response->content =~ /^Busy(?:Servers|Workers):\s+(.+)$/im) {
178
    if ($response->content =~ /^Busy(?:Servers|Workers):\s+(.+)$/im) {
(-)a/plugins/node.d/apache_volume.in (-2 / +4 lines)
Lines 98-104 if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) Link Here
98
		exit 0;
98
		exit 0;
99
	}
99
	}
100
	
100
	
101
	my $ua = LWP::UserAgent->new(timeout => 30);
101
	my $ua = LWP::UserAgent->new(timeout => 30,
102
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
102
103
103
	foreach my $port (@PORTS) {
104
	foreach my $port (@PORTS) {
104
		my $url = sprintf $URL, $port;
105
		my $url = sprintf $URL, $port;
Lines 143-149 if ( defined $ARGV[0] and $ARGV[0] eq "config" ) Link Here
143
	exit 0;
144
	exit 0;
144
}
145
}
145
146
146
my $ua = LWP::UserAgent->new(timeout => 30);
147
my $ua = LWP::UserAgent->new(timeout => 30,
148
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
147
149
148
foreach my $port (@PORTS) {
150
foreach my $port (@PORTS) {
149
	my $url = sprintf $URL, $port;
151
	my $url = sprintf $URL, $port;
(-)a/plugins/node.d/haproxy_.in (-1 / +2 lines)
Lines 60-66 if (! eval "require LWP::UserAgent;") Link Here
60
60
61
my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://localhost/haproxy-status;csv;norefresh";
61
my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://localhost/haproxy-status;csv;norefresh";
62
62
63
my $ua = LWP::UserAgent->new(timeout => 30);
63
my $ua = LWP::UserAgent->new(timeout => 30,
64
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
64
65
65
my $url = $URL;
66
my $url = $URL;
66
my $response = $ua->request(HTTP::Request->new('GET',$url));
67
my $response = $ua->request(HTTP::Request->new('GET',$url));
(-)a/plugins/node.d/nginx_request.in (-2 / +4 lines)
Lines 73-79 if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) Link Here
73
		exit 0;
73
		exit 0;
74
	}
74
	}
75
	
75
	
76
	my $ua = LWP::UserAgent->new(timeout => 30);
76
	my $ua = LWP::UserAgent->new(timeout => 30,
77
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
77
    my $response = $ua->request(HTTP::Request->new('GET',$URL));
78
    my $response = $ua->request(HTTP::Request->new('GET',$URL));
78
79
79
	unless ($response->is_success and $response->content =~ /server/im)
80
	unless ($response->is_success and $response->content =~ /server/im)
Lines 103-109 if ( exists $ARGV[0] and $ARGV[0] eq "config" ) Link Here
103
	exit 0;
104
	exit 0;
104
}
105
}
105
106
106
my $ua = LWP::UserAgent->new(timeout => 30);
107
my $ua = LWP::UserAgent->new(timeout => 30,
108
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
107
109
108
my $response = $ua->request(HTTP::Request->new('GET',$URL));
110
my $response = $ua->request(HTTP::Request->new('GET',$URL));
109
111
(-)a/plugins/node.d/nginx_status.in (-2 / +4 lines)
Lines 69-75 if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) { Link Here
69
	exit 0;
69
	exit 0;
70
    }
70
    }
71
71
72
    my $ua = LWP::UserAgent->new(timeout => 30);
72
    my $ua = LWP::UserAgent->new(timeout => 30,
73
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
73
    my $response = $ua->request(HTTP::Request->new('GET',$URL));
74
    my $response = $ua->request(HTTP::Request->new('GET',$URL));
74
75
75
    unless ($response->is_success and $response->content =~ /server/im) {
76
    unless ($response->is_success and $response->content =~ /server/im) {
Lines 106-112 if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { Link Here
106
    exit 0;
107
    exit 0;
107
}
108
}
108
109
109
my $ua = LWP::UserAgent->new(timeout => 30);
110
my $ua = LWP::UserAgent->new(timeout => 30,
111
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
110
112
111
my $response = $ua->request(HTTP::Request->new('GET',$URL));
113
my $response = $ua->request(HTTP::Request->new('GET',$URL));
112
114
(-)a/plugins/node.d/tomcat_access.in (-2 / +4 lines)
Lines 76-82 if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { Link Here
76
	print "no ($ret)\n";
76
	print "no ($ret)\n";
77
	exit 0;
77
	exit 0;
78
    }
78
    }
79
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT);
79
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT,
80
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
80
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
81
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
81
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
82
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
82
	print "yes\n";
83
	print "yes\n";
Lines 99-105 if(exists $ARGV[0] and $ARGV[0] eq "config") { Link Here
99
    exit 0;
100
    exit 0;
100
}
101
}
101
102
102
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT);
103
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT,
104
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
103
my $xs = new XML::Simple;
105
my $xs = new XML::Simple;
104
my $response = $ua->request(HTTP::Request->new('GET',$url));
106
my $response = $ua->request(HTTP::Request->new('GET',$url));
105
my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 );
107
my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 );
(-)a/plugins/node.d/tomcat_jvm.in (-2 / +4 lines)
Lines 88-94 if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { Link Here
88
	print "no ($ret)\n";
88
	print "no ($ret)\n";
89
	exit 0;
89
	exit 0;
90
    }
90
    }
91
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT);
91
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT,
92
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
92
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
93
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
93
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
94
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
94
	print "yes\n";
95
	print "yes\n";
Lines 114-120 if(exists $ARGV[0] and $ARGV[0] eq "config") { Link Here
114
    exit 0;
115
    exit 0;
115
}
116
}
116
117
117
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT);
118
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT,
119
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
118
my $xs = new XML::Simple;
120
my $xs = new XML::Simple;
119
my $response = $ua->request(HTTP::Request->new('GET',$url));
121
my $response = $ua->request(HTTP::Request->new('GET',$url));
120
my $xml = $xs->XMLin($response->content);
122
my $xml = $xs->XMLin($response->content);
(-)a/plugins/node.d/tomcat_threads.in (-2 / +4 lines)
Lines 75-81 if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { Link Here
75
	print "no ($ret)\n";
75
	print "no ($ret)\n";
76
	exit 0;
76
	exit 0;
77
    }
77
    }
78
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT);
78
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT,
79
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
79
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
80
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
80
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
81
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
81
	print "yes\n";
82
	print "yes\n";
Lines 100-106 if(exists $ARGV[0] and $ARGV[0] eq "config") { Link Here
100
    exit 0;
101
    exit 0;
101
}
102
}
102
103
103
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT);
104
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT,
105
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
104
my $xs = new XML::Simple;
106
my $xs = new XML::Simple;
105
my $response = $ua->request(HTTP::Request->new('GET',$url));
107
my $response = $ua->request(HTTP::Request->new('GET',$url));
106
my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 );
108
my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 );
(-)a/plugins/node.d/tomcat_volume.in (-3 / +4 lines)
Lines 96-102 if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { Link Here
96
	print "no ($ret)\n";
96
	print "no ($ret)\n";
97
	exit 0;
97
	exit 0;
98
    }
98
    }
99
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT);
99
    my $au = LWP::UserAgent->new(timeout => $TIMEOUT,
100
			agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
100
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
101
    my $repsonse = $au->request(HTTP::Request->new('GET',$url));
101
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
102
    if($repsonse->is_success and $repsonse->content =~ /<status>.*<\/status>/im) {
102
	print "yes\n";
103
	print "yes\n";
Lines 119-125 if(exists $ARGV[0] and $ARGV[0] eq "config") { Link Here
119
    exit 0;
120
    exit 0;
120
}
121
}
121
122
122
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT);
123
my $ua = LWP::UserAgent->new(timeout => $TIMEOUT,
124
		agent => sprintf("munin/%s (libwww-perl/%s)", $Munin::Common::Defaults::MUNIN_VERSION, $LWP::VERSION));
123
my $xs = new XML::Simple;
125
my $xs = new XML::Simple;
124
my $response = $ua->request(HTTP::Request->new('GET',$url));
126
my $response = $ua->request(HTTP::Request->new('GET',$url));
125
my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 );
127
my %options = ( KeyAttr => { connector => 'name' }, ForceArray => 1 );
126
- 

Return to bug 370131