+ fix netscaler modes
This commit is contained in:
parent
dd208841a0
commit
00ed78ecc1
|
@ -32,7 +32,7 @@ sub set_counters {
|
||||||
{ name => 'certificates', type => 1, cb_prefix_output => 'prefix_certificates_output', message_multiple => 'All certificates are ok' }
|
{ 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 => {
|
{ label => 'days', set => {
|
||||||
key_values => [ { name => 'days' }, { name => 'display' } ],
|
key_values => [ { name => 'days' }, { name => 'display' } ],
|
||||||
output_template => '%d days remaining before expiration',
|
output_template => '%d days remaining before expiration',
|
||||||
|
|
|
@ -49,7 +49,7 @@ sub check {
|
||||||
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_nsSysHealthEntry}})) {
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_nsSysHealthEntry}})) {
|
||||||
next if ($oid !~ /^$mapping->{sysHealthCounterName}->{oid}\.(.*)$/);
|
next if ($oid !~ /^$mapping->{sysHealthCounterName}->{oid}\.(.*)$/);
|
||||||
my $instance = $1;
|
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 $power_num = $1;
|
||||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_nsSysHealthEntry}, instance => $instance);
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_nsSysHealthEntry}, instance => $instance);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ sub set_counters {
|
||||||
{ name => 'global', type => 0, message_separator => ' - ' }
|
{ name => 'global', type => 0, message_separator => ' - ' }
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{volume} = [
|
$self->{maps_counters}->{global} = [
|
||||||
{ label => 'active', set => {
|
{ label => 'active', set => {
|
||||||
key_values => [ { name => 'active' } ],
|
key_values => [ { name => 'active' } ],
|
||||||
output_template => 'Active Server TCP connections : %s',
|
output_template => 'Active Server TCP connections : %s',
|
||||||
|
|
|
@ -34,7 +34,7 @@ sub set_counters {
|
||||||
{ name => 'vservers', type => 1, cb_prefix_output => 'prefix_vservers_output', message_multiple => 'All Virtual Servers are ok' }
|
{ 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 => {
|
{ label => 'status', threshold => 0, set => {
|
||||||
key_values => [ { name => 'state' } ],
|
key_values => [ { name => 'state' } ],
|
||||||
closure_custom_calc => $self->can('custom_status_calc'),
|
closure_custom_calc => $self->can('custom_status_calc'),
|
||||||
|
@ -200,10 +200,10 @@ sub manage_selection {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{vservers}->{$options{instance}} = {
|
$self->{vservers}->{$instance} = {
|
||||||
display => $options{result}->{vsvrName},
|
display => $result->{vsvrName},
|
||||||
health => $options{result}->{vsvrHealth},
|
health => $result->{vsvrHealth},
|
||||||
state => $options{result}->{vsvrState},
|
state => $result->{vsvrState},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue