check_apache_balancer_members: Update to 8e1ad17
This commit is contained in:
parent
36649d7285
commit
f134dbfd1c
|
@ -30,7 +30,7 @@ $np->getopts;
|
||||||
|
|
||||||
my $response = get("http://".$np->opts->hostname."/".$np->opts->path);
|
my $response = get("http://".$np->opts->hostname."/".$np->opts->path);
|
||||||
my $s = scraper {
|
my $s = scraper {
|
||||||
process 'table:nth-of-type(2) tr:not(:first-child)', 'members[]' => scraper {
|
process 'table:nth-of-type(2) tr', 'members[]' => scraper {
|
||||||
process 'td:nth-of-type(1)', 'worker' => 'TEXT';
|
process 'td:nth-of-type(1)', 'worker' => 'TEXT';
|
||||||
process 'td:nth-of-type(6)', 'status' => 'TEXT';
|
process 'td:nth-of-type(6)', 'status' => 'TEXT';
|
||||||
process 'td:nth-of-type(7)', 'elected' => 'TEXT';
|
process 'td:nth-of-type(7)', 'elected' => 'TEXT';
|
||||||
|
@ -42,12 +42,12 @@ my $s = scraper {
|
||||||
};
|
};
|
||||||
|
|
||||||
my $results = $s->scrape($response);
|
my $results = $s->scrape($response);
|
||||||
|
|
||||||
my @problemMembers = ();
|
my @problemMembers = ();
|
||||||
my $at_least_one_is_ok = 0;
|
my $at_least_one_is_ok = 0;
|
||||||
|
|
||||||
foreach my $member (@{$results->{'members'}})
|
foreach my $member (@{$results->{'members'}})
|
||||||
{
|
{
|
||||||
|
next unless $member->{'worker'};
|
||||||
push @problemMembers, $member->{'worker'} if $member->{'status'} =~ /Err/i;
|
push @problemMembers, $member->{'worker'} if $member->{'status'} =~ /Err/i;
|
||||||
$at_least_one_is_ok = 1 if $member->{'status'} =~ /Ok\s?$/;
|
$at_least_one_is_ok = 1 if $member->{'status'} =~ /Ok\s?$/;
|
||||||
$np->add_perfdata(label => "elected-$member->{'worker'}", value => $member->{'elected'}, uom => 'c');
|
$np->add_perfdata(label => "elected-$member->{'worker'}", value => $member->{'elected'}, uom => 'c');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Homepage: https://raw.github.com/mintsoft/check_apache_balancer_members/master/check_apache_balancer_members.pl
|
Homepage: https://raw.github.com/mintsoft/check_apache_balancer_members/master/check_apache_balancer_members.pl
|
||||||
Watch: https://github.com/mintsoft/check_apache_balancer_members <a class="commit-tease-sha"[^>]*>\s+([0-9a-f]+)\s+</a>
|
Watch: https://github.com/mintsoft/check_apache_balancer_members <a class="commit-tease-sha"[^>]*>\s+([0-9a-f]+)\s+</a>
|
||||||
Recommends: libdata-dump-perl, libweb-scraper-perl, libmonitoring-plugin-perl | libnagios-plugin-perl
|
Recommends: libdata-dump-perl, libweb-scraper-perl, libmonitoring-plugin-perl | libnagios-plugin-perl
|
||||||
Version: cfa70e2
|
Version: 8e1ad17
|
||||||
Uploaders: Jan Wagner <waja@cyconet.org>
|
Uploaders: Jan Wagner <waja@cyconet.org>
|
||||||
Description: plugin to monitor Apache2 balancer_manager
|
Description: plugin to monitor Apache2 balancer_manager
|
||||||
|
|
Loading…
Reference in a new issue