remove useless code
This commit is contained in:
parent
58ea20c94e
commit
7abeb15461
|
@ -125,8 +125,8 @@ sub set_counters {
|
|||
output_use => 'traffic_per_seconds', threshold_use => 'traffic_per_seconds',
|
||||
perfdatas => [
|
||||
{ value => 'traffic_per_seconds', template => '%d',
|
||||
unit => 'B/s', min => 0, label_extra_instance => 1, instance_use => 'display' },
|
||||
],
|
||||
unit => 'B/s', min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'channels-maxjitter', nlabel => 'call.channels.maxjitter.milliseconds', set => {
|
||||
|
@ -137,8 +137,8 @@ sub set_counters {
|
|||
output_use => 'max_jitter', threshold_use => 'max_jitter',
|
||||
perfdatas => [
|
||||
{ value => 'max_jitter', template => '%d',
|
||||
unit => 'ms', min => 0, label_extra_instance => 1, instance_use => 'display' },
|
||||
],
|
||||
unit => 'ms', min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'channels-packetloss', nlabel => 'call.channels.packetloss.count', set => {
|
||||
|
@ -149,8 +149,8 @@ sub set_counters {
|
|||
threshold_use => 'packets_loss',
|
||||
perfdatas => [
|
||||
{ value => 'packets_loss', template => '%d',
|
||||
min => 0, label_extra_instance => 1, instance_use => 'display' },
|
||||
],
|
||||
min => 0, label_extra_instance => 1, instance_use => 'display' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'channels-packetloss-prct', nlabel => 'call.channels.packetloss.percentage', display_ok => 0, set => {
|
||||
|
@ -161,10 +161,10 @@ sub set_counters {
|
|||
threshold_use => 'packets_loss_prct',
|
||||
perfdatas => [
|
||||
{ value => 'packets_loss_prct', template => '%.2f',
|
||||
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display' },
|
||||
],
|
||||
unit => '%', min => 0, max => 100, label_extra_instance => 1, instance_use => 'display' }
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ sub set_counters {
|
|||
{ name => 'global_video_incoming', cb_prefix_output => 'prefix_global_output', type => 0, skipped_code => { -10 => 1 } },
|
||||
{ name => 'global_video_outgoing', cb_prefix_output => 'prefix_global_output', type => 0, skipped_code => { -10 => 1 } },
|
||||
{ name => 'global_audio_incoming', cb_prefix_output => 'prefix_global_output', type => 0, skipped_code => { -10 => 1 } },
|
||||
{ name => 'global_audio_outgoing', cb_prefix_output => 'prefix_global_output', type => 0, skipped_code => { -10 => 1 } },
|
||||
{ name => 'global_audio_outgoing', cb_prefix_output => 'prefix_global_output', type => 0, skipped_code => { -10 => 1 } }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
|
@ -61,8 +61,8 @@ sub set_counters {
|
|||
key_values => [ { name => 'new_calls' } ],
|
||||
output_template => 'total calls finished: %d',
|
||||
perfdatas => [
|
||||
{ value => 'new_calls', template => '%d', min => 0 },
|
||||
],
|
||||
{ template => '%d', min => 0 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -72,8 +72,8 @@ sub set_counters {
|
|||
key_values => [ { name => 'peoplecount' } ],
|
||||
output_template => 'people count: %s',
|
||||
perfdatas => [
|
||||
{ value => 'peoplecount', template => '%d', min => 0 },
|
||||
],
|
||||
{ template => '%d', min => 0 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -85,26 +85,26 @@ sub set_counters {
|
|||
key_values => [ { name => 'loss' }, { name => 'pkts' }, { name => 'loss_prct' } ],
|
||||
closure_custom_output => $self->can('custom_loss_output'),
|
||||
perfdatas => [
|
||||
{ value => 'loss', template => '%d', min => 0 },
|
||||
],
|
||||
{ template => '%d', min => 0 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'packetloss-prct', nlabel => 'calls.' . $type . '.' . $direction . '.packetloss.percentage', display_ok => 0, set => {
|
||||
key_values => [ { name => 'loss_prct' }, { name => 'loss' }, { name => 'pkts' } ],
|
||||
closure_custom_output => $self->can('custom_loss_output'),
|
||||
perfdatas => [
|
||||
{ value => 'loss_prct', template => '%d', unit => '%', min => 0, max => 100 },
|
||||
],
|
||||
{ template => '%d', unit => '%', min => 0, max => 100 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'maxjitter', nlabel => 'calls.' . $type . '.' . $direction . '.maxjitter.count', set => {
|
||||
key_values => [ { name => 'maxjitter' } ],
|
||||
output_template => 'max jitter: %s ms',
|
||||
perfdatas => [
|
||||
{ value => 'maxjitter', template => '%d', unit => 'ms', min => 0 },
|
||||
],
|
||||
{ template => '%d', unit => 'ms', min => 0 }
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ sub manage_selection {
|
|||
$self->{global_video_outgoing} = { loss => 0, pkts => 0, loss_prct => 0, maxjitter => 0, label => 'video outgoing' };
|
||||
$self->{global_audio_incoming} = { loss => 0, pkts => 0, loss_prct => 0, maxjitter => 0, label => 'audio incoming' };
|
||||
$self->{global_audio_outgoing} = { loss => 0, pkts => 0, loss_prct => 0, maxjitter => 0, label => 'audio outgoing' };
|
||||
$self->{global_roomanalytics} = { peoplecount => 0};
|
||||
$self->{global_roomanalytics} = { peoplecount => 0 };
|
||||
|
||||
return if (!defined($result->{CallHistoryGetResult}->{Entry}));
|
||||
|
||||
|
@ -185,9 +185,9 @@ sub manage_selection {
|
|||
}
|
||||
}
|
||||
}
|
||||
$self->{'global_roomanalytics'}->{peoplecount} = $_->{RoomAnalytics}->{PeopleCount};
|
||||
$self->{global_roomanalytics}->{peoplecount} = $_->{RoomAnalytics}->{PeopleCount};
|
||||
if ($_->{RoomAnalytics}->{PeopleCount} =~ /^N\/A$/) {
|
||||
$self->{'global_roomanalytics'}->{peoplecount} = 0;
|
||||
$self->{global_roomanalytics}->{peoplecount} = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ sub set_counters {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'certificates', type => 1, cb_prefix_output => 'prefix_certificate_output', message_multiple => 'All certificates are ok', skipped_code => { -10 => 1 } },
|
||||
{ name => 'certificates', type => 1, cb_prefix_output => 'prefix_certificate_output', message_multiple => 'All certificates are ok', skipped_code => { -10 => 1 } }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{certificates} = [
|
||||
|
@ -47,8 +47,8 @@ sub set_counters {
|
|||
key_values => [ { name => 'validity_time' }, { name => 'generation_time' } ],
|
||||
closure_custom_output => $self->can('custom_validity_output'),
|
||||
perfdatas => [
|
||||
{ value => 'validity_time', template => '%d', min => 0, unit => 's' },
|
||||
],
|
||||
{ template => '%d', min => 0, unit => 's' }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -102,7 +102,7 @@ sub manage_selection {
|
|||
$self->{certificates}->{$_->{item}} = {
|
||||
display => $_->{SubjectName},
|
||||
validity_time => $end_date - time(),
|
||||
generation_time => centreon::plugins::misc::change_seconds(value => $end_date - time()),
|
||||
generation_time => centreon::plugins::misc::change_seconds(value => $end_date - time())
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,17 +54,17 @@ sub set_system {
|
|||
['InProgress', 'OK'],
|
||||
['InstallationFailed', 'CRITICAL'],
|
||||
['Failed', 'CRITICAL'],
|
||||
['Succeeded', 'OK'],
|
||||
['Succeeded', 'OK']
|
||||
],
|
||||
software_urgency => [
|
||||
['Low', 'OK'],
|
||||
['Medium', 'OK'],
|
||||
['Critical', 'CRITICAL'],
|
||||
['Critical', 'CRITICAL']
|
||||
],
|
||||
signal_state => [
|
||||
['OK', 'OK'],
|
||||
['Unsupported', 'WARNING'],
|
||||
['Unknown', 'UNKNOWN'],
|
||||
['Unknown', 'UNKNOWN']
|
||||
],
|
||||
format_status => [
|
||||
['Ok', 'OK'],
|
||||
|
@ -72,24 +72,24 @@ sub set_system {
|
|||
['NotFound', 'OK'],
|
||||
['Error', 'CRITICAL'],
|
||||
['Interlaced', 'OK'],
|
||||
['Unknown', 'UNKNOWN'],
|
||||
['Unknown', 'UNKNOWN']
|
||||
],
|
||||
webex => [
|
||||
['Disabled', 'OK'],
|
||||
['Stopped', 'OK'],
|
||||
['Error', 'CRITICAL'],
|
||||
['Registered', 'OK'],
|
||||
['Registering', 'OK'],
|
||||
['Registering', 'OK']
|
||||
],
|
||||
st_status => [
|
||||
['Inactive', 'WARNING'],
|
||||
['Active', 'OK'],
|
||||
['Active', 'OK']
|
||||
],
|
||||
st_availability => [
|
||||
['Unavailable', 'WARNING'],
|
||||
['Available', 'OK'],
|
||||
['Off', 'OK'],
|
||||
],
|
||||
['Off', 'OK']
|
||||
]
|
||||
};
|
||||
|
||||
$self->{components_exec_load} = 0;
|
||||
|
|
|
@ -63,9 +63,9 @@ sub set_counters {
|
|||
closure_custom_calc => $self->can('custom_status_calc'),
|
||||
closure_custom_output => $self->can('custom_status_output'),
|
||||
closure_custom_perfdata => sub { return 0; },
|
||||
closure_custom_threshold_check => \&catalog_status_threshold,
|
||||
closure_custom_threshold_check => \&catalog_status_threshold
|
||||
}
|
||||
},
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ sub new {
|
|||
$options{options}->add_options(arguments => {
|
||||
'filter-msg:s' => { name => 'filter_msg' },
|
||||
'warning-status:s' => { name => 'warning_status', default => '%{level} =~ /warning|minor/i' },
|
||||
'critical-status:s' => { name => 'critical_status', default => '%{level} =~ /critical|major/i' },
|
||||
'critical-status:s' => { name => 'critical_status', default => '%{level} =~ /critical|major/i' }
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
|
|
@ -29,7 +29,7 @@ sub set_counters {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'global', type => 0 },
|
||||
{ name => 'global', type => 0 }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
|
@ -37,8 +37,8 @@ sub set_counters {
|
|||
key_values => [ { name => 'connected' } ],
|
||||
output_template => 'peripherals connected: %d',
|
||||
perfdatas => [
|
||||
{ value => 'connected', template => '%d', min => 0 },
|
||||
],
|
||||
{ template => '%d', min => 0 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -51,7 +51,7 @@ sub new {
|
|||
|
||||
$self->{version} = '1.0';
|
||||
$options{options}->add_options(arguments => {
|
||||
'filter-since:s' => { name => 'filter_since', default => 86400 },
|
||||
'filter-since:s' => { name => 'filter_since', default => 86400 }
|
||||
});
|
||||
|
||||
centreon::plugins::misc::mymodule_load(
|
||||
|
|
|
@ -29,7 +29,7 @@ sub set_counters {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'global', type => 0 },
|
||||
{ name => 'global', type => 0 }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
|
@ -37,8 +37,8 @@ sub set_counters {
|
|||
key_values => [ { name => 'sessions' } ],
|
||||
output_template => 'total current sessions: %d',
|
||||
perfdatas => [
|
||||
{ value => 'sessions', template => '%d', min => 0 },
|
||||
],
|
||||
{ template => '%d', min => 0 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue