[CTOR-46] [Plugin] Add Pack Teldat SNMP (#4824)
This commit is contained in:
parent
dd3f3a3b36
commit
472ff03c5b
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"dependencies": [
|
||||||
|
"libsnmp-perl"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"pkg_name": "centreon-plugin-Network-Teldat-Snmp",
|
||||||
|
"pkg_summary": "Centreon Plugin",
|
||||||
|
"plugin_name": "centreon_teldat_snmp.pl",
|
||||||
|
"files": [
|
||||||
|
"centreon/plugins/script_snmp.pm",
|
||||||
|
"centreon/plugins/snmp.pm",
|
||||||
|
"snmp_standard/mode/interfaces.pm",
|
||||||
|
"snmp_standard/mode/listinterfaces.pm",
|
||||||
|
"snmp_standard/mode/uptime.pm",
|
||||||
|
"snmp_standard/mode/resources/",
|
||||||
|
"network/teldat/snmp/"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"dependencies": [
|
||||||
|
"perl(SNMP)"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,346 @@
|
||||||
|
#
|
||||||
|
# Copyright 2023 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
|
|
@ -0,0 +1,116 @@
|
||||||
|
#
|
||||||
|
# Copyright 2023 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.
|
||||||
|
|
||||||
|
=over 8
|
||||||
|
|
||||||
|
=item B<--warning-*> B<--critical-*>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
Can be: 'cpu-utilization-5s', 'cpu-utilization-1m', 'cpu-utilization-5m'.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
|
@ -0,0 +1,182 @@
|
||||||
|
#
|
||||||
|
# Copyright 2023 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 datas.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
|
@ -0,0 +1,128 @@
|
||||||
|
#
|
||||||
|
# Copyright 2023 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
|
|
@ -0,0 +1,77 @@
|
||||||
|
#
|
||||||
|
# Copyright 2023 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
|
|
@ -0,0 +1,52 @@
|
||||||
|
#
|
||||||
|
# Copyright 2023 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
|
|
@ -0,0 +1,722 @@
|
||||||
|
*** Settings ***
|
||||||
|
Documentation Network Teldat SNMP plugin
|
||||||
|
|
||||||
|
Library OperatingSystem
|
||||||
|
Library String
|
||||||
|
|
||||||
|
Test Timeout 120s
|
||||||
|
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${CENTREON_PLUGINS} ${CURDIR}${/}..${/}..${/}..${/}src${/}centreon_plugins.pl
|
||||||
|
|
||||||
|
${CMD} perl ${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=
|
||||||
|
... criticalcpuutilization5s=
|
||||||
|
... warningcpuutilization1m=
|
||||||
|
... criticalcpuutilization1m=
|
||||||
|
... warningcpuutilization5m=
|
||||||
|
... criticalcpuutilization5m=
|
||||||
|
... result=OK: cpu average usage: 1.00 % (5s), 1.00 % (1m), 1.00 % (5m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100
|
||||||
|
|
||||||
|
# Test CPU mode with warning-cpu-utilization-5s option set to a 0.5
|
||||||
|
&{teldat_cpu_test2}
|
||||||
|
... warningcpuutilization5s=0.5
|
||||||
|
... criticalcpuutilization5s=
|
||||||
|
... warningcpuutilization1m=
|
||||||
|
... criticalcpuutilization1m=
|
||||||
|
... warningcpuutilization5m=
|
||||||
|
... criticalcpuutilization5m=
|
||||||
|
... result=WARNING: cpu average usage: 1.00 % (5s) | 'cpu.utilization.5s.percentage'=1.00%;0:0.5;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100
|
||||||
|
|
||||||
|
# Test CPU mode with critical-cpu-utilization-5s option set to a 0.5
|
||||||
|
&{teldat_cpu_test3}
|
||||||
|
... warningcpuutilization5s=
|
||||||
|
... criticalcpuutilization5s=0.5
|
||||||
|
... warningcpuutilization1m=
|
||||||
|
... criticalcpuutilization1m=
|
||||||
|
... warningcpuutilization5m=
|
||||||
|
... criticalcpuutilization5m=
|
||||||
|
... result=CRITICAL: cpu average usage: 1.00 % (5s) | 'cpu.utilization.5s.percentage'=1.00%;;0:0.5;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100
|
||||||
|
|
||||||
|
# Test CPU mode with warning-cpu-utilization-1m option set to a 0.5
|
||||||
|
&{teldat_cpu_test4}
|
||||||
|
... warningcpuutilization5s=
|
||||||
|
... criticalcpuutilization5s=
|
||||||
|
... warningcpuutilization1m=0.5
|
||||||
|
... criticalcpuutilization1m=
|
||||||
|
... warningcpuutilization5m=
|
||||||
|
... criticalcpuutilization5m=
|
||||||
|
... result=WARNING: cpu average usage: 1.00 % (1m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;0:0.5;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100
|
||||||
|
|
||||||
|
# Test CPU mode with critical-cpu-utilization-1m option set to a 0.5
|
||||||
|
&{teldat_cpu_test5}
|
||||||
|
... warningcpuutilization5s=
|
||||||
|
... criticalcpuutilization5s=
|
||||||
|
... warningcpuutilization1m=
|
||||||
|
... criticalcpuutilization1m=0.5
|
||||||
|
... warningcpuutilization5m=
|
||||||
|
... criticalcpuutilization5m=
|
||||||
|
... result=CRITICAL: cpu average usage: 1.00 % (1m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;0:0.5;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100
|
||||||
|
|
||||||
|
# Test CPU mode with warning-cpu-utilization-5m option set to a 0.5
|
||||||
|
&{teldat_cpu_test6}
|
||||||
|
... warningcpuutilization5s=
|
||||||
|
... criticalcpuutilization5s=
|
||||||
|
... warningcpuutilization1m=
|
||||||
|
... criticalcpuutilization1m=
|
||||||
|
... warningcpuutilization5m=0.5
|
||||||
|
... criticalcpuutilization5m=
|
||||||
|
... result=WARNING: cpu average usage: 1.00 % (5m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;0:0.5;;0;100
|
||||||
|
|
||||||
|
# Test CPU mode with critical-cpu-utilization-5m option set to a 0.5
|
||||||
|
&{teldat_cpu_test7}
|
||||||
|
... warningcpuutilization5s=
|
||||||
|
... criticalcpuutilization5s=
|
||||||
|
... warningcpuutilization1m=
|
||||||
|
... criticalcpuutilization1m=
|
||||||
|
... warningcpuutilization5m=
|
||||||
|
... criticalcpuutilization5m=0.5
|
||||||
|
... result=CRITICAL: cpu average usage: 1.00 % (5m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;0:0.5;0;100
|
||||||
|
|
||||||
|
@{teldat_cpu_tests}
|
||||||
|
... &{teldat_cpu_test1}
|
||||||
|
... &{teldat_cpu_test2}
|
||||||
|
... &{teldat_cpu_test3}
|
||||||
|
... &{teldat_cpu_test4}
|
||||||
|
... &{teldat_cpu_test5}
|
||||||
|
... &{teldat_cpu_test6}
|
||||||
|
... &{teldat_cpu_test7}
|
||||||
|
|
||||||
|
# Test simple usage of the memory mode
|
||||||
|
&{teldat_memory_test1}
|
||||||
|
... warningusage=
|
||||||
|
... criticalusage=
|
||||||
|
... warningusagefree=
|
||||||
|
... criticalusagefree=
|
||||||
|
... warningusageprct=
|
||||||
|
... criticalusageprct=
|
||||||
|
... result=OK: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100
|
||||||
|
|
||||||
|
# Test memory mode with warning-usage option set to a 100
|
||||||
|
&{teldat_memory_test2}
|
||||||
|
... warningusage=100
|
||||||
|
... criticalusage=
|
||||||
|
... warningusagefree=
|
||||||
|
... criticalusagefree=
|
||||||
|
... warningusageprct=
|
||||||
|
... criticalusageprct=
|
||||||
|
... result=WARNING: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;0:100;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100
|
||||||
|
|
||||||
|
# Test memory mode with critical-usage option set to a 100
|
||||||
|
&{teldat_memory_test3}
|
||||||
|
... warningusage=
|
||||||
|
... criticalusage=100
|
||||||
|
... warningusagefree=
|
||||||
|
... criticalusagefree=
|
||||||
|
... warningusageprct=
|
||||||
|
... criticalusageprct=
|
||||||
|
... result=CRITICAL: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;0:100;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100
|
||||||
|
|
||||||
|
# Test memory mode with warning-usage-free option set to a 100
|
||||||
|
&{teldat_memory_test4}
|
||||||
|
... warningusage=
|
||||||
|
... criticalusage=
|
||||||
|
... warningusagefree=100
|
||||||
|
... criticalusagefree=
|
||||||
|
... warningusageprct=
|
||||||
|
... criticalusageprct=
|
||||||
|
... result=WARNING: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;0:100;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100
|
||||||
|
|
||||||
|
# Test memory mode with critical-usage-free option set to a 100
|
||||||
|
&{teldat_memory_test5}
|
||||||
|
... warningusage=
|
||||||
|
... criticalusage=
|
||||||
|
... warningusagefree=
|
||||||
|
... criticalusagefree=100
|
||||||
|
... warningusageprct=
|
||||||
|
... criticalusageprct=
|
||||||
|
... result=CRITICAL: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;0:100;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100
|
||||||
|
|
||||||
|
# Test memory mode with warning-usage-prct option set to a 30
|
||||||
|
&{teldat_memory_test6}
|
||||||
|
... warningusage=
|
||||||
|
... criticalusage=
|
||||||
|
... warningusagefree=
|
||||||
|
... criticalusagefree=
|
||||||
|
... warningusageprct=30
|
||||||
|
... criticalusageprct=
|
||||||
|
... result=WARNING: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;0:30;;0;100
|
||||||
|
|
||||||
|
# Test memory mode with critical-usage-prct option set to a 30
|
||||||
|
&{teldat_memory_test7}
|
||||||
|
... warningusage=
|
||||||
|
... criticalusage=
|
||||||
|
... warningusagefree=
|
||||||
|
... criticalusagefree=
|
||||||
|
... warningusageprct=
|
||||||
|
... criticalusageprct=30
|
||||||
|
... result=CRITICAL: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;0:30;0;100
|
||||||
|
|
||||||
|
@{teldat_memory_tests}
|
||||||
|
... &{teldat_memory_test1}
|
||||||
|
... &{teldat_memory_test2}
|
||||||
|
... &{teldat_memory_test3}
|
||||||
|
... &{teldat_memory_test4}
|
||||||
|
... &{teldat_memory_test5}
|
||||||
|
... &{teldat_memory_test6}
|
||||||
|
... &{teldat_memory_test7}
|
||||||
|
|
||||||
|
|
||||||
|
*** 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
|
||||||
|
${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
|
||||||
|
[Tags] network teldat snmp
|
||||||
|
FOR ${teldat_cpu_test} IN @{teldat_cpu_tests}
|
||||||
|
${command} Catenate
|
||||||
|
... ${CMD}
|
||||||
|
... --mode=cpu
|
||||||
|
... --hostname=127.0.0.1
|
||||||
|
... --snmp-version=2c
|
||||||
|
... --snmp-port=2024
|
||||||
|
... --snmp-community=network-teldat-snmp
|
||||||
|
${length} Get Length ${teldat_cpu_test.warningcpuutilization5s}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate
|
||||||
|
... ${command}
|
||||||
|
... --warning-cpu-utilization-5s=${teldat_cpu_test.warningcpuutilization5s}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_cpu_test.criticalcpuutilization5s}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate
|
||||||
|
... ${command}
|
||||||
|
... --critical-cpu-utilization-5s=${teldat_cpu_test.criticalcpuutilization5s}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_cpu_test.warningcpuutilization1m}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate
|
||||||
|
... ${command}
|
||||||
|
... --warning-cpu-utilization-1m=${teldat_cpu_test.warningcpuutilization1m}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_cpu_test.criticalcpuutilization1m}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate
|
||||||
|
... ${command}
|
||||||
|
... --critical-cpu-utilization-1m=${teldat_cpu_test.criticalcpuutilization1m}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_cpu_test.warningcpuutilization5m}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate
|
||||||
|
... ${command}
|
||||||
|
... --warning-cpu-utilization-5m=${teldat_cpu_test.warningcpuutilization5m}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_cpu_test.criticalcpuutilization5m}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate
|
||||||
|
... ${command}
|
||||||
|
... --critical-cpu-utilization-5m=${teldat_cpu_test.criticalcpuutilization5m}
|
||||||
|
END
|
||||||
|
${output} Run ${command}
|
||||||
|
Log To Console . no_newline=true
|
||||||
|
${output} Strip String ${output}
|
||||||
|
Should Be Equal As Strings
|
||||||
|
... ${output}
|
||||||
|
... ${teldat_cpu_test.result}
|
||||||
|
... Wrong result output for:${\n}Command: ${\n}${command}${\n}${\n}Expected output: ${\n}${teldat_cpu_test.result}${\n}${\n}Obtained output:${\n}${output}${\n}${\n}${\n}
|
||||||
|
... values=False
|
||||||
|
END
|
||||||
|
|
||||||
|
Network Teldat SNMP Memory
|
||||||
|
[Documentation] Network Teldat SNMP memory
|
||||||
|
[Tags] network teldat snmp
|
||||||
|
FOR ${teldat_memory_test} IN @{teldat_memory_tests}
|
||||||
|
${command} Catenate
|
||||||
|
... ${CMD}
|
||||||
|
... --mode=memory
|
||||||
|
... --hostname=127.0.0.1
|
||||||
|
... --snmp-version=2c
|
||||||
|
... --snmp-port=2024
|
||||||
|
... --snmp-community=network-teldat-snmp
|
||||||
|
${length} Get Length ${teldat_memory_test.warningusage}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate ${command} --warning-usage=${teldat_memory_test.warningusage}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_memory_test.criticalusage}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate ${command} --critical-usage=${teldat_memory_test.criticalusage}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_memory_test.warningusagefree}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate ${command} --warning-usage-free=${teldat_memory_test.warningusagefree}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_memory_test.criticalusagefree}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate ${command} --critical-usage-free=${teldat_memory_test.criticalusagefree}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_memory_test.warningusageprct}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate ${command} --warning-usage-prct=${teldat_memory_test.warningusageprct}
|
||||||
|
END
|
||||||
|
${length} Get Length ${teldat_memory_test.criticalusageprct}
|
||||||
|
IF ${length} > 0
|
||||||
|
${command} Catenate ${command} --critical-usage-prct=${teldat_memory_test.criticalusageprct}
|
||||||
|
END
|
||||||
|
${output} Run ${command}
|
||||||
|
Log To Console . no_newline=true
|
||||||
|
${output} Strip String ${output}
|
||||||
|
Should Be Equal As Strings
|
||||||
|
... ${output}
|
||||||
|
... ${teldat_memory_test.result}
|
||||||
|
... Wrong result output for:${\n}Command: ${\n}${command}${\n}${\n}Expected output: ${\n}${teldat_memory_test.result}${\n}${\n}Obtained output:${\n}${output}${\n}${\n}${\n}
|
||||||
|
... values=False
|
||||||
|
END
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue