Ctor 460 teldat snmp cells radio (#5102)
Co-authored-by: garnier-quentin <garnier.quentin@gmail.com> Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198> Co-authored-by: omercier <32134301+omercier@users.noreply.github.com> Co-authored-by: omercier <omercier@centreon.com> REFS: CTOR-460
This commit is contained in:
parent
475d8f5a69
commit
a75641aaf3
|
@ -1,346 +1,367 @@
|
|||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::cellsradio;
|
||||
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng);
|
||||
|
||||
sub custom_signal_perfdata {
|
||||
my ($self) = @_;
|
||||
|
||||
my $instances = [];
|
||||
foreach (@{$self->{instance_mode}->{custom_perfdata_instances}}) {
|
||||
push @$instances, $self->{result_values}->{$_};
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(
|
||||
nlabel => $self->{nlabel},
|
||||
instances => $instances,
|
||||
value => $self->{result_values}->{ $self->{key_values}->[0]->{name} },
|
||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
|
||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
|
||||
min => 0
|
||||
);
|
||||
}
|
||||
|
||||
sub custom_status_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
'sim status: %s [imsi: %s] [interface state: %s]',
|
||||
$self->{result_values}->{simStatus},
|
||||
$self->{result_values}->{imsi},
|
||||
$self->{result_values}->{interfaceState}
|
||||
);
|
||||
}
|
||||
|
||||
sub cell_long_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
"checking cellular radio module '%s' [sim icc: %s, operator: %s]",
|
||||
$options{instance_value}->{cellId},
|
||||
$options{instance_value}->{simIcc},
|
||||
$options{instance_value}->{operator}
|
||||
);
|
||||
}
|
||||
|
||||
sub prefix_cell_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
"cellular radio module '%s' [sim icc: %s, operator: %s] ",
|
||||
$options{instance_value}->{cellId},
|
||||
$options{instance_value}->{simIcc},
|
||||
$options{instance_value}->{operator}
|
||||
);
|
||||
}
|
||||
|
||||
sub prefix_global_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return 'Number of cellular radio modules ';
|
||||
}
|
||||
|
||||
sub set_counters {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'global', type => 0, cb_prefix_output => 'prefix_global_output' },
|
||||
{ name => 'cells', type => 3, cb_prefix_output => 'prefix_cell_output', cb_long_output => 'cell_long_output',
|
||||
indent_long_output => ' ', message_multiple => 'All cellular radio modules are ok',
|
||||
group => [
|
||||
{ name => 'status', type => 0, skipped_code => { -10 => 1 } },
|
||||
{ name => 'signal', type => 0, skipped_code => { -10 => 1 } }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
{ label => 'modules-cellradio-detected', display_ok => 0, nlabel => 'modules.cellradio.detected.count', set => {
|
||||
key_values => [ { name => 'detected' } ],
|
||||
output_template => 'detected: %s',
|
||||
perfdatas => [
|
||||
{ template => '%s', min => 0, label_extra_instance => 1, instance_use => 'name'}
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{status} = [
|
||||
{
|
||||
label => 'status',
|
||||
type => 2,
|
||||
warning_default => '%{interfaceState} =~ /disconnect/',
|
||||
critical_default => '%{simStatus} =~ /LOCKED/ || %{simStatus} =~ /DETECTING/',
|
||||
set => {
|
||||
key_values => [
|
||||
{ name => 'cellId' }, { name => 'operator' }, { name => 'imsi' }, { name => 'simIcc' },
|
||||
{ name => 'simStatus' }, { name => 'interfaceState' }
|
||||
],
|
||||
closure_custom_output => $self->can('custom_status_output'),
|
||||
closure_custom_perfdata => sub { return 0; },
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{signal} = [
|
||||
{ label => 'module-cellradio-rsrp', nlabel => 'module.cellradio.rsrp.dbm', set => {
|
||||
key_values => [ { name => 'rsrp' }, { name => 'cellId' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'rsrp: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-rsrq', nlabel => 'module.cellradio.rsrq.dbm', set => {
|
||||
key_values => [ { name => 'rsrq' }, { name => 'cellId' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'rsrq: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-snr', nlabel => 'module.cellradio.snr.db', set => {
|
||||
key_values => [ { name => 'snr' }, { name => 'cellId' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'snr: %s dB',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-rscp', nlabel => 'module.cellradio.rscp.dbm', set => {
|
||||
key_values => [ { name => 'rscp' }, { name => 'cellId' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'rscp: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-csq', nlabel => 'module.cellradio.csq.dbm', set => {
|
||||
key_values => [ { name => 'csq' }, { name => 'cellId' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'csq: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
'filter-cell-id:s' => { name => 'filter_cell_id' },
|
||||
'custom-perfdata-instances:s' => { name => 'custom_perfdata_instances' }
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
if (!defined($self->{option_results}->{custom_perfdata_instances}) || $self->{option_results}->{custom_perfdata_instances} eq '') {
|
||||
$self->{option_results}->{custom_perfdata_instances} = '%(cellId) %(operator)';
|
||||
}
|
||||
|
||||
$self->{custom_perfdata_instances} = $self->custom_perfdata_instances(
|
||||
option_name => '--custom-perfdata-instances',
|
||||
instances => $self->{option_results}->{custom_perfdata_instances},
|
||||
labels => { cellId => 1, operator => 1, simIcc => 1}
|
||||
);
|
||||
}
|
||||
|
||||
my $mapping_info_interface = {
|
||||
imei => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.5' }, # teldatCellularInfoInterfaceModuleIMEI : Cellular module IMEI.
|
||||
imsi => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.6' }, # teldatCellularInfoInterfaceModuleIMSI : Cellular module IMSI.
|
||||
simIcc => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.8' }, # teldatCellularInfoInterfaceSIMIcc : Cellular active SIM ICC.
|
||||
};
|
||||
|
||||
my $mapping_state_interface = {
|
||||
interfaceState => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.1.1.2' } # teldatCellularStateInterfaceState : Call state.
|
||||
};
|
||||
|
||||
my $mapping_state_mobile = {
|
||||
techno => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.6' }, # teldatCellularStateMobileRadioTechnology : Cellular mobile current radio access tecnology used (!GETRAT).
|
||||
rscp => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.8' }, # teldatCellularStateMobileRxSignalCodePwr : Cellular mobile received signal code power (RSCP).
|
||||
csq => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.10' }, # teldatCellularStateMobileSignalQuality : Cellular mobile reception signal quality (+CSQ).
|
||||
rsrp => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.22' }, # teldatCellularStateMobileRxRSRP : Cellular mobile reference symbol received power (RSRP).
|
||||
rsrq => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.23' }, # teldatCellularStateMobileRxRSRQ : Cellular mobile reference signal received quality (RSRQ).
|
||||
snr => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.24' }, # teldatCellularStateMobileRxSINR : Cellular mobile signal versus noise ratio (SINR).
|
||||
simStatus => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.26' } # teldatCellularStateMobileSIMStatus : Cellular mobile SIM status.
|
||||
};
|
||||
|
||||
my $mapping_prof_dial = {
|
||||
operator => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.4.1.2' } # teldatCellularProfDialName1 : Dial Profile Name(1) associated to cellular interface.
|
||||
};
|
||||
|
||||
my $oid_teldatCellularInfoInterfaceEntry = '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1'; # teldatInfoInterfaceTable
|
||||
my $oid_teldatCellularStateMobileEntry = '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1'; # teldatStateMobileTable
|
||||
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{global} = { detected => 0 };
|
||||
$self->{cells} = {};
|
||||
|
||||
my $snmp_result = $options{snmp}->get_multiple_table(
|
||||
oids => [
|
||||
{ oid => $mapping_state_interface->{interfaceState}->{oid} },
|
||||
{ oid => $mapping_prof_dial->{operator}->{oid} },
|
||||
{ oid => $oid_teldatCellularInfoInterfaceEntry, start => $mapping_info_interface->{imei}->{oid}, end => $mapping_info_interface->{simIcc}->{oid} },
|
||||
{ oid => $oid_teldatCellularStateMobileEntry, start => $mapping_state_mobile->{techno}->{oid}, end => $mapping_state_mobile->{simStatus}->{oid} }
|
||||
],
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
foreach my $oid (keys %{$snmp_result->{$oid_teldatCellularInfoInterfaceEntry}}) {
|
||||
next if ($oid !~ /^$mapping_info_interface->{imei}->{oid}\.(.*)$/);
|
||||
my $instance = $1;
|
||||
|
||||
my $result = $options{snmp}->map_instance(mapping => $mapping_info_interface, results => $snmp_result->{$oid_teldatCellularInfoInterfaceEntry}, instance => $instance);
|
||||
my $result2 = $options{snmp}->map_instance(mapping => $mapping_state_interface, results => $snmp_result->{$mapping_state_interface->{interfaceState}->{oid}}, instance => $instance);
|
||||
my $result3 = $options{snmp}->map_instance(mapping => $mapping_prof_dial, results => $snmp_result->{$mapping_prof_dial->{operator}->{oid}}, instance => $instance);
|
||||
|
||||
my $cell_id = $result->{imei};
|
||||
next if ($cell_id !~ /^(?:[0-9]+)$/);
|
||||
next if (defined($self->{option_results}->{filter_cell_id}) && $self->{option_results}->{filter_cell_id} ne '' &&
|
||||
$cell_id !~ /$self->{option_results}->{filter_cell_id}/ && $result->{simIcc} !~ /$self->{option_results}->{filter_cell_id}/);
|
||||
|
||||
my $operator = $result3->{operator};
|
||||
if($result3->{operator} =~ /^-+$/){
|
||||
$operator = "N/A";
|
||||
}
|
||||
$self->{cells}->{$instance} = {
|
||||
cellId => $cell_id,
|
||||
simIcc => $result->{simIcc},
|
||||
operator => $operator,
|
||||
status => {
|
||||
cellId => $cell_id,
|
||||
simIcc => $result->{simIcc},
|
||||
operator => $operator,
|
||||
imsi => $result->{imsi},
|
||||
interfaceState => $result2->{interfaceState}
|
||||
},
|
||||
signal => {
|
||||
cellId => $cell_id,
|
||||
simIcc => $result->{simIcc},
|
||||
operator => $operator
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{cells}}) <= 0 && defined($self->{option_results}->{filter_cell_id}) && $self->{option_results}->{filter_cell_id} ne '') {
|
||||
$self->{output}->add_option_msg(short_msg => "No Cell ID found matching with filter : ".$self->{option_results}->{filter_cell_id});
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
# Return : OK: | 'modules.cellradio.detected.count'=0;;;0;
|
||||
# return if (scalar(keys %{$self->{cells}}) <= 0);
|
||||
|
||||
foreach my $instance (keys %{$self->{cells}}) {
|
||||
my $result4 = $options{snmp}->map_instance(mapping => $mapping_state_mobile, results => $snmp_result->{$oid_teldatCellularStateMobileEntry}, instance => $instance);
|
||||
|
||||
$self->{cells}->{$instance}->{status}->{simStatus} = $result4->{simStatus};
|
||||
|
||||
if ($self->{cells}->{$instance}->{status}->{simIcc} ne '') {
|
||||
if($result4->{rsrp} ne '' && $result4->{rsrp} ne 0){
|
||||
$self->{cells}->{$instance}->{signal}->{rsrp} = $result4->{rsrp};
|
||||
}
|
||||
if($result4->{rsrq} ne '' && $result4->{rsrq} ne 0) {
|
||||
$self->{cells}->{$instance}->{signal}->{rsrq} = $result4->{rsrq};
|
||||
}
|
||||
if($result4->{snr} ne '' && $result4->{snr} ne 0) {
|
||||
$self->{cells}->{$instance}->{signal}->{snr} = $result4->{snr};
|
||||
}
|
||||
if($result4->{rscp} ne '' && $result4->{rscp} ne 0) {
|
||||
$self->{cells}->{$instance}->{signal}->{rscp} = $result4->{rscp};
|
||||
}
|
||||
if($result4->{csq} ne '' && $result4->{csq} ne 0) {
|
||||
$self->{cells}->{$instance}->{signal}->{csq} = $result4->{csq};
|
||||
}
|
||||
}
|
||||
|
||||
$self->{global}->{detected}++;
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check cellular radio modules.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--filter-cell-id>
|
||||
|
||||
Filter cell modules by IMEI ID.
|
||||
|
||||
=item B<--custom-perfdata-instances>
|
||||
|
||||
Define perfdatas instance (default: '%(cellId) %(operator)').
|
||||
You can use the following variables: %{cellId}, %{simIcc}, %{operator}
|
||||
|
||||
=item B<--unknown-status>
|
||||
|
||||
Define the conditions to match for the status to be UNKNOWN.
|
||||
You can use the following variables: %{simStatus}, %{interfaceState}, %{cellId}, %{simIcc}, %{operator}, %{imsi}
|
||||
|
||||
=item B<--warning-status>
|
||||
|
||||
Define the conditions to match for the status to be WARNING (default: '%{interfaceState} =~ /disconnect/').
|
||||
You can use the following variables: %{simStatus}, %{interfaceState}, %{cellId}, %{simIcc}, %{operator}, %{imsi}
|
||||
|
||||
=item B<--critical-status>
|
||||
|
||||
Define the conditions to match for the status to be CRITICAL (default: '%{simStatus} =~ /LOCKED/ || %{simStatus} =~ /DETECTING/').
|
||||
You can use the following variables: %{simStatus}, %{interfaceState}, %{cellId}, %{simIcc}, %{operator}, %{imsi}
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'modules-cellradio-detected', 'module-cellradio-rsrp', ''module-cellradio-rsrq', 'module-cellradio-rscp', 'module-cellradio-csq'
|
||||
'module-cellradio-snr'.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::cellsradio;
|
||||
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng);
|
||||
|
||||
sub custom_signal_perfdata {
|
||||
my ($self) = @_;
|
||||
|
||||
my $instances = [];
|
||||
foreach (@{$self->{instance_mode}->{custom_perfdata_instances}}) {
|
||||
push @$instances, $self->{result_values}->{$_};
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(
|
||||
nlabel => $self->{nlabel},
|
||||
instances => $instances,
|
||||
value => $self->{result_values}->{ $self->{key_values}->[0]->{name} },
|
||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
|
||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
|
||||
min => 0
|
||||
);
|
||||
}
|
||||
|
||||
sub custom_status_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
'sim status: %s [operator: %s] [imsi: %s] [interface state: %s] [simIcc: %s]',
|
||||
$self->{result_values}->{simStatus},
|
||||
$self->{result_values}->{operator},
|
||||
$self->{result_values}->{imsi},
|
||||
$self->{result_values}->{interfaceState},
|
||||
$self->{result_values}->{simIcc}
|
||||
);
|
||||
}
|
||||
|
||||
sub cell_long_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
"checking cellular radio module '%s' interface '%s' [imei: %s] ",
|
||||
$options{instance_value}->{module_num},
|
||||
$options{instance_value}->{interfaceType},
|
||||
$options{instance_value}->{imei}
|
||||
);
|
||||
}
|
||||
|
||||
sub prefix_cell_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
"cellular radio module '%s' interface '%s' [imei: %s] ",
|
||||
$options{instance_value}->{module_num},
|
||||
$options{instance_value}->{interfaceType},
|
||||
$options{instance_value}->{imei}
|
||||
);
|
||||
}
|
||||
|
||||
sub prefix_global_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return 'Number of cellular radio interfaces';
|
||||
}
|
||||
|
||||
sub set_counters {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'global', type => 0, cb_prefix_output => 'prefix_global_output' },
|
||||
{ name => 'cells', type => 3, cb_prefix_output => 'prefix_cell_output', cb_long_output => 'cell_long_output',
|
||||
indent_long_output => ' ', message_multiple => 'All cellular radio interfaces are ok',
|
||||
group => [
|
||||
{ name => 'status', type => 0, skipped_code => { -10 => 1 } },
|
||||
{ name => 'signal', type => 0, skipped_code => { -10 => 1 } }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
{ label => 'modules-cellradio-detected', display_ok => 0, nlabel => 'modules.cellradio.detected.count', set => {
|
||||
key_values => [ { name => 'detected' } ],
|
||||
output_template => 'detected: %s',
|
||||
perfdatas => [
|
||||
{ template => '%s', min => 0 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{status} = [
|
||||
{
|
||||
label => 'status',
|
||||
type => 2,
|
||||
warning_default => '%{interfaceState} =~ /disconnect/ && %{interfaceType} =~ /data primary/',
|
||||
set => {
|
||||
key_values => [
|
||||
{ name => 'module' }, { name => 'interfaceType' }, { name => 'imei' }, { name => 'simIcc' },
|
||||
{ name => 'operator' }, { name => 'imsi' },
|
||||
{ name => 'simStatus' }, { name => 'interfaceState' }
|
||||
],
|
||||
closure_custom_output => $self->can('custom_status_output'),
|
||||
closure_custom_perfdata => sub { return 0; },
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{signal} = [
|
||||
{ label => 'module-cellradio-rsrp', nlabel => 'module.cellradio.rsrp.dbm', set => {
|
||||
key_values => [ { name => 'rsrp' }, { name => 'module' }, { name => 'interfaceType' }, { name => 'imei' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'rsrp: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-rsrq', nlabel => 'module.cellradio.rsrq.dbm', set => {
|
||||
key_values => [ { name => 'rsrq' }, { name => 'module' }, { name => 'interfaceType' }, { name => 'imei' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'rsrq: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-snr', nlabel => 'module.cellradio.snr.db', set => {
|
||||
key_values => [ { name => 'snr' }, { name => 'module' }, { name => 'interfaceType' }, { name => 'imei' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'snr: %s dB',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-rscp', nlabel => 'module.cellradio.rscp.dbm', set => {
|
||||
key_values => [ { name => 'rscp' }, { name => 'module' }, { name => 'interfaceType' }, { name => 'imei' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'rscp: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
},
|
||||
{ label => 'module-cellradio-csq', nlabel => 'module.cellradio.csq.dbm', set => {
|
||||
key_values => [ { name => 'csq' }, { name => 'module' }, { name => 'interfaceType' }, { name => 'imei' }, { name => 'simIcc' }, { name => 'operator' } ],
|
||||
output_template => 'csq: %s dBm',
|
||||
closure_custom_perfdata => $self->can('custom_signal_perfdata')
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
'filter-module:s' => { name => 'filter_module' },
|
||||
'filter-imei:s' => { name => 'filter_imei' },
|
||||
'filter-interface-type:s' => { name => 'filter_interface_type' },
|
||||
'custom-perfdata-instances:s' => { name => 'custom_perfdata_instances' }
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::check_options(%options);
|
||||
|
||||
if (!defined($self->{option_results}->{custom_perfdata_instances}) || $self->{option_results}->{custom_perfdata_instances} eq '') {
|
||||
$self->{option_results}->{custom_perfdata_instances} = '%(module) %(interfaceType) %(imei)';
|
||||
}
|
||||
|
||||
$self->{custom_perfdata_instances} = $self->custom_perfdata_instances(
|
||||
option_name => '--custom-perfdata-instances',
|
||||
instances => $self->{option_results}->{custom_perfdata_instances},
|
||||
labels => { module => 1, interfaceType => 1, imei => 1, imsi => 1, operator => 1, simIcc => 1}
|
||||
);
|
||||
}
|
||||
|
||||
my $mapping_info_interface = {
|
||||
imei => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.5' }, # teldatCellularInfoInterfaceModuleIMEI : Cellular module IMEI.
|
||||
imsi => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.6' }, # teldatCellularInfoInterfaceModuleIMSI : Cellular module IMSI.
|
||||
simIcc => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.8' } # teldatCellularInfoInterfaceSIMIcc : Cellular active SIM ICC.
|
||||
};
|
||||
|
||||
my $mapping_data_interface = {
|
||||
interfaceState => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.1.1.2' }, # teldatCellularStateInterfaceState : Call state.
|
||||
techno => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.6' }, # teldatCellularStateMobileRadioTechnology : Cellular mobile current radio access tecnology used (!GETRAT).
|
||||
rscp => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.8' }, # teldatCellularStateMobileRxSignalCodePwr : Cellular mobile received signal code power (RSCP).
|
||||
csq => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.10' }, # teldatCellularStateMobileSignalQuality : Cellular mobile reception signal quality (+CSQ).
|
||||
rsrp => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.22' }, # teldatCellularStateMobileRxRSRP : Cellular mobile reference symbol received power (RSRP).
|
||||
rsrq => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.23' }, # teldatCellularStateMobileRxRSRQ : Cellular mobile reference signal received quality (RSRQ).
|
||||
snr => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.24' }, # teldatCellularStateMobileRxSINR : Cellular mobile signal versus noise ratio (SINR).
|
||||
simStatus => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.26' }, # teldatCellularStateMobileSIMStatus : Cellular mobile SIM status.
|
||||
operator => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.3.4.1.2' }
|
||||
};
|
||||
|
||||
my $oid_teldatCellularInfoInterfaceEntry = '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1'; # teldatInfoInterfaceTable
|
||||
|
||||
my $interface_types = {
|
||||
1 => 'control vocal',
|
||||
2 => 'data primary',
|
||||
3 => 'data auxiliary'
|
||||
};
|
||||
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $snmp_result = $options{snmp}->get_table(
|
||||
oid => $oid_teldatCellularInfoInterfaceEntry,
|
||||
start => $mapping_info_interface->{imei}->{oid},
|
||||
end => $mapping_info_interface->{simIcc}->{oid},
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
$self->{global} = { detected => 0 };
|
||||
$self->{cells} = {};
|
||||
my $modules = {};
|
||||
my $module_num = 0;
|
||||
my $interface_type = 0;
|
||||
foreach my $oid ($options{snmp}->oid_lex_sort(keys %$snmp_result)) {
|
||||
next if ($oid !~ /^$mapping_info_interface->{imei}->{oid}\.(.*)$/);
|
||||
my $instance = $1;
|
||||
|
||||
my $result = $options{snmp}->map_instance(mapping => $mapping_info_interface, results => $snmp_result, instance => $instance);
|
||||
next if ($result->{imei} !~ /^[0-9]+$/);
|
||||
|
||||
if (!defined($modules->{$module_num}) || $result->{imei} ne $modules->{$module_num}) {
|
||||
$module_num++;
|
||||
$interface_type = 0;
|
||||
$modules->{$module_num} = $result->{imei};
|
||||
}
|
||||
if (defined($modules->{$module_num})) {
|
||||
$interface_type++;
|
||||
}
|
||||
|
||||
my $module = 'module' . $module_num;
|
||||
|
||||
next if (defined($self->{option_results}->{filter_module}) && $self->{option_results}->{filter_module} ne '' &&
|
||||
$module !~ /$self->{option_results}->{filter_module}/);
|
||||
next if (defined($self->{option_results}->{filter_imei}) && $self->{option_results}->{filter_imei} ne '' &&
|
||||
$result->{imei} !~ /$self->{option_results}->{filter_imei}/);
|
||||
next if (defined($self->{option_results}->{filter_interface_type}) && $self->{option_results}->{filter_interface_type} ne '' &&
|
||||
$interface_types->{$interface_type} !~ /$self->{option_results}->{filter_interface_type}/);
|
||||
|
||||
$self->{cells}->{$instance} = {
|
||||
module => $module,
|
||||
module_num => $module_num,
|
||||
interfaceType => $interface_types->{$interface_type},
|
||||
imei => $result->{imei},
|
||||
status => {
|
||||
module => $module,
|
||||
interfaceType => $interface_types->{$interface_type},
|
||||
imei => $result->{imei},
|
||||
imsi => $result->{imsi},
|
||||
simIcc => $result->{simIcc}
|
||||
},
|
||||
signal => {
|
||||
module => $module,
|
||||
interfaceType => $interface_types->{$interface_type},
|
||||
imei => $result->{imei},
|
||||
imsi => $result->{imsi},
|
||||
simIcc => $result->{simIcc}
|
||||
}
|
||||
};
|
||||
|
||||
$self->{global}->{detected}++;
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{cells}}) <= 0 &&
|
||||
(defined($self->{option_results}->{filter_module}) && $self->{option_results}->{filter_module} ne '') ||
|
||||
(defined($self->{option_results}->{filter_imei}) && $self->{option_results}->{filter_imei} ne '')) {
|
||||
$self->{output}->add_option_msg(short_msg => 'No interfaces found matching with filter');
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
|
||||
$options{snmp}->load(
|
||||
oids => [ map($_->{oid}, values(%$mapping_data_interface)) ],
|
||||
instances => [ map($_, keys(%{$self->{cells}})) ],
|
||||
instance_regexp => '^(.*)$'
|
||||
);
|
||||
$snmp_result = $options{snmp}->get_leef();
|
||||
|
||||
foreach (keys %{$self->{cells}}) {
|
||||
my $result = $options{snmp}->map_instance(mapping => $mapping_data_interface, results => $snmp_result, instance => $_);
|
||||
|
||||
$self->{cells}->{$_}->{status}->{simStatus} = $result->{simStatus};
|
||||
$self->{cells}->{$_}->{status}->{interfaceState} = $result->{interfaceState};
|
||||
$self->{cells}->{$_}->{status}->{operator} = $result->{operator};
|
||||
$self->{cells}->{$_}->{signal}->{operator} = $result->{operator};
|
||||
|
||||
next if ($self->{cells}->{$_}->{status}->{simIcc} eq '');
|
||||
|
||||
$self->{cells}->{$_}->{signal}->{rsrp} = $result->{rsrp} if ($result->{rsrp} ne '' && $result->{rsrp} != 0);
|
||||
$self->{cells}->{$_}->{signal}->{rsrq} = $result->{rsrq} if ($result->{rsrq} ne '' && $result->{rsrq} != 0);
|
||||
$self->{cells}->{$_}->{signal}->{snr} = $result->{snr} if ($result->{snr} ne '' && $result->{snr} != 0);
|
||||
$self->{cells}->{$_}->{signal}->{rscp} = $result->{rscp} if ($result->{rscp} ne '' && $result->{rscp} != 0);
|
||||
$self->{cells}->{$_}->{signal}->{csq} = $result->{csq} if ($result->{csq} ne '' && $result->{csq} != 0);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check cellular radio interfaces.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--filter-module>
|
||||
|
||||
Filter cellular radio interfaces by module.
|
||||
|
||||
=item B<--filter-imei>
|
||||
|
||||
Filter cellular radio interfaces by IMEI.
|
||||
|
||||
=item B<--filter-interface-type>
|
||||
|
||||
Filter cellular radio interfaces by type.
|
||||
|
||||
=item B<--custom-perfdata-instances>
|
||||
|
||||
Customize the name composition rule for the instances the metrics will be attached to (default: '%(module) %(interfaceType) %(imei)').
|
||||
You can use the following variables: %(module), %(interfaceType), %(imei), %(operator), %(simIcc)
|
||||
|
||||
=item B<--unknown-status>
|
||||
|
||||
Define the conditions to match for the status to be UNKNOWN.
|
||||
You can use the following variables: %{module}, %{interfaceType}, %{imei}, %{operator}, %{imsi}, %{simIcc}, %{simStatus}, %{interfaceState}
|
||||
|
||||
=item B<--warning-status>
|
||||
|
||||
Define the conditions to match for the status to be WARNING (default: '%{interfaceState} =~ /disconnect/ && %{interfaceType} =~ /data primary/').
|
||||
You can use the following variables: %{module}, %{interfaceType}, %{imei}, %{operator}, %{imsi}, %{simIcc}, %{simStatus}, %{interfaceState}
|
||||
|
||||
=item B<--critical-status>
|
||||
|
||||
Define the conditions to match for the status to be CRITICAL.
|
||||
You can use the following variables: %{module}, %{interfaceType}, %{imei}, %{operator}, %{imsi}, %{simIcc}, %{simStatus}, %{interfaceState}
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'modules-cellradio-detected', 'module-cellradio-rsrp', ''module-cellradio-rsrq', 'module-cellradio-rscp', 'module-cellradio-csq'
|
||||
'module-cellradio-snr'.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
|
|
@ -1,116 +1,116 @@
|
|||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::cpu;
|
||||
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub prefix_cpu_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return 'cpu average usage: ';
|
||||
}
|
||||
|
||||
sub set_counters {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'global', type => 0, cb_prefix_output => 'prefix_cpu_output', skipped_code => { -10 => 1 } }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
{ label => 'cpu-utilization-5s', nlabel => 'cpu.utilization.5s.percentage', set => {
|
||||
key_values => [ { name => 'cpu_load5s' } ],
|
||||
output_template => '%.2f %% (5s)',
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'cpu-utilization-1m', nlabel => 'cpu.utilization.1m.percentage', set => {
|
||||
key_values => [ { name => 'cpu_load1m' } ],
|
||||
output_template => '%.2f %% (1m)',
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'cpu-utilization-5m', nlabel => 'cpu.utilization.15m.percentage', set => {
|
||||
key_values => [ { name => 'cpu_load5m' } ],
|
||||
output_template => '%.2f %% (5m)',
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%' }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $oid_cpu5s = '.1.3.6.1.4.1.2007.4.1.2.1.2.1.1.1.0'; # teldatCPUBusy5sec
|
||||
my $oid_cpu1m = '.1.3.6.1.4.1.2007.4.1.2.1.2.1.1.2.0'; # teldatCPUBusy1min
|
||||
my $oid_cpu5m = '.1.3.6.1.4.1.2007.4.1.2.1.2.1.1.3.0'; # teldatCPUBusy5min
|
||||
|
||||
my $snmp_result = $options{snmp}->get_leef(
|
||||
oids => [$oid_cpu5s, $oid_cpu1m, $oid_cpu5m],
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
$self->{global} = {
|
||||
cpu_load5s => $snmp_result->{$oid_cpu5s},
|
||||
cpu_load1m => $snmp_result->{$oid_cpu1m},
|
||||
cpu_load5m => $snmp_result->{$oid_cpu5m}
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check CPU usage.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'cpu-utilization-5s', 'cpu-utilization-1m', 'cpu-utilization-5m'.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::cpu;
|
||||
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub prefix_cpu_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return 'cpu average usage: ';
|
||||
}
|
||||
|
||||
sub set_counters {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'global', type => 0, cb_prefix_output => 'prefix_cpu_output', skipped_code => { -10 => 1 } }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{global} = [
|
||||
{ label => 'cpu-utilization-5s', nlabel => 'cpu.utilization.5s.percentage', set => {
|
||||
key_values => [ { name => 'cpu_load5s' } ],
|
||||
output_template => '%.2f %% (5s)',
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'cpu-utilization-1m', nlabel => 'cpu.utilization.1m.percentage', set => {
|
||||
key_values => [ { name => 'cpu_load1m' } ],
|
||||
output_template => '%.2f %% (1m)',
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%' }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'cpu-utilization-5m', nlabel => 'cpu.utilization.15m.percentage', set => {
|
||||
key_values => [ { name => 'cpu_load5m' } ],
|
||||
output_template => '%.2f %% (5m)',
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%' }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $oid_cpu5s = '.1.3.6.1.4.1.2007.4.1.2.1.2.1.1.1.0'; # teldatCPUBusy5sec
|
||||
my $oid_cpu1m = '.1.3.6.1.4.1.2007.4.1.2.1.2.1.1.2.0'; # teldatCPUBusy1min
|
||||
my $oid_cpu5m = '.1.3.6.1.4.1.2007.4.1.2.1.2.1.1.3.0'; # teldatCPUBusy5min
|
||||
|
||||
my $snmp_result = $options{snmp}->get_leef(
|
||||
oids => [$oid_cpu5s, $oid_cpu1m, $oid_cpu5m],
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
$self->{global} = {
|
||||
cpu_load5s => $snmp_result->{$oid_cpu5s},
|
||||
cpu_load1m => $snmp_result->{$oid_cpu1m},
|
||||
cpu_load5m => $snmp_result->{$oid_cpu5m}
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check CPU usage.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'cpu-utilization-5s', 'cpu-utilization-1m', 'cpu-utilization-5m'.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
|
|
@ -1,182 +1,180 @@
|
|||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::interfaces;
|
||||
|
||||
use base qw(snmp_standard::mode::interfaces);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check interfaces.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--add-global>
|
||||
|
||||
Check global port statistics (By default if no --add-* option is set).
|
||||
|
||||
=item B<--add-status>
|
||||
|
||||
Check interface status.
|
||||
|
||||
=item B<--add-duplex-status>
|
||||
|
||||
Check duplex status (with --warning-status and --critical-status).
|
||||
|
||||
=item B<--add-traffic>
|
||||
|
||||
Check interface traffic.
|
||||
|
||||
=item B<--add-errors>
|
||||
|
||||
Check interface errors.
|
||||
|
||||
=item B<--add-cast>
|
||||
|
||||
Check interface cast.
|
||||
|
||||
=item B<--add-speed>
|
||||
|
||||
Check interface speed.
|
||||
|
||||
=item B<--add-volume>
|
||||
|
||||
Check interface data volume between two checks (not supposed to be graphed, useful for BI reporting).
|
||||
|
||||
=item B<--check-metrics>
|
||||
|
||||
If the expression is true, metrics are checked (Default: '%{opstatus} eq "up"').
|
||||
|
||||
=item B<--warning-status>
|
||||
|
||||
Set warning threshold for status.
|
||||
You can use the following variables: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
|
||||
|
||||
=item B<--critical-status>
|
||||
|
||||
Set critical threshold for status (Default: '%{admstatus} eq "up" and %{opstatus} ne "up"').
|
||||
You can use the following variables: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'total-port', 'total-admin-up', 'total-admin-down', 'total-oper-up', 'total-oper-down',
|
||||
'in-traffic', 'out-traffic', 'in-error', 'in-discard', 'out-error', 'out-discard',
|
||||
'in-ucast', 'in-bcast', 'in-mcast', 'out-ucast', 'out-bcast', 'out-mcast',
|
||||
'speed' (b/s).
|
||||
|
||||
=item B<--units-traffic>
|
||||
|
||||
Units of thresholds for the traffic (Default: 'percent_delta') ('percent_delta', 'bps', 'counter').
|
||||
|
||||
=item B<--units-errors>
|
||||
|
||||
Units of thresholds for errors/discards (Default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'deltaps', 'counter').
|
||||
|
||||
=item B<--units-cast>
|
||||
|
||||
Units of thresholds for communication types (Default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'deltaps', 'counter').
|
||||
|
||||
=item B<--nagvis-perfdata>
|
||||
|
||||
Display traffic perfdata to be compatible with nagvis widget.
|
||||
|
||||
=item B<--interface>
|
||||
|
||||
Set the interface (number expected) ex: 1,2,... (empty means 'check all interface').
|
||||
|
||||
=item B<--name>
|
||||
|
||||
Allows to use interface name with option --interface instead of interface oid index (Can be a regexp)
|
||||
|
||||
=item B<--speed>
|
||||
|
||||
Set interface speed for incoming/outgoing traffic (in Mb).
|
||||
|
||||
=item B<--speed-in>
|
||||
|
||||
Set interface speed for incoming traffic (in Mb).
|
||||
|
||||
=item B<--speed-out>
|
||||
|
||||
Set interface speed for outgoing traffic (in Mb).
|
||||
|
||||
=item B<--map-speed-dsl>
|
||||
|
||||
Get interface speed configuration for interface type 'adsl' and 'vdsl2'.
|
||||
|
||||
Syntax: --map-speed-dsl=interface-src-name,interface-dsl-name
|
||||
|
||||
E.g: --map-speed-dsl=Et0.835,Et0-vdsl2
|
||||
|
||||
=item B<--force-counters64>
|
||||
|
||||
Force to use 64 bits counters only. Can be used to improve performance.
|
||||
|
||||
=item B<--force-counters32>
|
||||
|
||||
Force to use 32 bits counters (even in snmp v2c and v3). Should be used when 64 bits counters are buggy.
|
||||
|
||||
=item B<--reload-cache-time>
|
||||
|
||||
Time in minutes before reloading cache file (default: 180).
|
||||
|
||||
=item B<--oid-filter>
|
||||
|
||||
Choose OID used to filter interface (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr).
|
||||
|
||||
=item B<--oid-display>
|
||||
|
||||
Choose OID used to display interface (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr).
|
||||
|
||||
=item B<--oid-extra-display>
|
||||
|
||||
Add an OID to display.
|
||||
|
||||
=item B<--display-transform-src>
|
||||
|
||||
Regexp src to transform display value.
|
||||
|
||||
=item B<--display-transform-dst>
|
||||
|
||||
Regexp dst to transform display value.
|
||||
|
||||
=item B<--show-cache>
|
||||
|
||||
Display cache interface data.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::interfaces;
|
||||
|
||||
use base qw(snmp_standard::mode::interfaces);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check interfaces.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--add-global>
|
||||
|
||||
Check global port statistics (By default if no --add-* option is set).
|
||||
|
||||
=item B<--add-status>
|
||||
|
||||
Check interface status.
|
||||
|
||||
=item B<--add-duplex-status>
|
||||
|
||||
Check duplex status (with --warning-status and --critical-status).
|
||||
|
||||
=item B<--add-traffic>
|
||||
|
||||
Check interface traffic.
|
||||
|
||||
=item B<--add-errors>
|
||||
|
||||
Check interface errors.
|
||||
|
||||
=item B<--add-cast>
|
||||
|
||||
Check interface cast.
|
||||
|
||||
=item B<--add-speed>
|
||||
|
||||
Check interface speed.
|
||||
|
||||
=item B<--add-volume>
|
||||
|
||||
Check interface data volume between two checks (not supposed to be graphed, useful for BI reporting).
|
||||
|
||||
=item B<--check-metrics>
|
||||
|
||||
If the expression is true, metrics are checked (Default: '%{opstatus} eq "up"').
|
||||
|
||||
=item B<--warning-status>
|
||||
|
||||
Set warning threshold for status.
|
||||
You can use the following variables: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
|
||||
|
||||
=item B<--critical-status>
|
||||
|
||||
Set critical threshold for status (Default: '%{admstatus} eq "up" and %{opstatus} ne "up"').
|
||||
You can use the following variables: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'total-port', 'total-admin-up', 'total-admin-down', 'total-oper-up', 'total-oper-down',
|
||||
'in-traffic', 'out-traffic', 'in-error', 'in-discard', 'out-error', 'out-discard',
|
||||
'in-ucast', 'in-bcast', 'in-mcast', 'out-ucast', 'out-bcast', 'out-mcast',
|
||||
'speed' (b/s).
|
||||
|
||||
=item B<--units-traffic>
|
||||
|
||||
Units of thresholds for the traffic (Default: 'percent_delta') ('percent_delta', 'bps', 'counter').
|
||||
|
||||
=item B<--units-errors>
|
||||
|
||||
Units of thresholds for errors/discards (Default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'deltaps', 'counter').
|
||||
|
||||
=item B<--units-cast>
|
||||
|
||||
Units of thresholds for communication types (Default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'deltaps', 'counter').
|
||||
|
||||
=item B<--nagvis-perfdata>
|
||||
|
||||
Display traffic perfdata to be compatible with NagVis widget.
|
||||
|
||||
=item B<--interface>
|
||||
|
||||
Set the interface (number expected) ex: 1,2,... (empty means 'check all interface').
|
||||
|
||||
=item B<--name>
|
||||
|
||||
Allows to use interface name with option --interface instead of interface OID index (Can be a regexp)
|
||||
|
||||
=item B<--speed>
|
||||
|
||||
Set interface speed for incoming/outgoing traffic (in Mb).
|
||||
|
||||
=item B<--speed-in>
|
||||
|
||||
Set interface speed for incoming traffic (in Mb).
|
||||
|
||||
=item B<--speed-out>
|
||||
|
||||
Set interface speed for outgoing traffic (in Mb).
|
||||
|
||||
=item B<--map-speed-dsl>
|
||||
|
||||
Get interface speed configuration for interface type 'ADSL' and 'VDSL2'.
|
||||
|
||||
Syntax: --map-speed-dsl=interface-src-name,interface-dsl-name
|
||||
|
||||
E.g: --map-speed-dsl=Et0.835,Et0-vdsl2
|
||||
|
||||
=item B<--force-counters64>
|
||||
|
||||
Force to use 64 bits counters only. Can be used to improve performance.
|
||||
|
||||
=item B<--force-counters32>
|
||||
|
||||
Force to use 32 bits counters (even in SNMP version 2c and version 3). Should be used when 64 bits counters are buggy.
|
||||
|
||||
=item B<--reload-cache-time>
|
||||
|
||||
Time in minutes before reloading cache file (default: 180).
|
||||
|
||||
=item B<--oid-filter>
|
||||
|
||||
Choose OID used to filter interface (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr).
|
||||
|
||||
=item B<--oid-display>
|
||||
|
||||
Choose OID used to display interface (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr).
|
||||
|
||||
=item B<--oid-extra-display>
|
||||
|
||||
Add an OID to display.
|
||||
|
||||
=item B<--display-transform-src> B<--display-transform-dst>
|
||||
|
||||
Modify the interface name displayed by using a regular expression.
|
||||
|
||||
Example: adding --display-transform-src='eth' --display-transform-dst='ens' will replace all occurrences of 'eth' with 'ens'
|
||||
|
||||
=item B<--show-cache>
|
||||
|
||||
Display cache interface data.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::listcellsradio;
|
||||
|
||||
use base qw(centreon::plugins::mode);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
});
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub check_options {
|
||||
my ($self, %options) = @_;
|
||||
$self->SUPER::init(%options);
|
||||
}
|
||||
|
||||
my $mapping = {
|
||||
imei => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.5' }, # teldatCellularInfoInterfaceModuleIMEI : Cellular module IMEI.
|
||||
imsi => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.6' }, # teldatCellularInfoInterfaceModuleIMSI : Cellular module IMSI.
|
||||
simIcc => { oid => '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1.8' } # teldatCellularInfoInterfaceSIMIcc : Cellular active SIM ICC.
|
||||
};
|
||||
my $oid_teldatCellularInfoInterfaceEntry = '.1.3.6.1.4.1.2007.4.1.2.2.2.18.1.1'; # teldatInfoInterfaceTable
|
||||
|
||||
my $interface_types = {
|
||||
1 => 'control vocal',
|
||||
2 => 'data primary',
|
||||
3 => 'data auxiliary'
|
||||
};
|
||||
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $snmp_result = $options{snmp}->get_table(
|
||||
oid => $oid_teldatCellularInfoInterfaceEntry,
|
||||
start => $mapping->{imei}->{oid},
|
||||
end => $mapping->{simIcc}->{oid},
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
my $results = {};
|
||||
my $modules = {};
|
||||
my $module_num = 0;
|
||||
my $interface_type = 0;
|
||||
foreach my $oid ($options{snmp}->oid_lex_sort(keys %$snmp_result)) {
|
||||
next if ($oid !~ /^$mapping->{imei}->{oid}\.(.*)$/);
|
||||
my $instance = $1;
|
||||
|
||||
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $instance);
|
||||
next if ($result->{imei} !~ /^[0-9]+$/);
|
||||
|
||||
if (!defined($modules->{$module_num}) || $result->{imei} ne $modules->{$module_num}) {
|
||||
$module_num++;
|
||||
$interface_type = 0;
|
||||
$modules->{$module_num} = $result->{imei};
|
||||
}
|
||||
if (defined($modules->{$module_num})) {
|
||||
$interface_type++;
|
||||
}
|
||||
|
||||
my $module = 'module' . $module_num;
|
||||
|
||||
$results->{$instance} = {
|
||||
module => $module,
|
||||
moduleNum => $module_num,
|
||||
interfaceType => $interface_types->{$interface_type},
|
||||
imei => $result->{imei},
|
||||
imsi => $result->{imsi},
|
||||
simIcc => $result->{simIcc}
|
||||
};
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
sub run {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $results = $self->manage_selection(snmp => $options{snmp});
|
||||
foreach my $name (sort keys %$results) {
|
||||
$self->{output}->output_add(long_msg =>
|
||||
'[module = ' . $results->{$name}->{module} . ']' .
|
||||
'[moduleNum = ' . $results->{$name}->{moduleNum} . ']' .
|
||||
'[interfaceType = ' . $results->{$name}->{interfaceType} . ']' .
|
||||
join('', map("[$_ = " . $results->{$name}->{$_} . ']', keys(%$mapping)))
|
||||
);
|
||||
}
|
||||
|
||||
$self->{output}->output_add(
|
||||
severity => 'OK',
|
||||
short_msg => 'List cellular radio interfaces:'
|
||||
);
|
||||
$self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
|
||||
$self->{output}->exit();
|
||||
}
|
||||
|
||||
sub disco_format {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{output}->add_disco_format(elements => ['module', 'moduleNum', 'interfaceType', keys %$mapping]);
|
||||
}
|
||||
|
||||
sub disco_show {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $results = $self->manage_selection(snmp => $options{snmp});
|
||||
foreach (sort keys %$results) {
|
||||
$self->{output}->add_disco_entry(
|
||||
%{$results->{$_}}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
List cellular radio interfaces.
|
||||
|
||||
=over 8
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
|
@ -1,128 +1,128 @@
|
|||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::memory;
|
||||
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub custom_usage_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
'total: %s %s used: %s %s (%.2f%%) free: %s %s (%.2f%%)',
|
||||
$self->{perfdata}->change_bytes(value => $self->{result_values}->{total}),
|
||||
$self->{perfdata}->change_bytes(value => $self->{result_values}->{used}),
|
||||
$self->{result_values}->{prct_used},
|
||||
$self->{perfdata}->change_bytes(value => $self->{result_values}->{free}),
|
||||
$self->{result_values}->{prct_free}
|
||||
);
|
||||
}
|
||||
|
||||
sub prefix_memory_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return "Memory '" . $options{instance} . "' ";
|
||||
}
|
||||
|
||||
sub set_counters {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'memory', type => 1, cb_prefix_output => 'prefix_memory_output', message_multiple => 'All memory usages are ok', skipped_code => { -10 => 1 } }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{memory} = [
|
||||
{ label => 'usage', nlabel => 'memory.usage.bytes', set => {
|
||||
key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ],
|
||||
closure_custom_output => $self->can('custom_usage_output'),
|
||||
perfdatas => [
|
||||
{ template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'usage-free', display_ok => 0, nlabel => 'memory.free.bytes', display_ok => 0, set => {
|
||||
key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ],
|
||||
closure_custom_output => $self->can('custom_usage_output'),
|
||||
perfdatas => [
|
||||
{ template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'usage-prct', nlabel => 'memory.usage.percentage', display_ok => 0, set => {
|
||||
key_values => [ { name => 'prct_used' }, { name => 'used' }, { name => 'free' }, { name => 'prct_free' }, { name => 'total' } ],
|
||||
closure_custom_output => $self->can('custom_usage_output'),
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $oid_total = '.1.3.6.1.4.1.2007.4.1.2.1.1.26.0'; # telProdNpMonSistemMemTotal
|
||||
my $oid_free = '.1.3.6.1.4.1.2007.4.1.2.1.1.30.0'; # telProdNpMonSistemMemFreenoncache
|
||||
my $snmp_result = $options{snmp}->get_leef(
|
||||
oids => [$oid_total, $oid_free],
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
$self->{memory}->{system} = {
|
||||
used => $snmp_result->{$oid_total} - $snmp_result->{$oid_free},
|
||||
free => $snmp_result->{$oid_free},
|
||||
prct_used => ($snmp_result->{$oid_total} - $snmp_result->{$oid_free}) * 100 / $snmp_result->{$oid_total},
|
||||
prct_free => $snmp_result->{$oid_free} * 100 / $snmp_result->{$oid_total},
|
||||
total => $snmp_result->{$oid_total}
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check memory.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'usage' (B), 'usage-free' (B), 'usage-prct' (%).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::memory;
|
||||
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub custom_usage_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return sprintf(
|
||||
'total: %s %s used: %s %s (%.2f%%) free: %s %s (%.2f%%)',
|
||||
$self->{perfdata}->change_bytes(value => $self->{result_values}->{total}),
|
||||
$self->{perfdata}->change_bytes(value => $self->{result_values}->{used}),
|
||||
$self->{result_values}->{prct_used},
|
||||
$self->{perfdata}->change_bytes(value => $self->{result_values}->{free}),
|
||||
$self->{result_values}->{prct_free}
|
||||
);
|
||||
}
|
||||
|
||||
sub prefix_memory_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return "Memory '" . $options{instance} . "' ";
|
||||
}
|
||||
|
||||
sub set_counters {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'memory', type => 1, cb_prefix_output => 'prefix_memory_output', message_multiple => 'All memory usages are ok', skipped_code => { -10 => 1 } }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{memory} = [
|
||||
{ label => 'usage', nlabel => 'memory.usage.bytes', set => {
|
||||
key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ],
|
||||
closure_custom_output => $self->can('custom_usage_output'),
|
||||
perfdatas => [
|
||||
{ template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'usage-free', display_ok => 0, nlabel => 'memory.free.bytes', display_ok => 0, set => {
|
||||
key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ],
|
||||
closure_custom_output => $self->can('custom_usage_output'),
|
||||
perfdatas => [
|
||||
{ template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
{ label => 'usage-prct', nlabel => 'memory.usage.percentage', display_ok => 0, set => {
|
||||
key_values => [ { name => 'prct_used' }, { name => 'used' }, { name => 'free' }, { name => 'prct_free' }, { name => 'total' } ],
|
||||
closure_custom_output => $self->can('custom_usage_output'),
|
||||
perfdatas => [
|
||||
{ template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1 }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
my $oid_total = '.1.3.6.1.4.1.2007.4.1.2.1.1.26.0'; # telProdNpMonSistemMemTotal
|
||||
my $oid_free = '.1.3.6.1.4.1.2007.4.1.2.1.1.30.0'; # telProdNpMonSistemMemFreenoncache
|
||||
my $snmp_result = $options{snmp}->get_leef(
|
||||
oids => [$oid_total, $oid_free],
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
$self->{memory}->{system} = {
|
||||
used => $snmp_result->{$oid_total} - $snmp_result->{$oid_free},
|
||||
free => $snmp_result->{$oid_free},
|
||||
prct_used => ($snmp_result->{$oid_total} - $snmp_result->{$oid_free}) * 100 / $snmp_result->{$oid_total},
|
||||
prct_free => $snmp_result->{$oid_free} * 100 / $snmp_result->{$oid_total},
|
||||
total => $snmp_result->{$oid_total}
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check memory.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--warning-*> B<--critical-*>
|
||||
|
||||
Thresholds.
|
||||
Can be: 'usage' (B), 'usage-free' (B), 'usage-prct' (%).
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
|
|
@ -1,77 +1,77 @@
|
|||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::uptime;
|
||||
|
||||
use base qw(snmp_standard::mode::uptime);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check system uptime.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--warning-uptime>
|
||||
|
||||
Threshold warning.
|
||||
|
||||
=item B<--critical-uptime>
|
||||
|
||||
Threshold critical.
|
||||
|
||||
=item B<--add-sysdesc>
|
||||
|
||||
Display system description.
|
||||
|
||||
=item B<--force-oid>
|
||||
|
||||
Can choose your oid (numeric format only).
|
||||
|
||||
=item B<--check-overload>
|
||||
|
||||
Uptime counter limit is 4294967296 and overflow.
|
||||
With that option, we manage the counter going back. But there is a few chance we can miss a reboot.
|
||||
|
||||
=item B<--reboot-window>
|
||||
|
||||
To be used with check-overload option. Time in milliseconds (Default: 5000)
|
||||
You increase the chance of not missing a reboot if you decrease that value.
|
||||
|
||||
=item B<--unit>
|
||||
|
||||
Select the unit for performance data and thresholds. May be 's' for seconds, 'm' for minutes,
|
||||
'h' for hours, 'd' for days, 'w' for weeks. Default is seconds
|
||||
|
||||
=back
|
||||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::mode::uptime;
|
||||
|
||||
use base qw(snmp_standard::mode::uptime);
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check system uptime.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--warning-uptime>
|
||||
|
||||
Threshold warning.
|
||||
|
||||
=item B<--critical-uptime>
|
||||
|
||||
Threshold critical.
|
||||
|
||||
=item B<--add-sysdesc>
|
||||
|
||||
Display system description.
|
||||
|
||||
=item B<--force-oid>
|
||||
|
||||
Can choose your OID (numeric format only).
|
||||
|
||||
=item B<--check-overload>
|
||||
|
||||
Uptime counter limit is 4294967296 and overflow.
|
||||
With that option, we manage the counter going back. But there is a few chance we can miss a reboot.
|
||||
|
||||
=item B<--reboot-window>
|
||||
|
||||
To be used with check-overload option. Time in milliseconds (Default: 5000)
|
||||
You increase the chance of not missing a reboot if you decrease that value.
|
||||
|
||||
=item B<--unit>
|
||||
|
||||
Select the unit for performance data and thresholds. May be 's' for seconds, 'm' for minutes,
|
||||
'h' for hours, 'd' for days, 'w' for weeks. Default is seconds
|
||||
|
||||
=back
|
||||
|
|
|
@ -1,52 +1,53 @@
|
|||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::plugin;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use base qw(centreon::plugins::script_snmp);
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
|
||||
$self->{modes} = {
|
||||
'cells-radio' => 'network::teldat::snmp::mode::cellsradio',
|
||||
'cpu' => 'network::teldat::snmp::mode::cpu',
|
||||
'interfaces' => 'network::teldat::snmp::mode::interfaces',
|
||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||
'memory' => 'network::teldat::snmp::mode::memory',
|
||||
'uptime' => 'network::teldat::snmp::mode::uptime'
|
||||
};
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 PLUGIN DESCRIPTION
|
||||
|
||||
Check Teldat equipments in SNMP.
|
||||
|
||||
=cut
|
||||
#
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package network::teldat::snmp::plugin;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use base qw(centreon::plugins::script_snmp);
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
|
||||
$self->{modes} = {
|
||||
'cells-radio' => 'network::teldat::snmp::mode::cellsradio',
|
||||
'cpu' => 'network::teldat::snmp::mode::cpu',
|
||||
'interfaces' => 'network::teldat::snmp::mode::interfaces',
|
||||
'list-cells-radio' => 'network::teldat::snmp::mode::listcellsradio',
|
||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||
'memory' => 'network::teldat::snmp::mode::memory',
|
||||
'uptime' => 'network::teldat::snmp::mode::uptime'
|
||||
};
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 PLUGIN DESCRIPTION
|
||||
|
||||
Check Teldat equipments in SNMP.
|
||||
|
||||
=cut
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
--dyn-mode
|
||||
--exclude-fs
|
||||
--filter-fs
|
||||
--filter-imei
|
||||
--filter-vdom
|
||||
--filter-vm
|
||||
--force-counters32
|
||||
|
@ -49,18 +50,28 @@ ASAM
|
|||
Alcatel
|
||||
Avigilon
|
||||
Centreon
|
||||
cpu-utilization-1m
|
||||
cpu-utilization-5m
|
||||
cpu-utilization-5s
|
||||
Datacore
|
||||
Fortigate
|
||||
Fortinet
|
||||
HashiCorp
|
||||
ISAM
|
||||
IMEI
|
||||
IpAddr
|
||||
ISAM
|
||||
Iwsva
|
||||
Loggly
|
||||
MBean
|
||||
MIB
|
||||
MQTT
|
||||
Meraki
|
||||
module-cellradio-rscp
|
||||
module-cellradio-csq
|
||||
module-cellradio-rsrp
|
||||
module-cellradio-rsrq
|
||||
module-cellradio-snr
|
||||
modules-cellradio-detected
|
||||
Mosquitto
|
||||
NTLMv2
|
||||
NagVis
|
||||
|
@ -116,6 +127,7 @@ queue-messages-inflighted
|
|||
sfp.temperature
|
||||
space-usage-prct
|
||||
teampass
|
||||
Teldat
|
||||
timeframe
|
||||
topic-messages-inflighted
|
||||
total-offline-prct
|
||||
|
@ -123,6 +135,7 @@ total-online-prct
|
|||
total-oper-down
|
||||
total-oper-up
|
||||
uptime
|
||||
usage-prct
|
||||
userpass
|
||||
v1
|
||||
v2
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
*** Settings ***
|
||||
Documentation Network Teldat SNMP plugin
|
||||
|
||||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
|
||||
|
||||
Test Timeout 120s
|
||||
|
||||
|
||||
*** Variables ***
|
||||
${CMD} ${CENTREON_PLUGINS} --plugin=network::teldat::snmp::plugin
|
||||
|
||||
|
||||
*** Test Cases ***
|
||||
Cells radio ${tc}
|
||||
[Tags] network teldat snmp
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode=cells-radio
|
||||
... --hostname=127.0.0.1
|
||||
... --snmp-version=2c
|
||||
... --snmp-port=2024
|
||||
... --snmp-community=network/teldat/snmp/teldat
|
||||
... --custom-perfdata-instances=${customperfdatainstances}
|
||||
... --critical-status=${criticalstatus}
|
||||
... --warning-modules-cellradio-detected=${warningmodulescellradiodetected}
|
||||
... --critical-modules-cellradio-detected=${criticalmodulescellradiodetected}
|
||||
... --warning-module-cellradio-rsrp=${warningmodulecellradiorsrp}
|
||||
... --critical-module-cellradio-rsrp=${criticalmodulecellradiorsrp}
|
||||
... --warning-module-cellradio-rsrq=${warningmodulecellradiorsrq}
|
||||
... --critical-module-cellradio-rsrq=${criticalmodulecellradiorsrq}
|
||||
... --warning-module-cellradio-csq=${warningmodulecellradiocsq}
|
||||
... --critical-module-cellradio-csq=${criticalmodulecellradiocsq}
|
||||
... --warning-module-cellradio-snr=${warningmodulecellradiosnr}
|
||||
... --critical-module-cellradio-snr=${criticalmodulecellradiosnr}
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${result}
|
||||
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${result}\n
|
||||
... values=False
|
||||
... collapse_spaces=True
|
||||
|
||||
|
||||
Examples: tc customperfdatainstances criticalstatus warningmodulescellradiodetected criticalmodulescellradiodetected warningmodulecellradiorsrp criticalmodulecellradiorsrp warningmodulecellradiorsrq criticalmodulecellradiorsrq warningmodulecellradiocsq criticalmodulecellradiocsq warningmodulecellradiosnr criticalmodulecellradiosnr result --
|
||||
... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: All cellular radio interfaces are ok | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 4 '%(operator) %(simIcc)' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: All cellular radio interfaces are ok | 'modules.cellradio.detected.count'=3;;;0; '---~89330122115801091660#module.cellradio.rsrp.dbm'=-114;;;0; '---~89330122115801091660#module.cellradio.rsrq.dbm'=-18;;;0; '---~89330122115801091660#module.cellradio.snr.db'=-1;;;0; '---~89330122115801091660#module.cellradio.csq.dbm'=-73;;;0; 'PHENIX~89330122115801091660#module.cellradio.rsrp.dbm'=-114;;;0; 'PHENIX~89330122115801091660#module.cellradio.rsrq.dbm'=-18;;;0; 'PHENIX~89330122115801091660#module.cellradio.snr.db'=-1;;;0; 'PHENIX~89330122115801091660#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 5 ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Number of cellular radio interfacesdetected: 3 | 'modules.cellradio.detected.count'=3;0:2;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 6 ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: Number of cellular radio interfacesdetected: 3 | 'modules.cellradio.detected.count'=3;;0:2;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 7 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} -100 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] rsrp: -114 dBm - cellular radio module '1' interface 'data primary' [imei: 359072066403821] rsrp: -114 dBm | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;0:-100;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;0:-100;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 8 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} -100 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] rsrp: -114 dBm - cellular radio module '1' interface 'data primary' [imei: 359072066403821] rsrp: -114 dBm | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;0:-100;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;0:-100;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 9 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 10 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] rsrq: -18 dBm - cellular radio module '1' interface 'data primary' [imei: 359072066403821] rsrq: -18 dBm | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;0:10;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;0:10;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 10 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 10 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] rsrq: -18 dBm - cellular radio module '1' interface 'data primary' [imei: 359072066403821] rsrq: -18 dBm | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;0:10;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;0:10;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 11 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 10 ${EMPTY} ${EMPTY} ${EMPTY} WARNING: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] csq: -73 dBm - cellular radio module '1' interface 'data primary' [imei: 359072066403821] csq: -73 dBm | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;0:10;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;0:10;;0;
|
||||
... 12 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 10 ${EMPTY} ${EMPTY} CRITICAL: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] csq: -73 dBm - cellular radio module '1' interface 'data primary' [imei: 359072066403821] csq: -73 dBm | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;0:10;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;0:10;0;
|
||||
... 13 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} WARNING: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] snr: -1 dB - cellular radio module '1' interface 'data primary' [imei: 359072066403821] snr: -1 dB | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;0:0;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;0:0;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 14 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 CRITICAL: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] snr: -1 dB - cellular radio module '1' interface 'data primary' [imei: 359072066403821] snr: -1 dB | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;0:0;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;0:0;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
||||
... 15 ${EMPTY} '\\\%{interfaceState} =~ /disconnect/' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: cellular radio module '1' interface 'control vocal' [imei: 359072066403821] sim status: OK [operator: ---] [imsi: 208015606540916] [interface state: disconnect(1)] [simIcc: 89330122115801091660] - cellular radio module '1' interface 'data auxiliary' [imei: 359072066403821] sim status: DETECTING [operator: ---] [imsi: 208015606540916] [interface state: disconnect(1)] [simIcc: 89330122115801091660] | 'modules.cellradio.detected.count'=3;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~control vocal~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~control vocal~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~control vocal~359072066403821#module.cellradio.csq.dbm'=-73;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrp.dbm'=-114;;;0; 'module1~data primary~359072066403821#module.cellradio.rsrq.dbm'=-18;;;0; 'module1~data primary~359072066403821#module.cellradio.snr.db'=-1;;;0; 'module1~data primary~359072066403821#module.cellradio.csq.dbm'=-73;;;0;
|
|
@ -9,338 +9,6 @@ Test Timeout 120s
|
|||
*** Variables ***
|
||||
${CMD} ${CENTREON_PLUGINS} --plugin=network::teldat::snmp::plugin
|
||||
|
||||
# Test simple usage of the cellsradio mode
|
||||
&{teldat_cellsradio_test1}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with filter-cell-id option set to a fake value
|
||||
&{teldat_cellsradio_test2}
|
||||
... filtercellid=toto
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=UNKNOWN: No Cell ID found matching with filter : toto
|
||||
|
||||
# Test cellsradio mode with filter-cell-id option set to a imei value
|
||||
&{teldat_cellsradio_test3}
|
||||
... filtercellid='359072066403821'
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with custom-perfdata-instances option set to '%(cellId) %(simIcc)'
|
||||
&{teldat_cellsradio_test4}
|
||||
... filtercellid=
|
||||
... customperfdatainstances='%(cellId) %(simIcc)'
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~89330122115801091660#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~89330122115801091660#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~89330122115801091660#module.cellradio.snr.db'=-1;;;0; '359072066403821~89330122115801091660#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~89330122115801091660#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~89330122115801091660#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~89330122115801091660#module.cellradio.snr.db'=-1;;;0; '359072066403821~89330122115801091660#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with warning-modules-cellradio-detected option set to a 2
|
||||
&{teldat_cellsradio_test5}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=2
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: Number of cellular radio modules detected: 3 - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;0:2;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with critical-modules-cellradio-detected option set to a 2
|
||||
&{teldat_cellsradio_test6}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=2
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: Number of cellular radio modules detected: 3 - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;0:2;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with warning-module-cellradio-rsrp option set to a -100
|
||||
&{teldat_cellsradio_test7}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=-100
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] - rsrp: -114 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] rsrp: -114 dBm | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;0:-100;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;0:-100;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with critical-module-cellradio-rsrp option set to a -100
|
||||
&{teldat_cellsradio_test8}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=-100
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] rsrp: -114 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - rsrp: -114 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;0:-100;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;0:-100;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with warning-module-cellradio-rsrq option set to a -10
|
||||
&{teldat_cellsradio_test9}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=-10
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] - rsrq: -18 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] rsrq: -18 dBm | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;0:-10;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;0:-10;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with critical-module-cellradio-rsrq option set to a -10
|
||||
&{teldat_cellsradio_test10}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=-10
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] rsrq: -18 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - rsrq: -18 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;0:-10;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;0:-10;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with warning-module-cellradio-csq option set to a -10
|
||||
&{teldat_cellsradio_test11}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=-10
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] - csq: -73 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] csq: -73 dBm | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;0:-10;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;0:-10;;0;
|
||||
|
||||
# Test cellsradio mode with critical-module-cellradio-csq option set to a -10
|
||||
&{teldat_cellsradio_test12}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=-10
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] csq: -73 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - csq: -73 dBm - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;0:-10;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;0:-10;0;
|
||||
|
||||
# Test cellsradio mode with warning-module-cellradio-snr option set to a 0
|
||||
&{teldat_cellsradio_test13}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=0
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] - snr: -1 dB - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] snr: -1 dB | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;0:0;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;0:0;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with critical-module-cellradio-snr option set to a 0
|
||||
&{teldat_cellsradio_test14}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus=
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=0
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] snr: -1 dB - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: PHENIX] sim status: LOCKED [imsi: 208015606540916] [interface state: connect(9)] - snr: -1 dB - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] WARNING: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;0:0;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;0:0;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
# Test cellsradio mode with critical-status option set to '%{interfaceState} =~ /disconnect/'
|
||||
&{teldat_cellsradio_test15}
|
||||
... filtercellid=
|
||||
... customperfdatainstances=
|
||||
... unknownstatus=
|
||||
... warningstatus=
|
||||
... criticalstatus='\%{interfaceState} =~ /disconnect/'
|
||||
... warningmodulescellradiodetected=
|
||||
... criticalmodulescellradiodetected=
|
||||
... warningmodulecellradiorsrp=
|
||||
... criticalmodulecellradiorsrp=
|
||||
... warningmodulecellradiorsrq=
|
||||
... criticalmodulecellradiorsrq=
|
||||
... warningmodulecellradiorscp=
|
||||
... criticalmodulecellradiorscp=
|
||||
... warningmodulecellradiocsq=
|
||||
... criticalmodulecellradiocsq=
|
||||
... warningmodulecellradiosnr=
|
||||
... criticalmodulecellradiosnr=
|
||||
... result=CRITICAL: cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: OK [imsi: 208015606540916] [interface state: disconnect(1)] - cellular radio module '359072066403821' [sim icc: 89330122115801091660, operator: N/A] sim status: DETECTING [imsi: 208015606540916] [interface state: disconnect(1)] | 'modules.cellradio.detected.count'=3;;;0; '359072066403821~N/A#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~N/A#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~N/A#module.cellradio.snr.db'=-1;;;0; '359072066403821~N/A#module.cellradio.csq.dbm'=-73;;;0; '359072066403821~PHENIX#module.cellradio.rsrp.dbm'=-114;;;0; '359072066403821~PHENIX#module.cellradio.rsrq.dbm'=-18;;;0; '359072066403821~PHENIX#module.cellradio.snr.db'=-1;;;0; '359072066403821~PHENIX#module.cellradio.csq.dbm'=-73;;;0;
|
||||
|
||||
@{teldat_cellsradio_tests}
|
||||
... &{teldat_cellsradio_test1}
|
||||
... &{teldat_cellsradio_test2}
|
||||
... &{teldat_cellsradio_test3}
|
||||
... &{teldat_cellsradio_test4}
|
||||
... &{teldat_cellsradio_test5}
|
||||
... &{teldat_cellsradio_test6}
|
||||
... &{teldat_cellsradio_test7}
|
||||
... &{teldat_cellsradio_test8}
|
||||
... &{teldat_cellsradio_test9}
|
||||
... &{teldat_cellsradio_test10}
|
||||
... &{teldat_cellsradio_test11}
|
||||
... &{teldat_cellsradio_test12}
|
||||
... &{teldat_cellsradio_test13}
|
||||
... &{teldat_cellsradio_test14}
|
||||
... &{teldat_cellsradio_test15}
|
||||
|
||||
# Test simple usage of the CPU mode
|
||||
&{teldat_cpu_test1}
|
||||
... warningcpuutilization5s=
|
||||
|
@ -501,120 +169,6 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=network::teldat::sn
|
|||
|
||||
|
||||
*** Test Cases ***
|
||||
Network Teldat SNMP cells radio
|
||||
[Documentation] Network Teldat SNMP cells radio
|
||||
[Tags] network teldat snmp
|
||||
FOR ${teldat_cellsradio_test} IN @{teldat_cellsradio_tests}
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode=cells-radio
|
||||
... --hostname=127.0.0.1
|
||||
... --snmp-version=2c
|
||||
... --snmp-port=2024
|
||||
... --snmp-community=network/teldat/snmp/teldat
|
||||
${length} Get Length ${teldat_cellsradio_test.filtercellid}
|
||||
IF ${length} > 0
|
||||
${command} Catenate ${command} --filter-cell-id=${teldat_cellsradio_test.filtercellid}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.customperfdatainstances}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --custom-perfdata-instances=${teldat_cellsradio_test.customperfdatainstances}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.unknownstatus}
|
||||
IF ${length} > 0
|
||||
${command} Catenate ${command} --unknown-status=${teldat_cellsradio_test.unknownstatus}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.warningstatus}
|
||||
IF ${length} > 0
|
||||
${command} Catenate ${command} --warning-status=${teldat_cellsradio_test.warningstatus}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.criticalstatus}
|
||||
IF ${length} > 0
|
||||
${command} Catenate ${command} --critical-status=${teldat_cellsradio_test.criticalstatus}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.warningmodulescellradiodetected}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --warning-modules-cellradio-detected=${teldat_cellsradio_test.warningmodulescellradiodetected}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.criticalmodulescellradiodetected}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --critical-modules-cellradio-detected=${teldat_cellsradio_test.criticalmodulescellradiodetected}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.warningmodulecellradiorsrp}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --warning-module-cellradio-rsrp=${teldat_cellsradio_test.warningmodulecellradiorsrp}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.criticalmodulecellradiorsrp}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --critical-module-cellradio-rsrp=${teldat_cellsradio_test.criticalmodulecellradiorsrp}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.warningmodulecellradiorsrq}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --warning-module-cellradio-rsrq=${teldat_cellsradio_test.warningmodulecellradiorsrq}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.criticalmodulecellradiorsrq}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --critical-module-cellradio-rsrq=${teldat_cellsradio_test.criticalmodulecellradiorsrq}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.warningmodulecellradiorscp}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --warning-module-cellradio-rscp=${teldat_cellsradio_test.warningmodulecellradiorscp}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.criticalmodulecellradiorscp}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --critical-module-cellradio-rscp=${teldat_cellsradio_test.criticalmodulecellradiorscp}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.warningmodulecellradiocsq}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --warning-module-cellradio-csq=${teldat_cellsradio_test.warningmodulecellradiocsq}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.criticalmodulecellradiocsq}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --critical-module-cellradio-csq=${teldat_cellsradio_test.criticalmodulecellradiocsq}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.warningmodulecellradiosnr}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --warning-module-cellradio-snr=${teldat_cellsradio_test.warningmodulecellradiosnr}
|
||||
END
|
||||
${length} Get Length ${teldat_cellsradio_test.criticalmodulecellradiosnr}
|
||||
IF ${length} > 0
|
||||
${command} Catenate
|
||||
... ${command}
|
||||
... --critical-module-cellradio-snr=${teldat_cellsradio_test.criticalmodulecellradiosnr}
|
||||
END
|
||||
${output} Run ${command}
|
||||
Log To Console . no_newline=true
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${teldat_cellsradio_test.result}
|
||||
... Wrong result output for:${\n}Command: ${\n}${command}${\n}${\n}Expected output: ${\n}${teldat_cellsradio_test.result}${\n}${\n}Obtained output:${\n}${output}${\n}${\n}${\n}
|
||||
... values=False
|
||||
END
|
||||
|
||||
Network Teldat SNMP CPU
|
||||
[Documentation] Network Teldat SNMP CPU
|
||||
|
|
Loading…
Reference in New Issue