+ fix netscaler modes

This commit is contained in:
garnier-quentin 2017-03-09 14:46:48 +01:00
parent dd208841a0
commit 00ed78ecc1
4 changed files with 8 additions and 8 deletions

View File

@ -32,7 +32,7 @@ sub set_counters {
{ name => 'certificates', type => 1, cb_prefix_output => 'prefix_certificates_output', message_multiple => 'All certificates are ok' }
];
$self->{maps_counters}->{volume} = [
$self->{maps_counters}->{certificates} = [
{ label => 'days', set => {
key_values => [ { name => 'days' }, { name => 'display' } ],
output_template => '%d days remaining before expiration',

View File

@ -49,7 +49,7 @@ sub check {
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_nsSysHealthEntry}})) {
next if ($oid !~ /^$mapping->{sysHealthCounterName}->{oid}\.(.*)$/);
my $instance = $1;
next if ($self->{results}->{$oid_nsSysHealthEntry}->{$oid} !~ /PowerSupply(.)FailureStatus/i);
next if ($self->{results}->{$oid_nsSysHealthEntry}->{$oid} !~ /PowerSupply(.)(?:Status|FailureStatus)/i);
my $power_num = $1;
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_nsSysHealthEntry}, instance => $instance);

View File

@ -32,7 +32,7 @@ sub set_counters {
{ name => 'global', type => 0, message_separator => ' - ' }
];
$self->{maps_counters}->{volume} = [
$self->{maps_counters}->{global} = [
{ label => 'active', set => {
key_values => [ { name => 'active' } ],
output_template => 'Active Server TCP connections : %s',

View File

@ -34,7 +34,7 @@ sub set_counters {
{ name => 'vservers', type => 1, cb_prefix_output => 'prefix_vservers_output', message_multiple => 'All Virtual Servers are ok' }
];
$self->{maps_counters}->{volume} = [
$self->{maps_counters}->{vservers} = [
{ label => 'status', threshold => 0, set => {
key_values => [ { name => 'state' } ],
closure_custom_calc => $self->can('custom_status_calc'),
@ -200,10 +200,10 @@ sub manage_selection {
next;
}
$self->{vservers}->{$options{instance}} = {
display => $options{result}->{vsvrName},
health => $options{result}->{vsvrHealth},
state => $options{result}->{vsvrState},
$self->{vservers}->{$instance} = {
display => $result->{vsvrName},
health => $result->{vsvrHealth},
state => $result->{vsvrState},
};
}