fix(mode): Fix Velocloud modes when edge offline (#2532)
This commit is contained in:
parent
9b1a4ab406
commit
51c91d8d0a
|
@ -32,12 +32,22 @@ sub set_counters {
|
|||
{ name => 'edges', type => 3, cb_prefix_output => 'prefix_edge_output', cb_long_output => 'long_output',
|
||||
message_multiple => 'All edges applications usage are ok', indent_long_output => ' ',
|
||||
group => [
|
||||
{ name => 'global', type => 0 },
|
||||
{ name => 'apps', display_long => 1, cb_prefix_output => 'prefix_app_output',
|
||||
message_multiple => 'All applications usage are ok', type => 1 }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
{ label => 'edge-applications-count', nlabel => 'edge.applications.total.count', set => {
|
||||
key_values => [ { name => 'app_count' } ],
|
||||
output_template => '%s application(s)',
|
||||
perfdatas => [ { template => '%d', unit => '', min => 0, label_extra_instance => 1 } ]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{apps} = [
|
||||
{ label => 'traffic-in', nlabel => 'application.traffic.in.bitspersecond', set => {
|
||||
key_values => [ { name => 'traffic_in' }, { name => 'display' }, { name => 'id' } ],
|
||||
|
@ -148,6 +158,7 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$self->{edges}->{$edge->{name}}->{global}->{app_count}++;
|
||||
$self->{edges}->{$edge->{name}}->{apps}->{ $app_name } = {
|
||||
id => $app->{application},
|
||||
display => $app_name,
|
||||
|
@ -186,7 +197,7 @@ Filter application by name (Can be a regexp).
|
|||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'traffic-in', 'traffic-out',
|
||||
Can be: 'edge-applications-count', 'traffic-in', 'traffic-out',
|
||||
'packets-in', 'packets-out'.
|
||||
|
||||
=back
|
||||
|
|
|
@ -32,12 +32,22 @@ sub set_counters {
|
|||
{ name => 'edges', type => 3, cb_prefix_output => 'prefix_edge_output', cb_long_output => 'long_output',
|
||||
message_multiple => 'All edges categories usage are ok', indent_long_output => ' ',
|
||||
group => [
|
||||
{ name => 'global', type => 0 },
|
||||
{ name => 'categories', display_long => 1, cb_prefix_output => 'prefix_category_output',
|
||||
message_multiple => 'All categories usage are ok', type => 1 }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
{ label => 'edge-categories-count', nlabel => 'edge.categories.total.count', set => {
|
||||
key_values => [ { name => 'category_count' } ],
|
||||
output_template => '%s categorie(s)',
|
||||
perfdatas => [ { template => '%d', unit => '', min => 0, label_extra_instance => 1 } ]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{categories} = [
|
||||
{ label => 'traffic-in', nlabel => 'category.traffic.in.bitspersecond', set => {
|
||||
key_values => [ { name => 'traffic_in' }, { name => 'display' }, { name => 'id' } ],
|
||||
|
@ -143,6 +153,7 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$self->{edges}->{$edge->{name}}->{global}->{category_count}++;
|
||||
$self->{edges}->{$edge->{name}}->{categories}->{$category->{name}} = {
|
||||
id => $category->{category},
|
||||
display => $category->{name},
|
||||
|
@ -181,7 +192,7 @@ Filter category by name (Can be a regexp).
|
|||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'traffic-in', 'traffic-out',
|
||||
Can be: 'edge-categories-count', 'traffic-in', 'traffic-out',
|
||||
'packets-in', 'packets-out'.
|
||||
|
||||
=back
|
||||
|
|
|
@ -63,6 +63,14 @@ sub set_counters {
|
|||
{ template => '%s', min => 0, max => 10, label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'edge-links-count', nlabel => 'global.links.total.count', set => {
|
||||
key_values => [ { name => 'link_count' } ],
|
||||
output_template => '%s link(s)',
|
||||
perfdatas => [
|
||||
{ template => '%d', unit => '', min => 0, label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -175,6 +183,7 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$self->{edges}->{$edge->{name}}->{global}->{link_count}++;
|
||||
$self->{edges}->{$edge->{name}}->{links}->{$link->{link}->{displayName}} = {
|
||||
id => $link->{linkId},
|
||||
display => $link->{link}->{displayName},
|
||||
|
@ -212,9 +221,9 @@ Filter link by name (Can be a regexp).
|
|||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'qoe-voice-global', 'qoe-video-global', 'qoe-transactional-global' (global values) and/or
|
||||
Can be: 'edge-links-count', 'qoe-voice-global', 'qoe-video-global', 'qoe-transactional-global' (global values) and/or
|
||||
'qoe-voice', 'qoe-video', 'qoe-transactional' (per link values).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
=cut
|
|
@ -44,12 +44,22 @@ sub set_counters {
|
|||
{ name => 'edges', type => 3, cb_prefix_output => 'prefix_edge_output', cb_long_output => 'long_output',
|
||||
message_multiple => 'All edges links status are ok', indent_long_output => ' ',
|
||||
group => [
|
||||
{ name => 'global', type => 0 },
|
||||
{ name => 'links', display_long => 1, cb_prefix_output => 'prefix_link_output',
|
||||
message_multiple => 'All links status are ok', type => 1 }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
{ label => 'edge-links-count', nlabel => 'edge.links.total.count', set => {
|
||||
key_values => [ { name => 'link_count' } ],
|
||||
output_template => '%s link(s)',
|
||||
perfdatas => [ { template => '%d', unit => '', min => 0 } ]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{links} = [
|
||||
{
|
||||
label => 'status',
|
||||
|
@ -134,6 +144,7 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$self->{edges}->{$edge->{name}}->{global}->{link_count}++;
|
||||
$self->{edges}->{$edge->{name}}->{links}->{$link->{link}->{displayName}} = {
|
||||
id => $link->{linkId},
|
||||
display => $link->{link}->{displayName},
|
||||
|
@ -173,15 +184,13 @@ Filter link by name (Can be a regexp).
|
|||
Set unknown threshold for status (Default: '').
|
||||
Can used special variables like: %{state}, %{vpn_state}, %{backup_state}.
|
||||
|
||||
=item B<--warning-status>
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Set warning threshold for status (Default: '').
|
||||
Can used special variables like: %{state}, %{vpn_state}, %{backup_state}.
|
||||
Warning & Critical thresholds
|
||||
Can be 'status', 'edge-links-count'.
|
||||
|
||||
=item B<--critical-status>
|
||||
|
||||
Set critical threshold for status (Default: '%{state} !~ /STABLE/ || %{vpn_state} !~ /STABLE/').
|
||||
Can used special variables like: %{state}, %{vpn_state}, %{backup_state}.
|
||||
For 'status', special variables can be used: %{state}, %{vpn_state}, %{backup_state}
|
||||
(Critical threshold default: '%{state} !~ /STABLE/ || %{vpn_state} !~ /STABLE/').
|
||||
|
||||
=back
|
||||
|
||||
|
|
|
@ -57,6 +57,14 @@ sub set_counters {
|
|||
{ template => '%s', min => 0, unit => 'b/s', label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'edge-links-count', nlabel => 'links.total.count', set => {
|
||||
key_values => [ { name => 'link_count' } ],
|
||||
output_template => '%s link(s)',
|
||||
perfdatas => [
|
||||
{ template => '%d', unit => '', min => 0, label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -200,6 +208,7 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$self->{edges}->{$edge->{name}}->{global}->{link_count}++;
|
||||
$self->{edges}->{$edge->{name}}->{links}->{$link->{link}->{displayName}} = {
|
||||
id => $link->{linkId},
|
||||
display => $link->{link}->{displayName},
|
||||
|
@ -248,7 +257,7 @@ Filter link by name (Can be a regexp).
|
|||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'links-traffic-in', 'links-traffic-out',
|
||||
Can be: 'edge-links-count', 'links-traffic-in', 'links-traffic-out',
|
||||
'traffic-in', 'traffic-out', 'latency-in',
|
||||
'latency-out', 'jitter-in', 'jitter-out',
|
||||
'packet-loss-in', 'packet-loss-out'.
|
||||
|
|
Loading…
Reference in New Issue