diff --git a/.github/actions/package-nfpm/action.yml b/.github/actions/package-nfpm/action.yml index 515ce8644a..0406144b8a 100644 --- a/.github/actions/package-nfpm/action.yml +++ b/.github/actions/package-nfpm/action.yml @@ -134,8 +134,8 @@ runs: path: ./*.${{ inputs.package_extension }} key: ${{ inputs.cache_key }} - # Update if condition to true to get packages as artifacts - - if: ${{ false }} + # Add to your PR the label upload-artifacts to get packages as artifacts + - if: ${{ contains(github.event.pull_request.labels.*.name, 'upload-artifacts') }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: diff --git a/.github/patch/fpm-deb.rb.diff b/.github/patch/fpm-deb.rb.diff new file mode 100644 index 0000000000..b711cfbd80 --- /dev/null +++ b/.github/patch/fpm-deb.rb.diff @@ -0,0 +1,32 @@ +--- deb-save.rb 2024-07-12 16:04:30.785256976 +0000 ++++ deb.rb 2024-07-12 16:21:22.035244607 +0000 +@@ -709,10 +709,19 @@ + end.flatten + + if origin == FPM::Package::CPAN ++ ++ # By default, we'd prefer to name Debian-targeted Perl packages using the ++ # same naming scheme that Debian itself uses, which is usually something ++ # like "lib-perl", such as libregexp-common-perl ++ # ++ logger.info("Changing package name to match Debian's typical libmodule-name-perl style") ++ self.name = "lib#{self.name.sub(/^perl-/, "")}-perl" ++ + # The fpm cpan code presents dependencies and provides fields as perl(ModuleName) + # so we'll need to convert them to something debian supports. + +- # Replace perl(ModuleName) > 1.0 with Debian-style perl-ModuleName (> 1.0) ++ # Replace perl(Module::Name) > 1.0 with Debian-style libmodule-name-perl (> 1.0) ++ # per: https://www.debian.org/doc/packaging-manuals/perl-policy/ch-module_packages.html + perldepfix = lambda do |dep| + m = dep.match(/perl\((?[A-Za-z0-9_:]+)\)\s*(?.*$)/) + if m.nil? +@@ -723,7 +732,7 @@ + modulename = m["name"].gsub("::", "-") + + # Fix any upper-casing or other naming concerns Debian has about packages +- name = "#{attributes[:cpan_package_name_prefix]}-#{modulename}" ++ name = "lib#{modulename}-perl" + + if m["op"].empty? + name diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 6ffbd7add5..630669b1ce 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -327,9 +327,12 @@ jobs: image: [packaging-plugins-bullseye, packaging-plugins-bookworm, packaging-plugins-jammy, packaging-plugins-bullseye-arm64] name: [ + "ARGV::Struct", "Authen::SCRAM::Client", + "Config::AWS", "Convert::EBCDIC", "Crypt::Blowfish_PP", + "DataStruct::Flat", "DateTime::Format::Duration::ISO8601", "Device::Modbus", "Digest::SHA1", @@ -371,6 +374,10 @@ jobs: image: packaging-plugins-bullseye-arm64 arch: arm64 runner_name: ["self-hosted", "collect-arm64"] + - name: "Paws" + use_dh_make_perl: "false" + deb_dependencies: "libmoose-perl libmoosex-classattribute-perl libjson-maybexs-perl liburl-encode-perl libargv-struct-perl libmoo-perl libtype-tiny-perl libdatastruct-flat-perl libmodule-find-perl libthrowable-perl liburi-template-perl libnet-amazon-signature-v4-perl" + no-auto-depends: true - name: "Statistics::Regression" build_distribs: "bullseye" version: "0.53" @@ -416,8 +423,6 @@ jobs: run: | apt-get install -y ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev - PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` - if [ -z "${{ matrix.deb_dependencies }}" ]; then PACKAGE_DEPENDENCIES="" else @@ -426,11 +431,17 @@ jobs: done fi + if [ ! -z "${{ matrix.no-auto-depends }}" ]; then + PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends" + fi + cpanm Module::Build::Tiny cpanm Module::Install gem install fpm - fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }} + # Patch to apply fpm fix for debian package generation while waiting for the official fix to be released. + patch -i .github/patch/fpm-deb.rb.diff $(find / -type f -name "deb.rb") + fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }} shell: bash - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index fdcc7605bd..e084fbc24d 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -248,8 +248,9 @@ jobs: strategy: fail-fast: false matrix: - distrib: [el8, el9, jammy, bullseye, bookworm] + image: [testing-plugins-alma8, testing-plugins-alma9, testing-plugins-jammy, testing-plugins-bullseye, testing-plugins-bookworm] include: + - runner_name: ubuntu-22.04 - package_extension: rpm image: testing-plugins-alma8 distrib: el8 @@ -265,8 +266,13 @@ jobs: - package_extension: deb image: testing-plugins-jammy distrib: jammy + - package_extension: deb + image: testing-plugins-bullseye-arm64 + distrib: bullseye + arch: arm64 + runner_name: ["self-hosted", "collect-arm64"] - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.runner_name }} container: image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }} credentials: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..21c3e1f4b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +log.html +output.xml +report.html diff --git a/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/deb.json b/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/deb.json new file mode 100644 index 0000000000..9757fe1126 --- /dev/null +++ b/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/deb.json @@ -0,0 +1,4 @@ +{ + "dependencies": [ + ] +} diff --git a/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/pkg.json b/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/pkg.json new file mode 100644 index 0000000000..21b7bfac99 --- /dev/null +++ b/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/pkg.json @@ -0,0 +1,9 @@ +{ + "pkg_name": "centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi", + "pkg_summary": "Centreon Plugin", + "plugin_name": "centreon_hpe_primera_restapi.pl", + "files": [ + "centreon/plugins/script_custom.pm", + "storage/hp/primera/restapi/" + ] +} diff --git a/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/rpm.json b/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/rpm.json new file mode 100644 index 0000000000..9757fe1126 --- /dev/null +++ b/packaging/centreon-plugin-Hardware-Storage-Hpe-Primera-Restapi/rpm.json @@ -0,0 +1,4 @@ +{ + "dependencies": [ + ] +} diff --git a/packaging/centreon-plugin-Network-Aruba-Cppm-Snmp/pkg.json b/packaging/centreon-plugin-Network-Aruba-Cppm-Snmp/pkg.json index a9dd653455..b5d694c370 100644 --- a/packaging/centreon-plugin-Network-Aruba-Cppm-Snmp/pkg.json +++ b/packaging/centreon-plugin-Network-Aruba-Cppm-Snmp/pkg.json @@ -6,6 +6,7 @@ "centreon/plugins/script_snmp.pm", "centreon/plugins/snmp.pm", "snmp_standard/mode/cpu.pm", + "snmp_standard/mode/swap.pm", "snmp_standard/mode/listinterfaces.pm", "snmp_standard/mode/resources/", "snmp_standard/mode/interfaces.pm", diff --git a/src/apps/automation/ansible/tower/plugin.pm b/src/apps/automation/ansible/tower/plugin.pm index 064e9546c4..60005fe7c9 100644 --- a/src/apps/automation/ansible/tower/plugin.pm +++ b/src/apps/automation/ansible/tower/plugin.pm @@ -39,7 +39,7 @@ sub new { 'schedules' => 'apps::automation::ansible::tower::mode::schedules' }; - $self->{custom_modes}->{api} = 'apps::automation::ansible::tower::custom::api'; + $self->{custom_modes}->{api} = 'apps::automation::ansible::tower::custom::api'; $self->{custom_modes}->{towercli} = 'apps::automation::ansible::tower::custom::towercli'; return $self; diff --git a/src/apps/voip/3cx/restapi/custom/api.pm b/src/apps/voip/3cx/restapi/custom/api.pm index d00b71ce1f..04abf29669 100644 --- a/src/apps/voip/3cx/restapi/custom/api.pm +++ b/src/apps/voip/3cx/restapi/custom/api.pm @@ -42,12 +42,13 @@ sub new { $options{output}->add_option_msg(short_msg => "Class Custom: Need to specify 'options' argument."); $options{output}->option_exit(); } - + if (!defined($options{noptions})) { $options{options}->add_options(arguments => { 'hostname:s' => { name => 'hostname' }, 'port:s' => { name => 'port'}, 'proto:s' => { name => 'proto' }, + '3cx-version:s' => { name => 'version_3cx' }, 'api-username:s' => { name => 'api_username' }, 'api-password:s' => { name => 'api_password' }, 'timeout:s' => { name => 'timeout', default => 30 }, @@ -56,7 +57,7 @@ sub new { 'critical-http-status:s' => { name => 'critical_http_status' } }); } - + $options{options}->add_help(package => __PACKAGE__, sections => 'REST API OPTIONS', once => 1); $self->{output} = $options{output}; @@ -77,16 +78,17 @@ sub set_defaults {} sub check_options { my ($self, %options) = @_; - $self->{hostname} = (defined($self->{option_results}->{hostname})) ? $self->{option_results}->{hostname} : ''; - $self->{port} = (defined($self->{option_results}->{port})) ? $self->{option_results}->{port} : 443; - $self->{proto} = (defined($self->{option_results}->{proto})) ? $self->{option_results}->{proto} : 'https'; - $self->{timeout} = (defined($self->{option_results}->{timeout})) ? $self->{option_results}->{timeout} : 30; - $self->{ssl_opt} = (defined($self->{option_results}->{ssl_opt})) ? $self->{option_results}->{ssl_opt} : undef; - $self->{api_username} = (defined($self->{option_results}->{api_username})) ? $self->{option_results}->{api_username} : ''; - $self->{api_password} = (defined($self->{option_results}->{api_password})) ? $self->{option_results}->{api_password} : ''; - $self->{unknown_http_status} = (defined($self->{option_results}->{unknown_http_status})) ? $self->{option_results}->{unknown_http_status} : '%{http_code} < 200 or %{http_code} >= 300' ; - $self->{warning_http_status} = (defined($self->{option_results}->{warning_http_status})) ? $self->{option_results}->{warning_http_status} : ''; - $self->{critical_http_status} = (defined($self->{option_results}->{critical_http_status})) ? $self->{option_results}->{critical_http_status} : ''; + $self->{hostname} = (defined($self->{option_results}->{hostname})) ? $self->{option_results}->{hostname} : ''; + $self->{port} = (defined($self->{option_results}->{port})) ? $self->{option_results}->{port} : 443; + $self->{proto} = (defined($self->{option_results}->{proto})) ? $self->{option_results}->{proto} : 'https'; + $self->{version_3cx} = (defined($self->{option_results}->{version_3cx})) ? $self->{option_results}->{version_3cx} : ''; + $self->{timeout} = (defined($self->{option_results}->{timeout})) ? $self->{option_results}->{timeout} : 30; + $self->{ssl_opt} = (defined($self->{option_results}->{ssl_opt})) ? $self->{option_results}->{ssl_opt} : undef; + $self->{api_username} = (defined($self->{option_results}->{api_username})) ? $self->{option_results}->{api_username} : ''; + $self->{api_password} = (defined($self->{option_results}->{api_password})) ? $self->{option_results}->{api_password} : ''; + $self->{unknown_http_status} = (defined($self->{option_results}->{unknown_http_status})) ? $self->{option_results}->{unknown_http_status} : '%{http_code} < 200 or %{http_code} >= 300' ; + $self->{warning_http_status} = (defined($self->{option_results}->{warning_http_status})) ? $self->{option_results}->{warning_http_status} : ''; + $self->{critical_http_status} = (defined($self->{option_results}->{critical_http_status})) ? $self->{option_results}->{critical_http_status} : ''; if ($self->{hostname} eq '') { $self->{output}->add_option_msg(short_msg => 'Need to specify --hostname option.'); @@ -100,7 +102,7 @@ sub check_options { $self->{output}->add_option_msg(short_msg => 'Need to specify --api-password option.'); $self->{output}->option_exit(); } - + $self->{option_results}->{api_version} = $self->get_api_version(version_3cx => $self->{option_results}->{version_3cx}); $self->{cache}->check_options(option_results => $self->{option_results}); return 0; @@ -123,8 +125,12 @@ sub settings { $self->{http}->add_header(key => 'Content-Type', value => 'application/json;charset=UTF-8'); if (defined($self->{cookie})) { $self->{http}->add_header(key => 'Cookie', value => $self->{cookie}); - if (defined($self->{xsrf})) { - $self->{http}->add_header(key => 'X-XSRF-TOKEN', value => $self->{xsrf}); + + if (defined($self->{auth_header})) { + my $auth_header_key = ( $self->{option_results}->{api_version} == 1 ) + ? 'X-XSRF-TOKEN' + : 'Authorization'; + $self->{http}->add_header(key => $auth_header_key, value => $self->{auth_header}); } } $self->{http}->set_options(%{$self->{option_results}}); @@ -135,10 +141,10 @@ sub authenticate { my $has_cache_file = $options{statefile}->read(statefile => '3cx_api_' . md5_hex($self->{option_results}->{hostname}) . '_' . md5_hex($self->{option_results}->{api_username})); my $cookie = $options{statefile}->get(name => 'cookie'); - my $xsrf = $options{statefile}->get(name => 'xsrf'); + my $auth_header = $options{statefile}->get(name => 'auth_header'); my $expires_on = $options{statefile}->get(name => 'expires_on'); - if ($has_cache_file == 0 || !defined($cookie) || !defined($xsrf) || (($expires_on - time()) < 10)) { + if ($has_cache_file == 0 || !defined($cookie) || !defined($auth_header) || (($expires_on - time()) < 10)) { my $post_data = '{"Username":"' . $self->{api_username} . '",' . '"Password":"' . $self->{api_password} . '"}'; @@ -161,17 +167,49 @@ sub authenticate { $self->{output}->add_option_msg(short_msg => "Error retrieving cookie"); $self->{output}->option_exit(); } - # 3CX 16.0.5.611 does not use XSRF-TOKEN anymore - if (defined ($header) && $header =~ /(?:^| )XSRF-TOKEN=([^;]+);.*/) { - $xsrf = $1; + + my $data; + if ($self->{option_results}->{api_version} == 1) + { + # for 3CX versions prior to 18.0.5 + # 3CX 16.0.5.611 does not use XSRF-TOKEN anymore + if (defined ($header) && $header =~ /(?:^| )XSRF-TOKEN=([^;]+);.*/) { + $auth_header = $1; + } + $data = { last_timestamp => time(), cookie => $cookie, xsrf => $auth_header, expires_on => time() + (3600 * 24) }; + } else { + # for 3CX versions higher or equal to 18.0.5 + $self->{http}->add_header(key => 'Cookie', value => $cookie); + $content = $self->{http}->request( + method => 'GET', + url_path => '/api/Token', + unknown_status => $self->{unknown_http_status}, + warning_status => $self->{warning_http_status}, + critical_status => $self->{critical_http_status} + ); + my $decoded; + eval { + $decoded = JSON::XS->new->decode($content); + }; + if ($@) { + $self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@"); + $self->{output}->option_exit(); + } + if (!defined($decoded)) { + $self->{output}->add_option_msg(short_msg => "Error while retrieving data (add --debug option for detailed message)"); + $self->{output}->option_exit(); + } + $auth_header = $decoded->{token_type} . " " . $decoded->{access_token}; + $expires_on = time() + ($decoded->{expires_in} * 60); + + $data = { last_timestamp => time(), cookie => $cookie, bearer => $auth_header, expires_on => $expires_on }; } - my $datas = { last_timestamp => time(), cookie => $cookie, xsrf => $xsrf, expires_on => time() + (3600 * 24) }; - $options{statefile}->write(data => $datas); + $options{statefile}->write(data => $data); } $self->{cookie} = $cookie; - $self->{xsrf} = $xsrf; + $self->{auth_header} = $auth_header; } sub request_api { @@ -271,7 +309,7 @@ sub api_system_status { return $status; } -sub internal_update_checker { +sub internal_update_checker_v1 { my ($self, %options) = @_; my $status = $self->request_api(method => 'GET', url_path =>'/api/UpdateChecker/GetFromParams', eval_content => 1); @@ -285,20 +323,74 @@ sub internal_update_checker { return $status; } -sub api_update_checker { +sub internal_update_checker_v2 { my ($self, %options) = @_; - my $status = $self->internal_update_checker(); + my $status = $self->request_api(method => 'GET', url_path =>'/xapi/v1/GetUpdatesStats()'); + if (ref($status) eq 'HASH') { + $status = $status->{TcxUpdate}; + if (ref($status) ne 'ARRAY') { + # See above note about strange content + $status = JSON::XS->new->decode($status); + } + } return $status; } + +sub api_update_checker { + my ($self, %options) = @_; + + if ($self->{option_results}->{api_version} == 1){ + return $self->internal_update_checker_v1(); + } + return $self->internal_update_checker_v2(); +} + +sub get_api_version { + my ($self, %options) = @_; + + # Given the provided (or not) 3cx version, determine once and for all the API version + # This API version is an internal reference in centreon-plugins + # Version 1 corresponds to versions prior to v18 update 5 (<= 18.0.4.x) + # Version 2 corresponds to versions greater or equal to v18 update 5 (> 18.0.5.0) + + # assuming the lastest API version if not provided + return 2 if ( !defined($options{version_3cx}) ); + + my @version_decomposition = $options{version_3cx} =~ /^([0-9]+)\.?([0-9]*)\.?([0-9]*)\.?([0-9]*)$/; + + if (scalar(@version_decomposition) == 0){ + $self->{output}->add_option_msg( + debug => 1, + long_msg => "Version '" . $options{version_3cx} . "' not formatted properly. Switching to latest supported version."); + return 2; + } + + if ($version_decomposition[0] < 18 + or $version_decomposition[0] == 18 + and defined($version_decomposition[1]) and $version_decomposition[1] == 0 + and defined($version_decomposition[2]) and $version_decomposition[2] < 5) { + + $self->{output}->add_option_msg( + debug => 1, + long_msg => "Version '" . $options{version_3cx} . "' identified as prior to 18 update 5. Using old API."); + return 1; + } else { + $self->{output}->add_option_msg( + debug => 1, + long_msg => "Version '" . $options{version_3cx} . "' identified as higher or equal to 18 update 5. Using new API."); + return 2; + } +} + 1; __END__ =head1 NAME -3CX Rest API +3CX Rest API module =head1 REST API OPTIONS @@ -306,37 +398,48 @@ __END__ =item B<--hostname> -Set hostname or IP of 3CX server. +Define the name or the address of the 3CX server. =item B<--port> -Set 3CX Port (default: '443'). +Define the port to connect to (default: '443'). =item B<--proto> -Specify http if needed (default: 'https'). +Define the protocol to reach the API (default: 'https'). + +=item B<--3cx-version> + +Define the version of 3CX to monitor for the plugin to adapt to the API version. If this option is omitted, the plugin will assume the API is in the latest supported version. +Example: 18.0.9.20 for version 18 update 9. + =item B<--api-username> -Set 3CX Username. +Define the username for authentication. =item B<--api-password> -Set 3CX Password. +Define the password associated with the username. =item B<--timeout> -Threshold for HTTP timeout (default: '30'). +Define the timeout in seconds (default: 30). =item B<--unknown-http-status> -Threshold unknown for http response code. -(default: '%{http_code} < 200 or %{http_code} >= 300') + +Define the conditions to match on the HTTP Status for the returned status to be UNKNOWN. +Default: '%{http_code} < 200 or %{http_code} >= 300' =item B<--warning-http-status> -Warning threshold for http response code. + +Define the conditions to match on the HTTP Status for the returned status to be WARNING. +Example: '%{http_code} == 500' =item B<--critical-http-status> -Critical threshold for http response code. + +Define the conditions to match on the HTTP Status for the returned status to be CRITICAL. +Example: '%{http_code} == 500' =back diff --git a/src/apps/voip/3cx/restapi/plugin.pm b/src/apps/voip/3cx/restapi/plugin.pm index 1eb2f2f8c9..33aa6ef454 100644 --- a/src/apps/voip/3cx/restapi/plugin.pm +++ b/src/apps/voip/3cx/restapi/plugin.pm @@ -46,7 +46,7 @@ __END__ =head1 PLUGIN DESCRIPTION -Check 3CX ressources through its HTTPS remote API. +Monitor 3CX resources through its HTTPS API. Requirements: at least 3CX 15.5. diff --git a/src/centreon/plugins/dbi.pm b/src/centreon/plugins/dbi.pm index 3c1ec57f5f..479157ab3e 100644 --- a/src/centreon/plugins/dbi.pm +++ b/src/centreon/plugins/dbi.pm @@ -26,11 +26,11 @@ use DBI; use Digest::MD5 qw(md5_hex); use POSIX qw(:signal_h); -my %handlers = ( ALRM => {} ); +my %handlers = (ALRM => {}); sub new { my ($class, %options) = @_; - my $self = {}; + my $self = {}; bless $self, $class; # $options{options} = options object # $options{output} = output object @@ -60,16 +60,16 @@ sub new { } $options{options}->add_help(package => __PACKAGE__, sections => 'DBI OPTIONS', once => 1); - $self->{output} = $options{output}; - $self->{sqlmode_name} = $options{sqlmode_name}; - $self->{instance} = undef; + $self->{output} = $options{output}; + $self->{sqlmode_name} = $options{sqlmode_name}; + $self->{instance} = undef; $self->{statement_handle} = undef; - $self->{version} = undef; + $self->{version} = undef; - $self->{data_source} = undef; - $self->{username} = undef; - $self->{password} = undef; - $self->{connect_options} = undef; + $self->{data_source} = undef; + $self->{username} = undef; + $self->{password} = undef; + $self->{connect_options} = undef; $self->{connect_options_hash} = {}; # Sometimes, we need to set ENV @@ -87,7 +87,7 @@ sub prepare_destroy { sub set_signal_handlers { my $self = shift; - $SIG{ALRM} = \&class_handle_ALRM; + $SIG{ALRM} = \&class_handle_ALRM; $handlers{ALRM}->{$self} = sub { $self->handle_ALRM() }; } @@ -103,7 +103,7 @@ sub handle_ALRM { $self->prepare_destroy(); $self->disconnect(); $self->{output}->output_add( - severity => $self->{sql_errors_exit}, + severity => $self->{sql_errors_exit}, short_msg => 'Timeout' ); $self->{output}->display(); @@ -136,7 +136,7 @@ sub check_options { my ($self, %options) = @_; $self->{data_source} = (defined($self->{option_results}->{data_source})) ? shift(@{$self->{option_results}->{data_source}}) : undef; - $self->{username} = undef; + $self->{username} = undef; if (defined($self->{option_results}->{username})) { $self->{username} = ref($self->{option_results}->{username}) eq 'ARRAY' ? shift(@{$self->{option_results}->{username}}) : $self->{option_results}->{username}; } @@ -144,10 +144,10 @@ sub check_options { if (defined($self->{option_results}->{password})) { $self->{password} = ref($self->{option_results}->{password}) eq 'ARRAY' ? shift(@{$self->{option_results}->{password}}) : $self->{option_results}->{password}; } - + $self->{connect_options} = (defined($self->{option_results}->{connect_options})) ? shift(@{$self->{option_results}->{connect_options}}) : undef; - $self->{connect_query} = (defined($self->{option_results}->{connect_query})) ? shift(@{$self->{option_results}->{connect_query}}) : undef; - $self->{env} = (defined($self->{option_results}->{env})) ? shift(@{$self->{option_results}->{env}}) : undef; + $self->{connect_query} = (defined($self->{option_results}->{connect_query})) ? shift(@{$self->{option_results}->{connect_query}}) : undef; + $self->{env} = (defined($self->{option_results}->{env})) ? shift(@{$self->{option_results}->{env}}) : undef; $self->{sql_errors_exit} = $self->{option_results}->{sql_errors_exit}; $self->{timeout} = 10; @@ -192,10 +192,10 @@ sub quote { sub is_version_minimum { my ($self, %options) = @_; # $options{version} = string version to check - + my @version_src = split /\./, $self->{version}; - my @versions = split /\./, $options{version}; - for (my $i = 0; $i < scalar(@versions); $i++) { + my @versions = split /\./, $options{version}; + for (my $i = 0; $i < scalar(@versions); $i++) { return 1 if ($versions[$i] eq 'x'); return 1 if (!defined($version_src[$i])); $version_src[$i] =~ /^([0-9]*)/; @@ -222,10 +222,10 @@ sub disconnect { $self->{instance} = undef; } } - + sub connect { my ($self, %options) = @_; - my $dontquit = (defined($options{dontquit}) && $options{dontquit} == 1) ? 1 : 0; + my $dontquit = (defined($options{dontquit}) && $options{dontquit} == 1) ? 1 : 0; return if (defined($self->{instance})); @@ -241,7 +241,7 @@ sub connect { eval { alarm($self->{timeout}) if (defined($self->{timeout})); $self->{instance} = DBI->connect( - "DBI:". $self->{data_source}, + "DBI:" . $self->{data_source}, $self->{username}, $self->{password}, { RaiseError => 0, PrintError => 0, AutoCommit => 1, %{$self->{connect_options_hash}} } @@ -257,8 +257,8 @@ sub connect { if (!defined($self->{instance})) { my $err_msg = sprintf( 'Cannot connect: %s', - defined($DBI::errstr) ? $DBI::errstr : - (defined($connect_error) ? $connect_error : '(no error string)') + defined($DBI::errstr) ? $DBI::errstr : + (defined($connect_error) ? $connect_error : '(no error string)') ); if ($dontquit == 0) { $self->{output}->add_option_msg(short_msg => $err_msg); @@ -306,7 +306,7 @@ sub fetchrow_hashref { sub query { my ($self, %options) = @_; - my $continue_error = defined($options{continue_error}) && $options{continue_error} == 1 ? 1 : 0; + my $continue_error = defined($options{continue_error}) && $options{continue_error} == 1 ? 1 : 0; $self->{statement_handle} = $self->{instance}->prepare($options{query}); if (!defined($self->{statement_handle})) { @@ -318,7 +318,7 @@ sub query { my $rv; if (defined($self->{exec_timeout})) { - my $mask = POSIX::SigSet->new(SIGALRM); + my $mask = POSIX::SigSet->new(SIGALRM); my $action = POSIX::SigAction->new( sub { $self->handle_ALRM() }, $mask, @@ -335,7 +335,7 @@ sub query { sigaction(SIGALRM, $oldaction); } else { $rv = $self->{statement_handle}->execute(); - } + } if (!$rv) { return 1 if ($continue_error == 1); @@ -343,7 +343,7 @@ sub query { $self->disconnect(); $self->{output}->option_exit(exit_litteral => $self->{sql_errors_exit}); } - + return 0; } @@ -357,7 +357,7 @@ DBI global =head1 SYNOPSIS -dbi class +DBI class =head1 DBI OPTIONS @@ -402,6 +402,6 @@ Timeout in seconds for query execution =head1 DESCRIPTION -B. +B. =cut diff --git a/src/cloud/kubernetes/custom/api.pm b/src/cloud/kubernetes/custom/api.pm index 420a30b41a..b5411171b5 100644 --- a/src/cloud/kubernetes/custom/api.pm +++ b/src/cloud/kubernetes/custom/api.pm @@ -43,14 +43,15 @@ sub new { if (!defined($options{noptions})) { $options{options}->add_options(arguments => { - 'hostname:s' => { name => 'hostname' }, - 'port:s' => { name => 'port' }, - 'proto:s' => { name => 'proto' }, - 'token:s' => { name => 'token' }, - 'timeout:s' => { name => 'timeout' }, - 'limit:s' => { name => 'limit' }, - 'config-file:s' => { name => 'config_file' }, - 'namespace:s' => { name => 'namespace' } + 'hostname:s' => { name => 'hostname' }, + 'port:s' => { name => 'port' }, + 'proto:s' => { name => 'proto' }, + 'token:s' => { name => 'token' }, + 'timeout:s' => { name => 'timeout' }, + 'limit:s' => { name => 'limit' }, + 'config-file:s' => { name => 'config_file' }, + 'namespace:s' => { name => 'namespace' }, + 'legacy-api-beta:s' => { name => 'legacy_api_beta' } }); } $options{options}->add_help(package => __PACKAGE__, sections => 'REST API OPTIONS', once => 1); @@ -190,9 +191,14 @@ sub request_api_paginate { sub kubernetes_list_cronjobs { my ($self, %options) = @_; + my $url_path=$self->{namespace} ne '' ? '/apis/batch/v1/namespaces/' . $self->{namespace} . '/cronjobs' : '/apis/batch/v1/cronjobs'; + if (defined($self->{legacy_api_beta})){ + $url_path=$self->{namespace} ne '' ? '/apis/batch/v1beta1/namespaces/' . $self->{namespace} . '/cronjobs' : '/apis/batch/v1beta1/cronjobs'; + }; + my $response = $self->request_api_paginate( method => 'GET', - url_path => $self->{namespace} ne '' ? '/apis/batch/v1beta1/namespaces/' . $self->{namespace} . '/cronjobs' : '/apis/batch/v1beta1/cronjobs' + url_path => $url_path ); return $response; @@ -234,9 +240,14 @@ sub kubernetes_list_events { sub kubernetes_list_ingresses { my ($self, %options) = @_; + my $url_path=$self->{namespace} ne '' ? '/apis/networking.k8s.io/v1/namespaces/' . $self->{namespace} . '/ingresses' : '/apis/networking.k8s.io/v1/ingresses'; + if (defined($self->{legacy_api_beta})){ + $url_path=$self->{namespace} ne '' ? '/apis/extensions/v1beta1/namespaces/' . $self->{namespace} . '/ingresses' : '/apis/extensions/v1beta1/ingresses'; + }; + my $response = $self->request_api_paginate( method => 'GET', - url_path => $self->{namespace} ne '' ? '/apis/extensions/v1beta1/namespaces/' . $self->{namespace} . '/ingresses' : '/apis/extensions/v1beta1/ingresses' + url_path => $url_path ); return $response; @@ -369,7 +380,13 @@ See https://kubernetes.io/docs/reference/kubernetes-api/common-parameters/common =item B<--namespace> -Set namespace to get informations. +Set namespace to get information. + +=item B<--legacy-api-beta> + +If this option is set the legacy API path are set for this API calls: +kubernetes_list_cronjobs will use this path: /apis/batch/v1beta1/namespaces/ +kubernetes_list_ingresses will use this path: /apis/extensions/v1beta1/namespaces/ =back diff --git a/src/cloud/vmware/velocloud/restapi/custom/api.pm b/src/cloud/vmware/velocloud/restapi/custom/api.pm index b713fae363..5ab0265d04 100644 --- a/src/cloud/vmware/velocloud/restapi/custom/api.pm +++ b/src/cloud/vmware/velocloud/restapi/custom/api.pm @@ -283,7 +283,8 @@ sub get_entreprise_id { my $response = $self->request_api( method => 'POST', - endpoint => '/enterprise/getEnterprise' + endpoint => '/enterprise/getEnterprise', + query_form_post => {} ); $self->{entreprise_id} = $response->{id}; diff --git a/src/hardware/devices/hikvision/nvr/snmp/mode/disks.pm b/src/hardware/devices/hikvision/nvr/snmp/mode/disks.pm index e83d887738..60064e1d12 100644 --- a/src/hardware/devices/hikvision/nvr/snmp/mode/disks.pm +++ b/src/hardware/devices/hikvision/nvr/snmp/mode/disks.pm @@ -210,7 +210,7 @@ Filter disks by name (can be a regexp). Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name} -=item B<--warning--status> +=item B<--warning-status> Define the conditions to match for the status to be WARNING (default: '%{status} =~ /reparing|formatting/i'). You can use the following variables: %{status}, %{name} diff --git a/src/network/sonus/sbc/snmp/mode/cpu.pm b/src/network/sonus/sbc/snmp/mode/cpu.pm index 48b2a5e8e8..8c833d000b 100644 --- a/src/network/sonus/sbc/snmp/mode/cpu.pm +++ b/src/network/sonus/sbc/snmp/mode/cpu.pm @@ -20,7 +20,7 @@ package network::sonus::sbc::snmp::mode::cpu; -use base qw(snmp_standard::mode::cpudetailed); +use base qw(snmp_standard::mode::cpu); use strict; use warnings; @@ -39,7 +39,7 @@ __END__ =head1 MODE -Check system CPUs. +Check system CPU. (The average, over the last minute, of the percentage of time that this processor was not idle) @@ -47,7 +47,7 @@ of time that this processor was not idle) =item B<--use-ucd> -Use UCD mib for CPU average. +Use UCD MIB for CPU average. =item B<--warning-average> diff --git a/src/network/teldat/snmp/mode/cellsradio.pm b/src/network/teldat/snmp/mode/cellsradio.pm index f0175c8326..1b88512368 100644 --- a/src/network/teldat/snmp/mode/cellsradio.pm +++ b/src/network/teldat/snmp/mode/cellsradio.pm @@ -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 diff --git a/src/network/teldat/snmp/mode/cpu.pm b/src/network/teldat/snmp/mode/cpu.pm index 10001cfbb5..1077c5e088 100644 --- a/src/network/teldat/snmp/mode/cpu.pm +++ b/src/network/teldat/snmp/mode/cpu.pm @@ -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 diff --git a/src/network/teldat/snmp/mode/interfaces.pm b/src/network/teldat/snmp/mode/interfaces.pm index 5420de3714..9a7d38b18e 100644 --- a/src/network/teldat/snmp/mode/interfaces.pm +++ b/src/network/teldat/snmp/mode/interfaces.pm @@ -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 diff --git a/src/network/teldat/snmp/mode/listcellsradio.pm b/src/network/teldat/snmp/mode/listcellsradio.pm new file mode 100644 index 0000000000..de9e9e0230 --- /dev/null +++ b/src/network/teldat/snmp/mode/listcellsradio.pm @@ -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 diff --git a/src/network/teldat/snmp/mode/memory.pm b/src/network/teldat/snmp/mode/memory.pm index 5d70b0fc17..703b9497c5 100644 --- a/src/network/teldat/snmp/mode/memory.pm +++ b/src/network/teldat/snmp/mode/memory.pm @@ -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 diff --git a/src/network/teldat/snmp/mode/uptime.pm b/src/network/teldat/snmp/mode/uptime.pm index 2198ce5eab..1abdb1e9e0 100644 --- a/src/network/teldat/snmp/mode/uptime.pm +++ b/src/network/teldat/snmp/mode/uptime.pm @@ -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 diff --git a/src/network/teldat/snmp/plugin.pm b/src/network/teldat/snmp/plugin.pm index a12412bbfe..b3601f317e 100644 --- a/src/network/teldat/snmp/plugin.pm +++ b/src/network/teldat/snmp/plugin.pm @@ -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 diff --git a/src/notification/microsoft/office365/teams/custom/workflowapi.pm b/src/notification/microsoft/office365/teams/custom/workflowapi.pm new file mode 100644 index 0000000000..4e2d7d10ac --- /dev/null +++ b/src/notification/microsoft/office365/teams/custom/workflowapi.pm @@ -0,0 +1,155 @@ +# +# 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 notification::microsoft::office365::teams::custom::workflowapi; + +use strict; +use warnings; +use centreon::plugins::http; +use centreon::plugins::statefile; +use JSON::XS; + +sub new { + my ($class, %options) = @_; + my $self = {}; + bless $self, $class; + + if (!defined($options{output})) { + print "Class Custom: Need to specify 'output' argument.\n"; + exit 3; + } + if (!defined($options{options})) { + $options{output}->add_option_msg(short_msg => "Class Custom: Need to specify 'options' argument."); + $options{output}->option_exit(); + } + + if (!defined($options{noptions})) { + $options{options}->add_options(arguments => { + 'teams-workflow:s' => { name => 'teams_workflow' }, + 'port:s' => { name => 'port' }, + 'proto:s' => { name => 'proto' }, + 'timeout:s' => { name => 'timeout' } + }); + } + $options{options}->add_help(package => __PACKAGE__, sections => 'REST API OPTIONS', once => 1); + + $self->{output} = $options{output}; + $self->{http} = centreon::plugins::http->new(%options); + + return $self; +} + +sub set_defaults {} + +sub set_options { + my ($self, %options) = @_; + + $self->{option_results} = $options{option_results}; + $self->{http}->add_header(key => 'Accept', value => 'application/json'); + $self->{http}->add_header(key => 'Content-Type', value => 'application/json'); +} + +sub check_options { + my ($self, %options) = @_; + + $self->{teams_workflow} = (defined($self->{option_results}->{teams_workflow})) ? $self->{option_results}->{teams_workflow} : ''; + $self->{proto} = (defined($self->{option_results}->{proto})) ? $self->{option_results}->{proto} : 'https'; + $self->{port} = (defined($self->{option_results}->{port})) ? $self->{option_results}->{port} : 443; + $self->{timeout} = (defined($self->{option_results}->{timeout})) ? $self->{option_results}->{timeout} : 30; + + if ($self->{teams_workflow} eq '') { + $self->{output}->add_option_msg(short_msg => 'Need to specify the --teams-workflow option.'); + $self->{output}->option_exit(); + } + + $self->{http}->set_options(%{$self->{option_results}}, hostname => 'dummy'); + + return 0; +} + +sub json_decode { + my ($self, %options) = @_; + + $options{content} =~ s/\r//mg; + my $decoded; + eval { + $decoded = JSON::XS->new->allow_nonref(1)->utf8->decode($options{content}); + }; + if ($@) { + $self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@"); + $self->{output}->option_exit(); + } + + return $decoded; +} + +sub teams_post_notification { + my ($self, %options) = @_; + + my $encoded_data = JSON::XS->new->utf8->encode($options{json_request}); + + my $content = $self->{http}->request( + method => 'POST', + full_url => $self->{teams_workflow}, + query_form_post => $encoded_data + ); + + return $content; +} + +1; + +__END__ + +=head1 NAME + +O365 Teams Workflows API + +=head1 SYNOPSIS + +O365 Teams Workflows API + +=head1 REST API OPTIONS + +=over 8 + +=item B<--teams-workflow> + +Define the Workflow full URI (required). + +=item B<--port> + +Define the API port (default: 443). + +=item B<--proto> + +Define the protocol if needed (default: 'https'). + +=item B<--timeout> + +Define the HTTP timeout. + +=back + +=head1 DESCRIPTION + +B. + +=cut diff --git a/src/notification/microsoft/office365/teams/mode/alert.pm b/src/notification/microsoft/office365/teams/mode/alert.pm index f62e3122f6..834be4e74b 100644 --- a/src/notification/microsoft/office365/teams/mode/alert.pm +++ b/src/notification/microsoft/office365/teams/mode/alert.pm @@ -28,7 +28,7 @@ use JSON::XS; sub new { my ($class, %options) = @_; - my $self = $class->SUPER::new(package => __PACKAGE__, %options); + my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $self->{version} = '1.0'; @@ -38,13 +38,13 @@ sub new { 'centreon-url:s' => { name => 'centreon_url' }, 'channel-id:s' => { name => 'channel_id' }, 'date:s' => { name => 'date' }, - 'extra-info-format:s' => { name => 'extra_info_format', default => 'Author: %s, Comment: %s'}, - 'extra-info:s' => { name => 'extra_info'}, + 'extra-info-format:s' => { name => 'extra_info_format', default => 'Author: %s, Comment: %s' }, + 'extra-info:s' => { name => 'extra_info' }, 'host-name:s' => { name => 'host_name' }, 'host-output:s' => { name => 'host_output', default => '' }, 'host-state:s' => { name => 'host_state' }, 'legacy:s' => { name => 'legacy' }, - 'notification-type:s' => { name => 'notif_type'}, + 'notification-type:s' => { name => 'notif_type' }, 'service-description:s' => { name => 'service_name' }, 'service-output:s' => { name => 'service_output', default => '' }, 'service-state:s' => { name => 'service_state' }, @@ -59,9 +59,9 @@ sub check_options { $self->SUPER::init(%options); $self->{teams}->{channel_id} = defined($self->{option_results}->{channel_id}) && $self->{option_results}->{channel_id} ne '' ? - $self->{option_results}->{channel_id} : undef; + $self->{option_results}->{channel_id} : undef; $self->{teams}->{team_id} = defined($self->{option_results}->{team_id}) && $self->{option_results}->{channel_id} ne '' - ? $self->{option_results}->{team_id} : undef; + ? $self->{option_results}->{team_id} : undef; if (!defined($self->{option_results}->{notif_type}) || $self->{option_results}->{notif_type} eq '') { $self->{output}->add_option_msg(short_msg => "You need to specify the --notification-type option."); @@ -72,85 +72,85 @@ sub check_options { sub build_resource_status_filters { my ($self, %options) = @_; - my $data_format = URI::Encode->new({encode_reserved => 1}); + my $data_format = URI::Encode->new({ encode_reserved => 1 }); my $raw_resource_status_filters = { - "id" => "", - "name" => "New+filter", + "id" => "", + "name" => "New+filter", "criterias" => [ { - "name" => "resource_types", + "name" => "resource_types", "object_type" => undef, - "type" => "multi_select", - "value" => [ + "type" => "multi_select", + "value" => [ { - "id" => "service", + "id" => "service", "name" => "Service" } - ] + ] }, { - "name" => "states", + "name" => "states", "object_type" => undef, - "type" => "multi_select", - "value" => [ - + "type" => "multi_select", + "value" => [ + ] }, { - "name" => "statuses", + "name" => "statuses", "object_type" => undef, - "type" => "multi_select", - "value" => [ - + "type" => "multi_select", + "value" => [ + ] }, { - "name" => "status_types", + "name" => "status_types", "object_type" => undef, - "type" => "multi_select", - "value" => [ - + "type" => "multi_select", + "value" => [ + ] }, { - "name" => "host_groups", + "name" => "host_groups", "object_type" => "host_groups", - "type" => "multi_select", - "value" => [ - + "type" => "multi_select", + "value" => [ + ] }, { - "name" => "service_groups", + "name" => "service_groups", "object_type" => "service_groups", - "type" => "multi_select", - "value" => [ - + "type" => "multi_select", + "value" => [ + ] }, { - "name" => "monitoring_servers", + "name" => "monitoring_servers", "object_type" => "monitoring_servers", - "type" => "multi_select", - "value" => [ - + "type" => "multi_select", + "value" => [ + ] }, { - "name" => "search", + "name" => "search", "object_type" => undef, - "type" => "text", - "value" => sprintf( + "type" => "text", + "value" => sprintf( 's.description:%s h.name:%s', - defined($self->{option_results}->{service_name}) ? $self->{option_results}->{service_name} : '', - defined($self->{option_results}->{host_name}) ? $self->{option_results}->{host_name} : '' + defined($self->{option_results}->{service_name}) ? $self->{option_results}->{service_name} : '', + defined($self->{option_results}->{host_name}) ? $self->{option_results}->{host_name} : '' ) }, { - "name" => "sort", + "name" => "sort", "object_type" => undef, - "type" => "array", - "value" => [ + "type" => "array", + "value" => [ "status_severity_code", "asc" ] @@ -158,25 +158,25 @@ sub build_resource_status_filters { ] }; - my $link_url_path = '/monitoring/resources?filter='; + my $link_url_path = '/monitoring/resources?filter='; my $encoded_resource_status_filters = JSON::XS->new->utf8->encode($raw_resource_status_filters); - my $encoded_data_for_uri = $data_format->encode($encoded_resource_status_filters); - $link_url_path .= $encoded_data_for_uri; + my $encoded_data_for_uri = $data_format->encode($encoded_resource_status_filters); + $link_url_path .= $encoded_data_for_uri; return $link_url_path; } -sub build_payload { +sub build_webhook_payload { my ($self, %options) = @_; - my $message = $self->build_message(); + my $message = $self->build_webhook_message(); $self->{json_payload} = { '@type' => 'MessageCard', '@context' => 'https://schema.org/extensions', potentialAction => $message->{potentialAction}, sections => $message->{sections}, summary => 'Centreon ' . $message->{notif_type}, - themecolor => $message->{themecolor} + themeColor => $message->{themecolor} }; if ($@) { @@ -187,41 +187,43 @@ sub build_payload { return $self; } -sub build_message { +sub build_webhook_message { my ($self, %options) = @_; my $teams_colors = { ACKNOWLEDGEMENT => 'fefc8e', - DOWNTIMEEND => 'f1dfff', - DOWNTIMESTART => 'f1dfff', - RECOVERY => '42f56f', - PROBLEM => { - host => { + DOWNTIMEEND => 'f1dfff', + DOWNTIMESTART => 'f1dfff', + RECOVERY => '42f56f', + PROBLEM => { + host => { up => '42f56f', down => 'f21616', unreachable => 'f21616' }, service => { - ok => '42f56f', - warning => 'f59042', + ok => '42f56f', + warning => 'f59042', critical => 'f21616', - unknown => '757575' + unknown => '757575' } } }; - $self->{sections} = []; - $self->{notif_type} = $self->{option_results}->{notif_type}; - my $resource_type = defined($self->{option_results}->{host_state}) ? 'host' : 'service'; + $self->{sections} = []; + $self->{notif_type} = $self->{option_results}->{notif_type}; + my $resource_type = defined($self->{option_results}->{host_state}) ? 'host' : 'service'; my $formatted_resource = ucfirst($resource_type); - $formatted_resource = 'BAM' if defined($self->{option_results}->{bam}); + $formatted_resource = 'BAM' if defined($self->{option_results}->{bam}); push @{$self->{sections}}, { - activityTitle => $self->{notif_type} . ': ' . $formatted_resource . ' "' . $self->{option_results}->{$resource_type . '_name'} . '" is ' . $self->{option_results}->{$resource_type . '_state'}, - activitySubtitle => $resource_type eq 'service' ? 'Host ' . $self->{option_results}->{host_name} : '' + activityTitle => + $self->{notif_type} . ': ' . $formatted_resource . ' "' . $self->{option_results}->{$resource_type . '_name'} . '" is ' . $self->{option_results}->{$resource_type . '_state'}, + activitySubtitle => + $resource_type eq 'service' ? 'Host ' . $self->{option_results}->{host_name} : '' }; $self->{themecolor} = $teams_colors->{$self->{notif_type}}; - if ($self->{option_results}->{notif_type} eq 'PROBLEM') { + if ($self->{notif_type} eq 'PROBLEM') { $self->{themecolor} = $teams_colors->{PROBLEM}->{$resource_type}->{lc($self->{option_results}->{$resource_type . '_state'})}; } @@ -243,23 +245,23 @@ sub build_message { } if (defined($self->{option_results}->{action_links})) { - if (!defined($self->{option_results}->{centreon_url}) || $self->{option_results}->{centreon_url} eq ''){ + if (!defined($self->{option_results}->{centreon_url}) || $self->{option_results}->{centreon_url} eq '') { $self->{output}->add_option_msg(short_msg => 'Please set --centreon-url option'); $self->{output}->option_exit(); } - my $uri = URI::Encode->new({encode_reserved => 0}); + my $uri = URI::Encode->new({ encode_reserved => 0 }); my $link_url_path; - - if (defined($self->{option_results}->{legacy})){ + + if (defined($self->{option_results}->{legacy})) { $link_url_path = '/main.php?p=2020'; # deprecated pages $link_url_path .= ($resource_type eq 'service') ? - '1&o=svc&host_search=' . $self->{option_results}->{host_name} . '&search=' . $self->{option_results}->{service_name} : - '2&o=svc&host_search=' . $self->{option_results}->{host_name}; + '1&o=svc&host_search=' . $self->{option_results}->{host_name} . '&search=' . $self->{option_results}->{service_name} : + '2&o=svc&host_search=' . $self->{option_results}->{host_name}; my $link_uri_encoded = $uri->encode($self->{option_results}->{centreon_url} . $link_url_path); } else { $link_url_path = $self->build_resource_status_filters(); - } + } my $link_uri_encoded = $uri->encode($self->{option_results}->{centreon_url}) . $link_url_path; @@ -275,7 +277,7 @@ sub build_message { if ($resource_type eq 'service') { my $graph_url_path = '/main.php?p=204&mode=0&svc_id='; - $graph_url_path .= $self->{option_results}->{host_name} . ';' . $self->{option_results}->{service_name}; + $graph_url_path .= $self->{option_results}->{host_name} . ';' . $self->{option_results}->{service_name}; my $graph_uri_encoded = $uri->encode($self->{option_results}->{centreon_url} . $graph_url_path); push @{$self->{potentialAction}}, { '@type' => 'OpenUri', @@ -286,7 +288,157 @@ sub build_message { }] }; } - + + } + return $self; +} + +sub build_workflow_payload { + my ($self, %options) = @_; + + my $message = $self->build_workflow_message(); + $self->{json_payload} = { + type => "message", + attachments => [ + { + contentType => "application/vnd.microsoft.card.adaptive", + content => { + '$schema' => "http://adaptivecards.io/schemas/adaptive-card.json", + type => "AdaptiveCard", + version => "1.0", + body => $message->{body}, + actions => $message->{actions} + } + } + ] + }; + + if ($@) { + $self->{output}->add_option_msg(short_msg => 'Cannot decode json response'); + $self->{output}->option_exit(); + } + + return $self; +} + +sub build_workflow_message { + my ($self, %options) = @_; + + my $teams_colors = { + ACKNOWLEDGEMENT => 'accent', + DOWNTIMEEND => 'accent', + DOWNTIMESTART => 'accent', + RECOVERY => 'good', + PROBLEM => { + host => { + up => 'good', + down => 'attention', + unreachable => 'attention' + }, + service => { + ok => 'good', + warning => 'warning', + critical => 'attention', + unknown => 'light' + } + } + }; + + $self->{body} = []; + $self->{notif_type} = $self->{option_results}->{notif_type}; + my $resource_type = defined($self->{option_results}->{host_state}) ? 'host' : 'service'; + my $formatted_resource = ucfirst($resource_type); + $formatted_resource = 'BAM' if defined($self->{option_results}->{bam}); + my $themecolor = $teams_colors->{$self->{notif_type}}; + if ($self->{notif_type} eq 'PROBLEM') { + $themecolor = $teams_colors->{PROBLEM}->{$resource_type}->{lc($self->{option_results}->{$resource_type . '_state'})}; + } + if (!defined($themecolor)) { + $themecolor = 'default'; + } + + push @{$self->{body}}, { + type => "TextBlock", + text => $self->{notif_type} . ': ' . $formatted_resource . ' "' . $self->{option_results}->{$resource_type . '_name'} . '" is ' . $self->{option_results}->{$resource_type . '_state'}, + "size" => "Large", + "weight" => "Bolder", + "style" => "heading", + "color" => $themecolor + }; + push @{$self->{body}}, { + type => "TextBlock", + text => $resource_type eq 'service' ? 'Host ' . $self->{option_results}->{host_name} : '', + "size" => "Medium", + "weight" => "Bolder", + "style" => "heading", + "color" => $themecolor + }; + + if (defined($self->{option_results}->{$resource_type . '_output'}) && $self->{option_results}->{$resource_type . '_output'} ne '') { + push @{$self->{body}}, { + type => "TextBlock", + text => "Status: " . $self->{option_results}->{$resource_type . '_output'} + }; + } + + if (defined($self->{option_results}->{date}) && $self->{option_results}->{date} ne '') { + push @{$self->{body}}, { + type => "TextBlock", + text => "Event date: " . $self->{option_results}->{date} + }; + } + + if (defined($self->{option_results}->{extra_info}) && $self->{option_results}->{extra_info} !~ m/^\/\/$/) { + if ($self->{option_results}->{extra_info} =~ m/^(.*)\/\/(.*)$/) { + push @{$self->{body}}, { + type => "TextBlock", + text => "Additional Information: \n" . sprintf($self->{option_results}->{extra_info_format}, $1, $2), + "wrap" => "true" + }; + } + } + + if (defined($self->{option_results}->{action_links})) { + if (!defined($self->{option_results}->{centreon_url}) || $self->{option_results}->{centreon_url} eq '') { + $self->{output}->add_option_msg(short_msg => 'Please set --centreon-url option'); + $self->{output}->option_exit(); + } + my $uri = URI::Encode->new({ encode_reserved => 0 }); + my $link_url_path; + + if (defined($self->{option_results}->{legacy})) { + $link_url_path = '/main.php?p=2020'; # deprecated pages + $link_url_path .= ($resource_type eq 'service') ? + '1&o=svc&host_search=' . $self->{option_results}->{host_name} . '&search=' . $self->{option_results}->{service_name} : + '2&o=svc&host_search=' . $self->{option_results}->{host_name}; + + my $link_uri_encoded = $uri->encode($self->{option_results}->{centreon_url} . $link_url_path); + } else { + $link_url_path = $self->build_resource_status_filters(); + } + + my $link_uri_encoded = $uri->encode($self->{option_results}->{centreon_url}) . $link_url_path; + + push @{$self->{actions}}, { + "type" => "Action.OpenUrl", + "title" => "Details", + "url" => "$link_uri_encoded", + "role" => "button" + }; + + if ($resource_type eq 'service') { + my $graph_url_path = '/main.php?p=204&mode=0&svc_id='; + + $graph_url_path .= $self->{option_results}->{host_name} . ';' . $self->{option_results}->{service_name}; + my $graph_uri_encoded = $uri->encode($self->{option_results}->{centreon_url} . $graph_url_path); + push @{$self->{actions}}, { + "type" => "Action.OpenUrl", + "title" => "Graph", + "url" => $graph_uri_encoded, + "role" => "button" + }; + } + } return $self; } @@ -294,8 +446,13 @@ sub build_message { sub run { my ($self, %options) = @_; - my $json_request = $self->build_payload(); - my $response = $options{custom}->teams_post_notification( + my $json_request; + if (!centreon::plugins::misc::is_empty($options{custom}->{teams_webhook})) { + $json_request = $self->build_webhook_payload(); + } else { + $json_request = $self->build_workflow_payload(); + } + $options{custom}->teams_post_notification( channel_id => $self->{teams}->{channel_id}, json_request => $self->{json_payload}, team_id => $self->{teams}->{team_id} diff --git a/src/notification/microsoft/office365/teams/plugin.pm b/src/notification/microsoft/office365/teams/plugin.pm index 94311b0390..7694c92232 100644 --- a/src/notification/microsoft/office365/teams/plugin.pm +++ b/src/notification/microsoft/office365/teams/plugin.pm @@ -36,6 +36,7 @@ sub new { $self->{custom_modes}->{graphapi} = 'cloud::microsoft::office365::custom::graphapi'; $self->{custom_modes}->{webhookapi} = 'notification::microsoft::office365::teams::custom::webhookapi'; + $self->{custom_modes}->{workflowapi} = 'notification::microsoft::office365::teams::custom::workflowapi'; return $self; } diff --git a/src/os/as400/connector/mode/command.pm b/src/os/as400/connector/mode/command.pm index 218357d06d..ce5ecae918 100644 --- a/src/os/as400/connector/mode/command.pm +++ b/src/os/as400/connector/mode/command.pm @@ -118,7 +118,7 @@ Specify the command to execute (required). Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name} -=item B<--warning--status> +=item B<--warning-status> Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name} diff --git a/src/os/as400/connector/mode/disks.pm b/src/os/as400/connector/mode/disks.pm index 6c6dcaed55..e28e3fc258 100644 --- a/src/os/as400/connector/mode/disks.pm +++ b/src/os/as400/connector/mode/disks.pm @@ -243,7 +243,7 @@ Filter disks by name (can be a regexp). Define the conditions to match for the status to be UNKNOWN (default: '%{status} =~ /unknown/i'). You can use the following variables: %{status}, %{name} -=item B<--warning--status> +=item B<--warning-status> Define the conditions to match for the status to be WARNING (default: '%{status} =~ /noReady|busy|hwFailureOk|hwFailurePerf|Protected|rebuilding/i'). You can use the following variables: %{status}, %{name} diff --git a/src/os/as400/connector/mode/jobqueues.pm b/src/os/as400/connector/mode/jobqueues.pm index 32469f1f17..8e8c4557e8 100644 --- a/src/os/as400/connector/mode/jobqueues.pm +++ b/src/os/as400/connector/mode/jobqueues.pm @@ -208,7 +208,7 @@ JOBQ selection. Example: --jobq="QGPL:QBASE" --jobq="QGPL:QPGMR" Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name}, %{library} -=item B<--warning--status> +=item B<--warning-status> Define the conditions to match for the status to be WARNING. You can use the following variables: %{status}, %{name}, %{library} diff --git a/src/os/as400/connector/mode/subsystems.pm b/src/os/as400/connector/mode/subsystems.pm index 12dddab1b8..86661d4ac5 100644 --- a/src/os/as400/connector/mode/subsystems.pm +++ b/src/os/as400/connector/mode/subsystems.pm @@ -190,7 +190,7 @@ Filter subsystems by library (can be a regexp). Define the conditions to match for the status to be UNKNOWN. You can use the following variables: %{status}, %{name}, %{library} -=item B<--warning--status> +=item B<--warning-status> Define the conditions to match for the status to be WARNING (default: '%{status} =~ /ending|restricted|starting/i'). You can use the following variables: %{status}, %{name}, %{library} diff --git a/src/storage/hp/primera/restapi/custom/api.pm b/src/storage/hp/primera/restapi/custom/api.pm new file mode 100644 index 0000000000..bbb67be913 --- /dev/null +++ b/src/storage/hp/primera/restapi/custom/api.pm @@ -0,0 +1,239 @@ +# +# 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 storage::hp::primera::restapi::custom::api; + +use strict; +use warnings; +use centreon::plugins::http; +use centreon::plugins::statefile; +use JSON::XS; +use Digest::MD5 qw(md5_hex); + +sub new { + my ($class, %options) = @_; + my $self = {}; + bless $self, $class; + + if (!defined($options{output})) { + print "Class Custom: Need to specify 'output' argument.\n"; + exit 3; + } + if (!defined($options{options})) { + $options{output}->add_option_msg(short_msg => "Class Custom: Need to specify 'options' argument."); + $options{output}->option_exit(); + } + + if (!defined($options{noptions})) { + $options{options}->add_options(arguments => { + 'api-username:s' => { name => 'api_username' }, + 'api-password:s' => { name => 'api_password' }, + 'hostname:s' => { name => 'hostname' }, + 'port:s' => { name => 'port', default => 443 }, + 'proto:s' => { name => 'proto', default => 'https' }, + 'timeout:s' => { name => 'timeout', default => 30 }, + 'unknown-http-status:s' => { name => 'unknown_http_status', default => '%{http_code} < 200 or %{http_code} >= 300' }, + 'warning-http-status:s' => { name => 'warning_http_status' }, + 'critical-http-status:s' => { name => 'critical_http_status' } + }); + } + $options{options}->add_help(package => __PACKAGE__, sections => 'HPE PRIMERA API OPTIONS', once => 1); + + $self->{output} = $options{output}; + $self->{http} = centreon::plugins::http->new(%options, default_backend => 'curl'); + $self->{cache} = centreon::plugins::statefile->new(%options); + + return $self; +} + +sub set_options { + my ($self, %options) = @_; + + $self->{option_results} = $options{option_results}; +} + +sub set_defaults {} + +sub check_options { + my ($self, %options) = @_; + + if (centreon::plugins::misc::is_empty($self->{option_results}->{hostname})) { + $self->{output}->add_option_msg(short_msg => 'Need to specify --hostname option.'); + $self->{output}->option_exit(); + } + if (centreon::plugins::misc::is_empty($self->{option_results}->{api_username})) { + $self->{output}->add_option_msg(short_msg => 'Need to specify --api-username option.'); + $self->{output}->option_exit(); + } + if (centreon::plugins::misc::is_empty($self->{option_results}->{api_password})) { + $self->{output}->add_option_msg(short_msg => 'Need to specify --api-password option.'); + $self->{output}->option_exit(); + } + $self->{http}->set_options(%{$self->{option_results}}); + $self->{http}->add_header(key => 'Accept', value => 'application/json'); + + $self->{cache}->check_options(option_results => $self->{option_results}); + + return 0; +} + +sub get_connection_info { + my ($self, %options) = @_; + + return $self->{option_results}->{hostname} . ':' . $self->{option_results}->{port}; +} + +sub get_token { + my ($self, %options) = @_; + + my $has_cache_file = $self->{cache}->read(statefile => 'hpe_primera_' . md5_hex($self->get_connection_info() . '_' . $self->{option_results}->{api_username})); + my $auth_key = $self->{cache}->get(name => 'auth_key'); + + if ($has_cache_file == 0 || !defined($auth_key) || $auth_key eq '' ) { + my $json_request = { + user => $self->{option_results}->{api_username}, + password => $self->{option_results}->{api_password} + }; + my $encoded; + eval { + $encoded = encode_json($json_request); + }; + if ($@) { + $self->{output}->add_option_msg(short_msg => 'An error occurred while encoding the credentials to a JSON string.'); + $self->{output}->option_exit(); + } + + my $content = $self->{http}->request( + method => 'POST', + url_path => '/api/v1/credentials', + query_form_post => $encoded, + unknown_status => $self->{option_results}->{unknown_http_status}, + warning_status => $self->{option_results}->{warning_http_status}, + critical_status => $self->{option_results}->{critical_http_status}, + header => ['Content-Type: application/json'] + ); + + my $decoded; + eval { + $decoded = JSON::XS->new->utf8->decode($content); + }; + if ($@) { + $self->{output}->add_option_msg(short_msg => "An error occurred while decoding the response ('$content')."); + $self->{output}->option_exit(); + } + + $auth_key = $decoded->{key}; + my $data = { + updated => time(), + auth_key => $auth_key + }; + $self->{cache}->write(data => $data); + } + + return $auth_key; +} + +sub clean_token { + my ($self, %options) = @_; + + my $data = { updated => time() }; + $self->{cache}->write(data => $data); +} + +sub request_api { + my ($self, %options) = @_; + + my $get_param = []; + if (defined($options{get_param})) { + $get_param = $options{get_param}; + } + + my $token = $self->get_token(); + my ($content) = $self->{http}->request( + url_path => $options{endpoint}, + get_param => $get_param, + header => [ 'Authorization: Bearer ' . $token ], + unknown_status => '', + warning_status => '', + critical_status => '' + ); + + if (!defined($content) || $content eq '') { + $self->{output}->add_option_msg(short_msg => "API returns empty content [code: '" . $self->{http}->get_code() . "'] [message: '" . $self->{http}->get_message() . "']"); + $self->{output}->option_exit(); + } + + my $decoded; + eval { + $decoded = JSON::XS->new->allow_nonref(1)->utf8->decode($content); + }; + if ($@) { + $self->{output}->add_option_msg(short_msg => "Cannot decode response (add --debug option to display returned content)"); + $self->{output}->option_exit(); + } + + return $decoded; +} + +1; + +__END__ + +=head1 NAME + +HPE Primera REST API + +=head1 HPE Primera API OPTIONS + +HPE Primera REST API + +=over 8 + +=item B<--hostname> + +Address of the server that hosts the API. + +=item B<--port> + +Define the TCP port to use to reach the API (default: 443). + +=item B<--proto> + +Define the protocol to reach the API (default: 'https'). + +=item B<--api-username> + +Define the username for authentication. + +=item B<--api-password> + +Define the password associated with the username. + +=item B<--timeout> + +Define the timeout in seconds for HTTP requests (default: 30). + +=back + +=head1 DESCRIPTION + +B. + +=cut diff --git a/src/storage/hp/primera/restapi/mode/capacity.pm b/src/storage/hp/primera/restapi/mode/capacity.pm new file mode 100644 index 0000000000..edc4de550f --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/capacity.pm @@ -0,0 +1,241 @@ +# +# 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 storage::hp::primera::restapi::mode::capacity; + +use base qw(centreon::plugins::templates::counter); + +use strict; +use warnings; + +sub custom_space_usage_output { + my ($self, %options) = @_; + + my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{total}); + my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{used}); + my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{free}); + return sprintf( + 'space usage total: %s used: %s (%.2f%%) free: %s (%.2f%%)', + $total_size_value . " " . $total_size_unit, + $total_used_value . " " . $total_used_unit, $self->{result_values}->{prct_used}, + $total_free_value . " " . $total_free_unit, $self->{result_values}->{prct_free} + ); +} + +sub storage_long_output { + my ($self, %options) = @_; + + return sprintf( + "checking storage '%s'", + $options{instance_value}->{type} + ); +} + +sub prefix_storage_output { + my ($self, %options) = @_; + + return sprintf( + "storage '%s' ", + $options{instance_value}->{type} + ); +} + +sub set_counters { + my ($self, %options) = @_; + + $self->{maps_counters_type} = [ + { + name => 'storages', type => 3, cb_prefix_output => 'prefix_storage_output', cb_long_output => 'storage_long_output', indent_long_output => ' ', message_multiple => 'All storage capacities are ok', + group => [ + { name => 'space', type => 0 }, + { name => 'efficiency', type => 0, skipped_code => { -10 => 1 } } + ] + } + ]; + + $self->{maps_counters}->{space} = [ + { label => 'space-usage', nlabel => 'storage.space.usage.bytes', set => { + key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ], + closure_custom_output => $self->can('custom_space_usage_output'), + perfdatas => [ + { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1 } + ] + } + }, + { label => 'space-usage-free', nlabel => 'storage.space.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_space_usage_output'), + perfdatas => [ + { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1 } + ] + } + }, + { label => 'space-usage-prct', nlabel => 'storage.space.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_space_usage_output'), + perfdatas => [ + { template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1 } + ] + } + }, + { label => 'space-unavailable', nlabel => 'storage.space.unavailable.bytes', set => { + key_values => [ { name => 'unavailable' } ], + output_template => 'unavailable: %s %s', + output_change_bytes => 1, + perfdatas => [ + { template => '%s', unit => 'B', min => 0, label_extra_instance => 1 } + ] + } + }, + { label => 'space-failed', nlabel => 'storage.space.failed.bytes', set => { + key_values => [ { name => 'failed' } ], + output_template => 'failed: %s %s', + output_change_bytes => 1, + perfdatas => [ + { template => '%s', unit => 'B', min => 0, label_extra_instance => 1 } + ] + } + } + ]; + + $self->{maps_counters}->{efficiency} = [ + { label => 'compaction', nlabel => 'storage.space.compaction.ratio.count', set => { + key_values => [ { name => 'compaction' } ], + output_template => 'compaction: %s', + perfdatas => [ + { template => '%s', min => 0, label_extra_instance => 1 } + ] + } + }, + { label => 'deduplication', nlabel => 'storage.space.deduplication.ratio.count', set => { + key_values => [ { name => 'deduplication' } ], + output_template => 'deduplication: %s', + perfdatas => [ + { template => '%s', min => 0, label_extra_instance => 1 } + ] + } + }, + { label => 'compression', nlabel => 'storage.space.compression.ratio.count', set => { + key_values => [ { name => 'compression' } ], + output_template => 'compression: %s', + perfdatas => [ + { template => '%s', min => 0, label_extra_instance => 1 } + ] + } + }, + { label => 'data-reduction', nlabel => 'storage.space.data_reduction.ratio.count', set => { + key_values => [ { name => 'data_reduction' } ], + output_template => 'data reduction: %s', + perfdatas => [ + { template => '%s', min => 0, label_extra_instance => 1 } + ] + } + }, + { label => 'overprovisioning', nlabel => 'storage.space.overprovisioning.ratio.count', set => { + key_values => [ { name => 'overprovisioning' } ], + output_template => 'overprovisioning: %s', + perfdatas => [ + { template => '%s', min => 0, 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 => { + 'filter-type:s' => { name => 'filter_type' } + }); + + return $self; +} + +sub manage_selection { + my ($self, %options) = @_; + + my $response = $options{custom}->request_api( + endpoint => '/api/v1/capacity' + ); + + for my $type (keys %{$response}) { + next if (defined($self->{option_results}->{filter_type}) && $self->{option_results}->{filter_type} ne '' + && $type !~ /$self->{option_results}->{filter_type}/); + + my $total = $response->{$type}->{totalMiB} * 1024 * 1024; + my $free = $response->{$type}->{freeMiB} * 1024 * 1024; + my $unavailable = $response->{$type}->{unavailableCapacityMiB} * 1024 * 1024; + my $failed = $response->{$type}->{failedCapacityMiB} * 1024 * 1024; + + $self->{storages}->{$type} = { + type => $type, + space => { + total => $total, + free => $free, + used => $total - $free, + unavailable => $unavailable, + prct_used => ($total - $free) * 100 / $total, + prct_free => $free * 100 / $total, + failed => $failed + } + }; + + my $shortcut = $response->{$type}->{allocated}->{volumes}->{capacityEfficiency}; + + $self->{storages}->{$type}->{efficiency}->{compaction} = $shortcut->{compaction} if defined($shortcut->{compaction}); + $self->{storages}->{$type}->{efficiency}->{deduplication} = $shortcut->{deduplication} if defined($shortcut->{deduplication}); + $self->{storages}->{$type}->{efficiency}->{compression} = $shortcut->{compression} if defined($shortcut->{compression}); + $self->{storages}->{$type}->{efficiency}->{data_reduction} = $shortcut->{dataReduction} if defined($shortcut->{dataReduction}); + $self->{storages}->{$type}->{efficiency}->{overprovisioning} = $shortcut->{overProvisioning} if defined($shortcut->{overProvisioning}); + } + + if (scalar(keys %{$self->{storages}}) <= 0) { + $self->{output}->add_option_msg(short_msg => "Couldn't get capacity information"); + $self->{output}->option_exit(); + } +} + +1; + +__END__ + +=head1 MODE + +Check storage capacity per storage type. + +=over 8 + +=item B<--filter-type> + +Filter storage by type (regular expression). +The known types are: allCapacity, FCCapacity, SSDCapacity and NLCapacity. + +=item B<--warning-*> B<--critical-*> + +Thresholds that can apply to: +- Space oriented metrics: 'space-usage', 'space-usage-free', 'space-usage-prct', 'space-unavailable', 'space-failed', +- Storage optimization metrics: 'compaction', 'deduplication', 'compression', 'data-reduction', 'overprovisioning'. + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/mode/diskstatus.pm b/src/storage/hp/primera/restapi/mode/diskstatus.pm new file mode 100644 index 0000000000..1b3b9a7af9 --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/diskstatus.pm @@ -0,0 +1,288 @@ +# +# 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 storage::hp::primera::restapi::mode::diskstatus; + +use base qw(centreon::plugins::templates::counter); +use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); + +use strict; +use warnings; + +my %map_state = ( + 1 => 'normal', + 2 => 'degraded', + 3 => 'new', + 4 => 'failed', + 99 => 'unknown' +); + +sub custom_status_output { + my ($self, %options) = @_; + + return sprintf( + "Disk #%s (%s/%s, serial: %s) located %s is %s", + $self->{result_values}->{id}, + $self->{result_values}->{manufacturer}, + $self->{result_values}->{model}, + $self->{result_values}->{serial}, + $self->{result_values}->{position}, + $self->{result_values}->{status} + ); +} + +sub prefix_global_output { + my ($self, %options) = @_; + + return 'Disks '; +} + +sub set_counters { + my ($self, %options) = @_; + + $self->{maps_counters_type} = [ + { name => 'global', cb_prefix_output => 'prefix_global_output', type => 0 }, + { name => 'disks', type => 1, message_multiple => 'All disks are ok' } + ]; + + $self->{maps_counters}->{global} = [ + { label => 'disks-total', nlabel => 'disks.total.count', set => { + key_values => [ { name => 'total' } ], + output_template => 'total: %s', + perfdatas => [ + { template => '%s', min => 0 } + ] + } + }, + { label => 'disks-normal', nlabel => 'disks.normal.count', set => { + key_values => [ { name => 'normal' }, { name => 'total' } ], + output_template => 'normal: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + }, + { label => 'disks-degraded', nlabel => 'disks.degraded.count', set => { + key_values => [ { name => 'degraded' }, { name => 'total' } ], + output_template => 'degraded: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + }, + { label => 'disks-new', nlabel => 'disks.new.count', set => { + key_values => [ { name => 'new' }, { name => 'total' } ], + output_template => 'new: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + }, + { label => 'disks-failed', nlabel => 'disks.failed.count', set => { + key_values => [ { name => 'failed' }, { name => 'total' } ], + output_template => 'failed: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + }, + { label => 'disks-unknown', nlabel => 'disks.unknown.count', set => { + key_values => [ { name => 'unknown' }, { name => 'total' } ], + output_template => 'unknown: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + } + ]; + $self->{maps_counters}->{disks} = [ + { + label => 'status', + type => 2, + warning_default => '%{status} =~ /^(new|degraded|unknown)$/', + critical_default => '%{status} =~ /failed/', + unknown_default => '%{status} =~ /NOT_DOCUMENTED$/', + set => { + key_values => [ { name => 'status' }, { name => 'id' }, { name => 'manufacturer' }, { name => 'model' }, { name => 'serial' }, { name => 'position' } ], + closure_custom_output => $self->can('custom_status_output'), + closure_custom_perfdata => sub { return 0; }, + closure_custom_threshold_check => \&catalog_status_threshold_ng + } + } + ]; +} + +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-id:s' => { name => 'filter_id' }, + 'filter-manufacturer:s' => { name => 'filter_manufacturer' }, + 'filter-model:s' => { name => 'filter_model' }, + 'filter-position:s' => { name => 'filter_position' }, + 'filter-serial:s' => { name => 'filter_serial' } + }); + + return $self; +} + +sub manage_selection { + my ($self, %options) = @_; + + my $api_response = $options{custom}->request_api( + endpoint => '/api/v1/disks' + ); + + my $disks = $api_response->{members}; + + $self->{global} = { + total => 0, + normal => 0, + degraded => 0, + new => 0, + failed => 0, + unknown => 0 + }; + + + + for my $disk (@{$disks}) { + + my $disk_intro = "disk #" . $disk->{id} . " (" . $disk->{manufacturer} . "/" . $disk->{model} + . ", serial: " . $disk->{serialNumber} . ") located '" . $disk->{position}; + # skip if filtered by id + if (defined($self->{option_results}->{filter_id}) + and $self->{option_results}->{filter_id} ne '' + and $disk->{id} !~ /$self->{option_results}->{filter_id}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the id does not match the filter.", debug => 1); + next; + } + # skip if filtered by manufacturer + if (defined($self->{option_results}->{filter_manufacturer}) + and $self->{option_results}->{filter_manufacturer} ne '' + and $disk->{manufacturer} !~ /$self->{option_results}->{filter_manufacturer}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the manufacturer does not match the filter.", debug => 1); + next; + } + # skip if filtered by model + if (defined($self->{option_results}->{filter_model}) + and $self->{option_results}->{filter_model} ne '' + and $disk->{model} !~ /$self->{option_results}->{filter_model}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the model does not match the filter.", debug => 1); + next; + } + # skip if filtered by position + if (defined($self->{option_results}->{filter_position}) + and $self->{option_results}->{filter_position} ne '' + and $disk->{position} !~ /$self->{option_results}->{filter_position}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the position does not match the filter.", debug => 1); + next; + } + # skip if filtered by serial + if (defined($self->{option_results}->{filter_serial}) + and $self->{option_results}->{filter_serial} ne '' + and $disk->{serial} !~ /$self->{option_results}->{filter_serial}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the serial does not match the filter.", debug => 1); + next; + } + + my $state = defined($map_state{$disk->{state}}) ? $map_state{$disk->{state}} : 'NOT_DOCUMENTED'; + + # increment adequate global counters + $self->{global}->{total} = $self->{global}->{total} + 1; + $self->{global}->{$state} = $self->{global}->{$state} + 1; + + # add the instance + $self->{disks}->{ $disk->{id} } = { + status => $state, + position => $disk->{position}, + id => $disk->{id}, + manufacturer => $disk->{manufacturer}, + model => $disk->{model}, + serial => $disk->{serialNumber} + }; + } +} + +1; + +__END__ + +=head1 MODE + +Monitor the states of the physical disks. + +=over 8 + +=item B<--filter-id> + +Define which disks should be monitored based on their IDs. +This option will be treated as a regular expression. + +=item B<--filter-manufacturer> + +Define which volumes should be monitored based on the disk manufacturer. +This option will be treated as a regular expression. + +=item B<--filter-model> + +Define which volumes should be monitored based on the disk model. +This option will be treated as a regular expression. + +=item B<--filter-serial> + +Define which volumes should be monitored based on the disk serial number. +This option will be treated as a regular expression. + +=item B<--filter-position> + +Define which volumes should be monitored based on the disk position. +The position is composed of 3 integers, separated by colons: +- Cage number where the physical disk is in. +- Magazine number where the physical disk is in. +- For DC4 cages, disk position within the magazine. For non-DC4 cages, 0. +Example: 7:5:0 +This option will be treated as a regular expression. + +=item B<--warning-status> + +Define the condition to match for the returned status to be WARNING. +Default: '%{status} =~ /^(new|degraded|unknown)$/' + +=item B<--critical-status> + +Define the condition to match for the returned status to be CRITICAL. +Default: '%{status} =~ /failed/' + +=item B<--unknown-status> + +Define the condition to match for the returned status to be UNKNOWN. +Default: '%{status} =~ /NOT_DOCUMENTED$/' + +=item B<--warning-*> B<--critical-*> + +Thresholds. '*' may stand for 'disks-total', 'disks-normal', 'disks-degraded', 'disks-new', +'disks-failed', 'disks-unknown'. + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/mode/diskusage.pm b/src/storage/hp/primera/restapi/mode/diskusage.pm new file mode 100644 index 0000000000..a7e897f13f --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/diskusage.pm @@ -0,0 +1,304 @@ +# +# 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 storage::hp::primera::restapi::mode::diskusage; + +use base qw(centreon::plugins::templates::counter); + +use strict; +use warnings; + +sub custom_usage_output { + my ($self, %options) = @_; + + my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{total}); + my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{used}); + my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{free}); + return sprintf( + "Used: %s of %s (%.2f%%) Free: %s (%.2f%%)", + $total_used_value . " " . $total_used_unit, + $total_size_value . " " . $total_size_unit, + $self->{result_values}->{prct_used}, + $total_free_value . " " . $total_free_unit, + $self->{result_values}->{prct_free} + ); +} + +sub custom_global_total_usage_output { + my ($self, %options) = @_; + + my ($used_human, $used_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{used}); + my ($total_human, $total_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{total}); + my $msg = "Total Used: $used_human $used_unit / $total_human $total_unit" ; + + return $msg; +} + +sub custom_global_total_free_output { + my ($self, %options) = @_; + + my ($free_human, $free_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{free}); + my $msg = "Total Free: $free_human $free_unit" ; + + return $msg; +} + + +sub set_counters { + my ($self, %options) = @_; + + $self->{maps_counters_type} = [ + { name => 'global', type => 0 }, + { name => 'disk', type => 1, cb_prefix_output => 'prefix_disk_output', message_multiple => 'All disks are ok' }, + ]; + $self->{maps_counters}->{global} = [ + { + label => 'total-usage', + nlabel => 'disks.total.space.usage.bytes', + set => { + key_values => [ { name => 'used' }, { name => 'total' } ], + closure_custom_output => $self->can('custom_global_total_usage_output'), + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + }, + { + label => 'total-usage-prct', + nlabel => 'disks.total.space.usage.percent', + set => { + key_values => [ { name => 'used_prct' }], + output_template => 'Total percentage used: %.2f %%', + perfdatas => [ + { template => '%s', uom => '%', min => 0, max => 100 } + ] + } + }, + { + label => 'total-free', + nlabel => 'disks.total.space.free.bytes', + set => { + key_values => [ { name => 'free' }, { name => 'total' } ], + closure_custom_output => $self->can('custom_global_total_free_output'), + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + } + ]; + $self->{maps_counters}->{disk} = [ + { label => 'usage', nlabel => 'disk.space.usage.bytes', set => { + key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'id' }, { name => 'position' }, { name => 'manufacturer' }, { name => 'model' }, { name => 'serial' } ], + closure_custom_output => $self->can('custom_usage_output'), + perfdatas => [ + { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'id' } + ] + } + }, + { label => 'usage-free', display_ok => 0, nlabel => 'disk.space.free.bytes', set => { + key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'id' }, { name => 'position' }, { name => 'manufacturer' }, { name => 'model' }, { name => 'serial' } ], + closure_custom_output => $self->can('custom_usage_output'), + perfdatas => [ + { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'id' } + ] + } + }, + { label => 'usage-prct', display_ok => 0, nlabel => 'disk.space.usage.percentage', set => { + key_values => [ { name => 'prct_used' }, { name => 'id' }, { name => 'position' }, { name => 'manufacturer' }, { name => 'model' }, { name => 'serial' } ], + output_template => 'Used : %.2f %%', + perfdatas => [ + { template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'id' } + ] + } + } + ]; +} + +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-id:s' => { name => 'filter_id' }, + 'filter-manufacturer:s' => { name => 'filter_manufacturer' }, + 'filter-model:s' => { name => 'filter_model' }, + 'filter-serial:s' => { name => 'filter_serial' }, + 'filter-position:s' => { name => 'filter_position' }, + }); + + return $self; +} + +sub prefix_disk_output { + my ($self, %options) = @_; + + #return "Disk '" . $options{instance_value}->{display} . "' "; + return sprintf( + "Disk #%s (%s/%s, serial: %s) located %s has ", + $options{instance_value}->{id}, + $options{instance_value}->{manufacturer}, + $options{instance_value}->{model}, + $options{instance_value}->{serial}, + $options{instance_value}->{position} + ); +} + +sub manage_selection { + my ($self, %options) = @_; + + my $response = $options{custom}->request_api( + endpoint => '/api/v1/disks' + ); + my $disks = $response->{members}; + + $self->{global} = { + total => 0, + free => 0, + used => 0, + used_prct => 0 + }; + $self->{disk} = {}; + + for my $disk (@{$disks}) { + + my $disk_intro = "disk #" . $disk->{id} . " (" . $disk->{manufacturer} . "/" . $disk->{model} + . ", serial: " . $disk->{serialNumber} . ") located '" . $disk->{position}; + + # skip if filtered by id + if (defined($self->{option_results}->{filter_id}) + and $self->{option_results}->{filter_id} ne '' + and $disk->{id} !~ /$self->{option_results}->{filter_id}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the id does not match the filter.", debug => 1); + next; + } + # skip if filtered by manufacturer + if (defined($self->{option_results}->{filter_manufacturer}) + and $self->{option_results}->{filter_manufacturer} ne '' + and $disk->{manufacturer} !~ /$self->{option_results}->{filter_manufacturer}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the manufacturer does not match the filter.", debug => 1); + next; + } + # skip if filtered by model + if (defined($self->{option_results}->{filter_model}) + and $self->{option_results}->{filter_model} ne '' + and $disk->{model} !~ /$self->{option_results}->{filter_model}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the model does not match the filter.", debug => 1); + next; + } + # skip if filtered by position + if (defined($self->{option_results}->{filter_position}) + and $self->{option_results}->{filter_position} ne '' + and $disk->{position} !~ /$self->{option_results}->{filter_position}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the position does not match the filter.", debug => 1); + next; + } + # skip if filtered by serial + if (defined($self->{option_results}->{filter_serial}) + and $self->{option_results}->{filter_serial} ne '' + and $disk->{serial} !~ /$self->{option_results}->{filter_serial}/) { + $self->{output}->output_add(long_msg => "Skipping $disk_intro because the serial does not match the filter.", debug => 1); + next; + } + + my $total = $disk->{totalSizeMiB} * 1024 * 1024; + my $free = $disk->{freeSizeMiB} * 1024 * 1024; + my $used = $total - $free; + + $self->{global}->{total} = $self->{global}->{total} + $total; + $self->{global}->{free} = $self->{global}->{free} + $free; + $self->{global}->{used} = $self->{global}->{used} + $used; + + $self->{disk}->{$disk->{id}} = { + id => $disk->{id}, + total => $total, + used => $used, + free => $free, + prct_used => $used * 100 / $total, + prct_free => $free * 100 / $total, + manufacturer => $disk->{manufacturer}, + model => $disk->{model}, + serial => $disk->{serialNumber}, + position => $disk->{position} + }; + } + + $self->{global}->{used_prct} = $self->{global}->{used} * 100 / $self->{global}->{total} if ($self->{global}->{total} > 0); + + if (scalar(keys %{$self->{disk}}) <= 0) { + $self->{output}->add_option_msg(short_msg => "No disk found."); + $self->{output}->option_exit(); + } +} + +1; + +__END__ + +=head1 MODE + +Check disk usage. + +=over 8 + +=item B<--filter-counters> + +Define which counters (filtered by regular expression) should be monitored. +Example: --filter-counters='^usage$' + +=item B<--filter-id> + +Define which disks should be monitored based on their IDs. +This option will be treated as a regular expression. + +=item B<--filter-manufacturer> + +Define which volumes should be monitored based on the disk manufacturer. +This option will be treated as a regular expression. + +=item B<--filter-model> + +Define which volumes should be monitored based on the disk model. +This option will be treated as a regular expression. + +=item B<--filter-serial> + +Define which volumes should be monitored based on the disk serial number. +This option will be treated as a regular expression. + +=item B<--filter-position> + +Define which volumes should be monitored based on the disk position. +The position is composed of 3 integers, separated by colons: +- Cage number where the physical disk is in. +- Magazine number where the physical disk is in. +- For DC4 cages, disk position within the magazine. For non-DC4 cages, 0. +Example: 7:5:0 +This option will be treated as a regular expression. + +=item B<--warning-*> B<--critical-*> + +Thresholds for disk usage metrics. * may be replaced with: +- For individual disks: 'usage' (B), 'usage-free' (B), 'usage-prct' (%). +- For global statistics: 'total-usage' (B), 'total-free' (B), 'total-usage-prct' (%). + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/mode/licenses.pm b/src/storage/hp/primera/restapi/mode/licenses.pm new file mode 100644 index 0000000000..becd06b5d3 --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/licenses.pm @@ -0,0 +1,208 @@ +# +# 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 storage::hp::primera::restapi::mode::licenses; + +use base qw(centreon::plugins::templates::counter); + +use strict; +use warnings; + +sub custom_license_output { + my ($self, %options) = @_; + + my $message; + if (!defined($self->{result_values}->{expires_seconds})) { + $message = $self->{result_values}->{name} . ' has permanent license'; + } elsif ($self->{result_values}->{expires_seconds} == 0) { + $message = sprintf( + "%s license has expired.", + $self->{result_values}->{name} + ); + } else { + $message = sprintf( + "%s license expires in %s.", + $self->{result_values}->{name}, + centreon::plugins::misc::change_seconds(value => $self->{result_values}->{expires_seconds}) + ); + } + + return $message; +} + +sub custom_license_perfdata { + my ($self, %options) = @_; + + return if ($self->{result_values}->{expires_seconds} eq 'permanent'); + + $self->{output}->perfdata_add( + nlabel => $self->{nlabel}, + unit => 's', + instances => $self->{result_values}->{name}, + value => $self->{result_values}->{expires_seconds}, + 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_license_threshold { + my ($self, %options) = @_; + + return 'ok' if (!defined($self->{result_values}->{expires_seconds})); + return $self->{perfdata}->threshold_check( + value => $self->{result_values}->{expires_seconds}, + threshold => [ + { label => 'critical-' . $self->{thlabel}, exit_litteral => 'critical' }, + { label => 'warning-' . $self->{thlabel}, exit_litteral => 'warning' } + ] + ); +} + +sub prefix_license_output { + my ($self, %options) = @_; + + return "License '" . $options{instance_value}->{name} . "' expires: " . $options{instance_value}->{expiration_human} . ". "; +} +sub set_counters { + my ($self, %options) = @_; + + $self->{maps_counters_type} = [ + { name => 'global', type => 0 }, + { name => 'license_expiration', type => 1, cb_prefix_output => 'prefix_license_output', message_multiple => 'All licenses are ok'} #, cb_prefix_output => 'prefix_license_output' + ]; + + $self->{maps_counters}->{global} = [ + { + label => 'total', + nlabel => 'licenses.total.count', + set => { + key_values => [ { name => 'total' } ], + output_template => 'Number of licenses: %s', + perfdatas => [ + { template => '%s', min => 0 } + ] + } + }, + { + label => 'expired', + nlabel => 'licenses.expired.count', + set => { + key_values => [ { name => 'expired' }, { name => 'total' } ], + output_template => 'Number of expired licenses: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + } + ]; + $self->{maps_counters}->{license_expiration} = [ + { label => 'license-expiration', nlabel => 'license.expiration.seconds', set => { + key_values => [ { name => 'name' }, { name => 'expires_seconds' }, { name => 'expiration_status' }, { name => 'expiration_human' }], + closure_custom_output => $self->can('custom_license_output'), + closure_custom_perfdata => $self->can('custom_license_perfdata'), + closure_custom_threshold_check => $self->can('custom_license_threshold') + } + } + ]; +} + +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-name:s' => { name => 'filter_name' } + }); + + return $self; +} + +sub manage_selection { + my ($self, %options) = @_; + + my $response = $options{custom}->request_api( + endpoint => '/api/v1/system' + ); + my $licenses = $response->{licenseInfo}->{licenses}; + + my ($total_licenses, $expired_licenses) = (0, 0); + for my $license_item (@{$licenses}) { + # skip if filter does not match + next if (defined($self->{option_results}->{filter_name}) + and $self->{option_results}->{filter_name} ne '' + and $license_item->{name} !~ /$self->{option_results}->{filter_name}/); + + $total_licenses = $total_licenses + 1; + $self->{license_expiration}->{$license_item->{name}} = { + name => $license_item->{name}, + expiration_human => defined($license_item->{expiryTime8601}) ? $license_item->{expiryTime8601} : 'never' + }; + + my $license_status = 'valid'; + if (defined($license_item->{expiryTimeSec})) { + if ($license_item->{expiryTimeSec} > time()) { + $self->{license_expiration}->{$license_item->{name}}->{expires_seconds} = $license_item->{expiryTimeSec} - time(); + } else { + $self->{license_expiration}->{$license_item->{name}}->{expires_seconds} = 0; + $license_status = 'expired'; + $expired_licenses = $expired_licenses + 1; + } + } + $self->{license_expiration}->{$license_item->{name}}->{expiration_status} = $license_status; + } + $self->{global} = { + total => $total_licenses, + expired => $expired_licenses + }; + + if (scalar(keys %{$self->{license_expiration}}) <= 0) { + $self->{output}->add_option_msg(short_msg => "Couldn't get information about licenses"); + $self->{output}->option_exit(); + } +} + +1; + +__END__ + +=head1 MODE + +Check storage capacities. + +=over 8 + +=item B<--filter-name> + +Filter licenses by name (regular expression). + +=item B<--warning-*> B<--critical-*> + +Thresholds for counters and license validity remaining time in seconds. +* may be replaced with: + +'total': applies to the total number of licenses. +'expired': applies to the number of expired licenses. +'license-expiration': applies to the remaining time in seconds until the licenses will expire. + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/mode/listdisks.pm b/src/storage/hp/primera/restapi/mode/listdisks.pm new file mode 100644 index 0000000000..4f74e81e62 --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/listdisks.pm @@ -0,0 +1,111 @@ +# +# 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 storage::hp::primera::restapi::mode::listdisks; + +use strict; +use warnings; + +use base qw(centreon::plugins::mode); + +sub new { + my ($class, %options) = @_; + my $self = $class->SUPER::new(package => __PACKAGE__, %options); + bless $self, $class; + + return $self; +} + +sub check_options { + my ($self, %options) = @_; + $self->SUPER::init(%options); +} + +sub run { + my ($self, %options) = @_; + + my $response = $options{custom}->request_api( endpoint => '/api/v1/disks' ); + my $disks = $response->{members}; + + $self->{disks} = []; + + for my $disk (@{$disks}) { + push @{$self->{disks}}, { + id => $disk->{id}, + position => $disk->{position}, + size => $disk->{totalSizeMiB}, + manufacturer => $disk->{manufacturer}, + model => $disk->{model}, + serial => $disk->{serialNumber} + }; + $self->{output}->output_add( + long_msg => sprintf( + "[id: %s][position: %s][size: %s][manufacturer: %s][model: %s][serial: %s]", + $disk->{id}, + $disk->{position}, + $disk->{totalSizeMiB}, + $disk->{manufacturer}, + $disk->{model}, + $disk->{serialNumber} + ) + ); + } + + if (!defined($options{disco_show})) { + $self->{output}->output_add(severity => 'OK', short_msg => 'Disks:'); + $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1); + } +} + +sub disco_format { + my ($self, %options) = @_; + + $self->{output}->add_disco_format(elements => [ 'id', 'position','size', 'manufacturer', 'model', 'serial' ]); +} + +sub disco_show { + my ($self, %options) = @_; + + $options{disco_show} = 1; + $self->run(%options); + + for my $disk (@{$self->{disks}}) { + $self->{output}->add_disco_entry( + id => $disk->{id}, + position => $disk->{position}, + size => $disk->{size}, + manufacturer => $disk->{manufacturer}, + model => $disk->{model}, + serial => $disk->{serial} + ); + } +} + +1; + +__END__ + +=head1 MODE + +List physical disks using the HPE Primera REST API. + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/mode/listvolumes.pm b/src/storage/hp/primera/restapi/mode/listvolumes.pm new file mode 100644 index 0000000000..fe34a14546 --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/listvolumes.pm @@ -0,0 +1,105 @@ +# +# 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 storage::hp::primera::restapi::mode::listvolumes; + +use strict; +use warnings; + +use base qw(centreon::plugins::mode); + +sub new { + my ($class, %options) = @_; + my $self = $class->SUPER::new(package => __PACKAGE__, %options); + bless $self, $class; + + return $self; +} + +sub check_options { + my ($self, %options) = @_; + $self->SUPER::init(%options); +} + +sub run { + my ($self, %options) = @_; + + my $response = $options{custom}->request_api( endpoint => '/api/v1/volumes' ); + my $volumes = $response->{members}; + + $self->{volumes} = []; + + for my $disk (@{$volumes}) { + push @{$self->{volumes}}, { + id => $disk->{id}, + name => $disk->{name}, + size => $disk->{sizeMiB}, + state => $disk->{state} + }; + $self->{output}->output_add( + long_msg => sprintf( + "[id: %s][name: %s][size: %s][state: %s]", + $disk->{id}, + $disk->{name}, + $disk->{sizeMiB}, + $disk->{state} + ) + ); + } + + if (!defined($options{disco_show})) { + $self->{output}->output_add(severity => 'OK', short_msg => 'Volumes:'); + $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1); + } +} + +sub disco_format { + my ($self, %options) = @_; + + $self->{output}->add_disco_format(elements => [ 'id', 'name','size', 'state' ]); +} + +sub disco_show { + my ($self, %options) = @_; + + $options{disco_show} = 1; + $self->run(%options); + + for my $disk (@{$self->{volumes}}) { + $self->{output}->add_disco_entry( + id => $disk->{id}, + name => $disk->{name}, + size => $disk->{size}, + state => $disk->{state} + ); + } +} + +1; + +__END__ + +=head1 MODE + +List physical volumes using the HPE Primera REST API. + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/mode/nodes.pm b/src/storage/hp/primera/restapi/mode/nodes.pm new file mode 100644 index 0000000000..5c4b257010 --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/nodes.pm @@ -0,0 +1,215 @@ +# +# 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 storage::hp::primera::restapi::mode::nodes; + +use base qw(centreon::plugins::templates::counter); + +use strict; +use warnings; +use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold catalog_status_calc catalog_status_threshold_ng); + +sub custom_node_output { + my ($self, %options) = @_; + + return sprintf( + "node %s is %s", + $self->{result_values}->{id}, + $self->{result_values}->{status} + ); +} + +sub set_counters { + my ($self, %options) = @_; + + $self->{maps_counters_type} = [ + { name => 'global', type => 0, skipped_code => { -10 => 1 } }, + { name => 'nodes', type => 1, message_multiple => 'All nodes are online.' }, + ]; + + $self->{maps_counters}->{global} = [ + { + label => 'total', + nlabel => 'nodes.total.count', + set => { + key_values => [ { name => 'total' } ], + output_template => 'Total number of nodes: %s', + perfdatas => [ + { template => '%s', min => 0 } + ] + } + }, + { + label => 'online', + nlabel => 'nodes.online.count', + set => { + key_values => [ { name => 'online' }, { name => 'total' } ], + output_template => 'Number of online nodes: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + }, + { + label => 'offline', + nlabel => 'nodes.offline.count', + set => { + key_values => [ { name => 'offline' }, { name => 'total' } ], + output_template => 'Number of offline nodes: %s', + perfdatas => [ + { template => '%s', min => 0, max => 'total' } + ] + } + } + ]; + + $self->{maps_counters}->{nodes} = [ + { + label => 'node-status', + type => 2, + warning_default => '%{status} !~ /^online$/', + set => { + key_values => [ { name => 'status' }, { name => 'id' } ], + closure_custom_output => $self->can('custom_node_output'), + closure_custom_perfdata => sub { return 0; }, + closure_custom_threshold_check => \&catalog_status_threshold_ng + } + } + ]; +} + +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-node:s' => { name => 'filter_node' } + }); + + return $self; +} + +sub check_options { + my ($self, %options) = @_; + $self->SUPER::check_options(%options); +} + + +sub manage_selection { + my ($self, %options) = @_; + + my $response = $options{custom}->request_api( + endpoint => '/api/v1/system' + ); + my $total_nodes = 0; + my $online_nodes = 0; + my $offline_nodes = 0; + + # Typical content of onlineNodes is [0, 1] + # This is the list of the nodes that are currently connected + # Each number is the ID of a node + # %online_nodes_statuses associates 'online' to every online node with the node ID as key. + # Example {'0' => 'online', '1' => 'online'} if both nodes are online (corresponding to input [0, 1]) + # Example {'0' => 'online'} if only the node of ID 0 is online (corresponding to input [0]) + my %online_nodes_statuses = map { $_ => 'online' } @{ $response->{onlineNodes} }; + + # Typical content of clusterNodes is [0, 1] + # %all_nodes_statuses uses this data and the data from %online_nodes_statuses to give the status of all nodes + # Example: {[0] => 'online', [1] => 'offline'} + my %all_nodes_statuses = map {$_ => defined($online_nodes_statuses{$_}) ? $online_nodes_statuses{$_} : 'offline'} @{ $response->{clusterNodes} }; + + for my $node (keys(%all_nodes_statuses)) { + next if (defined($self->{option_results}->{filter_node}) + and $self->{option_results}->{filter_node} ne '' + and $node !~ /$self->{option_results}->{filter_node}/); + + $total_nodes = $total_nodes + 1; + if ($all_nodes_statuses{$node} eq 'online') { + $online_nodes = $online_nodes + 1; + } else { + $offline_nodes = $offline_nodes + 1; + } + + + $self->{nodes}->{$node} = { + id => $node, + status => $all_nodes_statuses{$node} + } + } + $self->{global} = { + total => $total_nodes, + online => $online_nodes, + offline => $offline_nodes + } +} + +1; + +__END__ + +=head1 MODE + +Check if the configured nodes of the HPE Primera cluster are all online. + +=over 8 + +=item B<--filter-node> + +Define which nodes (filtered by regular expression) should be monitored. +Example: --filter-node='^(0|1)$' + +=item B<--warning-node-status> + +Define the conditions to match for the status to be WARNING. (default: '%{status} ne "online"'). +You can use the %{status} variables. + +=item B<--critical-node-status> + +Define the conditions to match for the status to be CRITICAL +You can use the %{status} variables. + +=item B<--warning-total> + +Thresholds for the total number of nodes. + +=item B<--critical-total> + +Thresholds for the total number of nodes. + +=item B<--warning-online> + +Thresholds for the number of online nodes. + +=item B<--critical-online> + +Thresholds for the number of online nodes. + +=item B<--warning-offline> + +Thresholds for the number of offline nodes. + +=item B<--critical-offline> + +Thresholds for the number of offline nodes. + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/mode/volumeusage.pm b/src/storage/hp/primera/restapi/mode/volumeusage.pm new file mode 100644 index 0000000000..87eff75109 --- /dev/null +++ b/src/storage/hp/primera/restapi/mode/volumeusage.pm @@ -0,0 +1,174 @@ +# +# 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 storage::hp::primera::restapi::mode::volumeusage; + +use base qw(centreon::plugins::templates::counter); + +use strict; +use warnings; + +sub custom_usage_output { + my ($self, %options) = @_; + + my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{total}); + my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{used}); + my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{free}); + return sprintf( + "Usage Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", + $total_size_value . " " . $total_size_unit, + $total_used_value . " " . $total_used_unit, $self->{result_values}->{prct_used}, + $total_free_value . " " . $total_free_unit, $self->{result_values}->{prct_free} + ); +} + +sub set_counters { + my ($self, %options) = @_; + + $self->{maps_counters_type} = [ + { name => 'volume', type => 1, cb_prefix_output => 'prefix_volume_output', message_multiple => 'All volumes are ok' }, + ]; + + $self->{maps_counters}->{volume} = [ + { label => 'usage', nlabel => 'volume.space.usage.bytes', set => { + key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'name' }, { name => 'id' } ], + closure_custom_output => $self->can('custom_usage_output'), + perfdatas => [ + { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'name' } + ] + } + }, + { label => 'usage-free', display_ok => 0, nlabel => 'volume.space.free.bytes', set => { + key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, , { name => 'name' }, { name => 'id' } ], + closure_custom_output => $self->can('custom_usage_output'), + perfdatas => [ + { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1, label_extra_instance => 1, instance_use => 'name' } + ] + } + }, + { label => 'usage-prct', display_ok => 0, nlabel => 'volume.space.usage.percentage', set => { + key_values => [ { name => 'prct_used' }, { name => 'name' }, { name => 'id' } ], + output_template => 'Used : %.2f %%', + perfdatas => [ + { template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'name' } + ] + } + } + ]; +} + +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-id:s' => { name => 'filter_id' }, + 'filter-name:s' => { name => 'filter_name' } + }); + + return $self; +} + +sub prefix_volume_output { + my ($self, %options) = @_; + + return "Volume '" . $options{instance_value}->{name} . "' (#" . $options{instance_value}->{id} . ") "; +} + +sub manage_selection { + my ($self, %options) = @_; + + my $response = $options{custom}->request_api(endpoint => '/api/v1/volumes'); + my $volumes = $response->{members}; + $self->{volume} = {}; + + for my $volume (@{$volumes}) { + my $name = $volume->{name}; + my $id = $volume->{id}; + + if (defined($self->{option_results}->{filter_name}) and $self->{option_results}->{filter_name} ne '' and + $name !~ /$self->{option_results}->{filter_name}/) { + $self->{output}->output_add(long_msg => "Skipping volume named '" . $name . "': not matching filter /" . $self->{option_results}->{filter_name} . "/.", debug => 1); + next; + } + if (defined($self->{option_results}->{filter_id}) and $self->{option_results}->{filter_id} ne '' and + $id !~ /$self->{option_results}->{filter_id}/) { + $self->{output}->output_add(long_msg => "Skipping volume #" . $id . ": not matching filter /" . $self->{option_results}->{filter_id} . "/.", debug => 1); + next; + } + + my $total = $volume->{sizeMiB} * 1024 * 1024; + my $snap_used = $volume->{snapshotSpace}->{usedMiB}; + my $adm_used = $volume->{adminSpace}->{usedMiB}; + my $usr_used = $volume->{userSpace}->{usedMiB}; + + my $used = ($snap_used + $adm_used + $usr_used) * 1024 * 1024; + $self->{volume}->{$name} = { + id => $id, + name => $name, + total => $total, + used => $used, + free => ($total - $used) >= 0 ? ($total - $used) : 0, + prct_used => $used * 100 / $total, + prct_free => (100 - ($used * 100 / $total) >= 0) ? (100 - ($used * 100 / $total)) : 0 + }; + } + + if (scalar(keys %{$self->{volume}}) <= 0) { + $self->{output}->add_option_msg(short_msg => "No volume found."); + $self->{output}->option_exit(); + } +} + +1; + +__END__ + +=head1 MODE + +Check volume usage. + +=over 8 + +=item B<--filter-counters> + +Define which counters (filtered by regular expression) should be monitored. +Example: --filter-counters='^usage$' + +=item B<--filter-id> + +Define which volumes should be monitored based on their IDs. +This option will be treated as a regular expression. + +=item B<--filter-name> + +Define which volumes should be monitored based on the volume names. +This option will be treated as a regular expression. + +=item B<--warning-*> B<--critical-*> + +Thresholds for volume usage metrics. +* may be replaced with: +'usage' (B), 'usage-free' (B), 'usage-prct' (%). + +=back + +=cut diff --git a/src/storage/hp/primera/restapi/plugin.pm b/src/storage/hp/primera/restapi/plugin.pm new file mode 100644 index 0000000000..7f4a2b1820 --- /dev/null +++ b/src/storage/hp/primera/restapi/plugin.pm @@ -0,0 +1,55 @@ +# +# 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 storage::hp::primera::restapi::plugin; + +use strict; +use warnings; +use base qw(centreon::plugins::script_custom); + +sub new { + my ($class, %options) = @_; + my $self = $class->SUPER::new(package => __PACKAGE__, %options); + bless $self, $class; + + $self->{modes} = { + 'capacity' => 'storage::hp::primera::restapi::mode::capacity', + 'disk-status' => 'storage::hp::primera::restapi::mode::diskstatus', + 'disk-usage' => 'storage::hp::primera::restapi::mode::diskusage', + 'licenses' => 'storage::hp::primera::restapi::mode::licenses', + 'list-disks' => 'storage::hp::primera::restapi::mode::listdisks', + 'list-volumes' => 'storage::hp::primera::restapi::mode::listvolumes', + 'nodes' => 'storage::hp::primera::restapi::mode::nodes', + 'volume-usage' => 'storage::hp::primera::restapi::mode::volumeusage', + }; + + $self->{custom_modes}->{api} = 'storage::hp::primera::restapi::custom::api'; + return $self; +} + +1; + +__END__ + +=head1 PLUGIN DESCRIPTION + +Monitor HPE Primera storage controller. + +=cut diff --git a/tests/resources/import.resource b/tests/resources/import.resource index ce5505009a..ad856b220a 100644 --- a/tests/resources/import.resource +++ b/tests/resources/import.resource @@ -1,5 +1,6 @@ *** Settings *** -Documentation This is the documentation for the import resource file. +Documentation This is the documentation for the import resource file. + Library Examples Library OperatingSystem Library String diff --git a/tests/resources/resources.resource b/tests/resources/resources.resource index 542c4ef90f..aa5d4191b9 100644 --- a/tests/resources/resources.resource +++ b/tests/resources/resources.resource @@ -1,12 +1,19 @@ *** Settings *** Documentation Centreon Plugins for Robot Framework + Library Process + *** Variables *** -${CENTREON_PLUGINS} perl ${CURDIR}${/}..${/}..${/}src${/}centreon_plugins.pl +${CENTREON_PLUGINS} perl ${CURDIR}${/}..${/}..${/}src${/}centreon_plugins.pl # one we use package, we need to remove the "perl" part to be sure the plugin is executable and is correctly formated # with a shebang at the top. -${PERCENT} % +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${SNMPPORT} 2024 +${SNMPVERSION} 2c +${PERCENT} % + *** Keywords *** Start Mockoon @@ -19,5 +26,17 @@ Start Mockoon ... --port ... 3000 Sleep 10s + Stop Mockoon - Terminate All Processes \ No newline at end of file + Terminate All Processes + +Ctn Run Command And Check Result As Strings + [Arguments] ${command} ${expected_result} + ${output} Run ${command} + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${expected_result} + ... ${output} + ... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True \ No newline at end of file diff --git a/tests/resources/spellcheck/stopwords.t b/tests/resources/spellcheck/stopwords.t index e2257eb37a..093d7da030 100644 --- a/tests/resources/spellcheck/stopwords.t +++ b/tests/resources/spellcheck/stopwords.t @@ -1,7 +1,11 @@ +--3cx-version --add-sysdesc --api-filter-orgs --api-password +--api-password +--api-path --api-token +--api-username --api-version --cacert-file --cert-pkcs12 @@ -12,6 +16,7 @@ --dyn-mode --exclude-fs --filter-fs +--filter-imei --filter-vdom --filter-vm --force-counters32 @@ -19,6 +24,8 @@ --force-oid --get-param --ignore-orgs-api-disabled +--jobq +--legacy-api-beta --lookup-perfdatas-nagios --map-speed-dsl --mqtt @@ -36,53 +43,81 @@ --oid-display --oid-extra-display --oid-filter +--sql-errors-exit --urlpath +--use-ucd --warning-bytesallocatedpercentage -EncodedCommand -InputFormat -NoLogo 2c +3CX ADSL ASAM Alcatel +Ansible Avigilon Centreon +cpu-utilization-1m +cpu-utilization-5m +cpu-utilization-5s +DC4 Datacore +FCCapacity Fortigate Fortinet +HPE HashiCorp ISAM +IMEI IpAddr +ISAM Iwsva +JOBQ Loggly MBean +MIB MQTT Meraki +module-cellradio-rscp +module-cellradio-csq +module-cellradio-rsrp +module-cellradio-rsrq +module-cellradio-snr +modules-cellradio-detected Mosquitto +NLCapacity NTLMv2 NagVis Nagios Netscaler OID PKCS1 +Primera QoS +RestAPI RRDCached SNMP +SSDCapacity SSH Sansymphony SureBackup TCP TrendMicro +UCD VDSL2 VM -Veeam VPN +Veeam WSMAN XPath +allCapacity api.meraki.com cardtemperature connections-dhcp connections-dns +deduplication +datasource deltaps df eth @@ -95,6 +130,8 @@ in-bcast in-mcast in-ucast interface-dsl-name +jobqueue +jobqueues keepass ldap license-instances-usage-prct @@ -103,22 +140,33 @@ oneaccess-sys-mib out-bcast out-mcast out-ucast +overprovisioning perfdata powershell powershell.exe +prct proto psu queue-messages-inflighted sfp.temperature space-usage-prct teampass +Teldat timeframe topic-messages-inflighted total-offline-prct total-online-prct total-oper-down total-oper-up +tower-cli uptime +usage-prct userpass v1 v2 +VDSL2 +Veeam +VeloCloud +VMware +WSMAN +Kubernetes \ No newline at end of file diff --git a/tests/robot/apps/automation/ansible/tower/ansible_tower.json b/tests/robot/apps/automation/ansible/tower/ansible_tower.json new file mode 100644 index 0000000000..016173f648 --- /dev/null +++ b/tests/robot/apps/automation/ansible/tower/ansible_tower.json @@ -0,0 +1,125 @@ +{ + "uuid": "54ff47ec-292e-487b-ab22-42c08b05dd91", + "lastMigration": 32, + "name": "Ansible tower", + "endpointPrefix": "", + "latency": 0, + "port": 3000, + "hostname": "", + "folders": [], + "routes": [ + { + "uuid": "781bf78c-43f7-4da1-9515-1d324b7a59d1", + "type": "http", + "documentation": "", + "method": "get", + "endpoint": "api/v2/hosts", + "responses": [ + { + "uuid": "a4edd4f6-d560-44d5-8faf-3e6d532e22b4", + "body": "{\n \"count\": 20,\n \"next\": {{#if (lt (queryParam 'page') 2)}}\"/api/v2/hosts\"{{else}}null{{/if}},\n \"previous\": {{#if (gte (queryParam 'page') 2)}}\"/api/v2/hosts\"{{else}}null{{/if}},\n \"results\": [\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 14,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-13\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/14/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/14/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/14/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/14/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/14/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/14/groups/\",\n \"insights\": \"/api/v2/hosts/14/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/14/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/14/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/14/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/14/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/14/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/14/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 15,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-14\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/15/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/15/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/15/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/15/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/15/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/15/groups/\",\n \"insights\": \"/api/v2/hosts/15/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/15/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/15/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/15/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/15/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/15/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/15/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 16,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-15\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/16/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/16/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/16/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/16/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/16/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/16/groups/\",\n \"insights\": \"/api/v2/hosts/16/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/16/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/16/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/16/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/16/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/16/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/16/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 17,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-16\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/17/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/17/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/17/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/17/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/17/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/17/groups/\",\n \"insights\": \"/api/v2/hosts/17/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/17/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/17/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/17/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/17/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/17/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/17/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 18,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-17\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/18/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/18/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/18/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/18/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/18/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/18/groups/\",\n \"insights\": \"/api/v2/hosts/18/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/18/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/18/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/18/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/18/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/18/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/18/\",\n \"variables\": \"\"\n }\n ]\n}", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [], + "bodyType": "INLINE", + "filePath": "", + "databucketID": "", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": true, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + }, + { + "uuid": "f912f745-85f5-4313-9852-682f55b256bb", + "type": "http", + "documentation": "", + "method": "get", + "endpoint": "api/v2/unified_jobs", + "responses": [ + { + "uuid": "158d9bce-bc86-4411-8977-afac4a1eaedd", + "body": "{\n \"count\": 1,\n \"next\": {{#if (lt (queryParam 'page') 2)}}\"/api/v2/unified_jobs\"{{else}}null{{/if}},\n \"previous\": {{#if (gte (queryParam 'page') 2)}}\"/api/v2/unified_jobs\"{{else}}null{{/if}},\n \"results\": [\n {\n \"allow_simultaneous\": false,\n \"artifacts\": {},\n \"canceled_on\": null,\n \"controller_node\": \"\",\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"diff_mode\": false,\n \"elapsed\": 0,\n \"execution_node\": \"\",\n \"extra_vars\": \"{}\",\n \"failed\": false,\n \"finished\": null,\n \"force_handlers\": false,\n \"forks\": 0,\n \"id\": 1,\n \"instance_group\": null,\n \"inventory\": null,\n \"job_explanation\": \"\",\n \"job_slice_count\": 1,\n \"job_slice_number\": 0,\n \"job_tags\": \"\",\n \"job_template\": 1,\n \"job_type\": \"run\",\n \"launch_type\": \"manual\",\n \"limit\": \"\",\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"\",\n \"organization\": null,\n \"passwords_needed_to_start\": [],\n \"playbook\": \"\",\n \"project\": null,\n \"related\": {\n \"activity_stream\": \"/api/v2/jobs/1/activity_stream/\",\n \"cancel\": \"/api/v2/jobs/1/cancel/\",\n \"create_schedule\": \"/api/v2/jobs/1/create_schedule/\",\n \"credentials\": \"/api/v2/jobs/1/credentials/\",\n \"job_events\": \"/api/v2/jobs/1/job_events/\",\n \"job_host_summaries\": \"/api/v2/jobs/1/job_host_summaries/\",\n \"job_template\": \"/api/v2/job_templates/1/\",\n \"labels\": \"/api/v2/jobs/1/labels/\",\n \"notifications\": \"/api/v2/jobs/1/notifications/\",\n \"relaunch\": \"/api/v2/jobs/1/relaunch/\",\n \"stdout\": \"/api/v2/jobs/1/stdout/\",\n \"unified_job_template\": \"/api/v2/job_templates/1/\"\n },\n \"scm_branch\": \"\",\n \"scm_revision\": \"\",\n \"skip_tags\": \"\",\n \"start_at_task\": \"\",\n \"started\": null,\n \"status\": \"new\",\n \"summary_fields\": {\n \"credentials\": [],\n \"job_template\": {\n \"description\": \"\",\n \"id\": 1,\n \"name\": \"\"\n },\n \"labels\": {\n \"count\": 0,\n \"results\": []\n },\n \"unified_job_template\": {\n \"description\": \"\",\n \"id\": 1,\n \"name\": \"\",\n \"unified_job_type\": \"job\"\n },\n \"user_capabilities\": {\n \"delete\": true,\n \"start\": false\n }\n },\n \"timeout\": 0,\n \"type\": \"job\",\n \"unified_job_template\": 1,\n \"url\": \"/api/v2/jobs/1/\",\n \"use_fact_cache\": false,\n \"verbosity\": 0,\n \"webhook_credential\": null,\n \"webhook_guid\": \"\",\n \"webhook_service\": \"\"\n }\n ]\n}", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [], + "bodyType": "INLINE", + "filePath": "", + "databucketID": "", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": true, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + } + ], + "rootChildren": [ + { + "type": "route", + "uuid": "781bf78c-43f7-4da1-9515-1d324b7a59d1" + }, + { + "type": "route", + "uuid": "f912f745-85f5-4313-9852-682f55b256bb" + } + ], + "proxyMode": false, + "proxyHost": "", + "proxyRemovePrefix": false, + "tlsOptions": { + "enabled": false, + "type": "CERT", + "pfxPath": "", + "certPath": "", + "keyPath": "", + "caPath": "", + "passphrase": "" + }, + "cors": true, + "headers": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + } + ], + "proxyReqHeaders": [ + { + "key": "", + "value": "" + } + ], + "proxyResHeaders": [ + { + "key": "", + "value": "" + } + ], + "data": [], + "callbacks": [] +} \ No newline at end of file diff --git a/tests/robot/apps/automation/ansible/tower/hosts.robot b/tests/robot/apps/automation/ansible/tower/hosts.robot new file mode 100644 index 0000000000..930597bac9 --- /dev/null +++ b/tests/robot/apps/automation/ansible/tower/hosts.robot @@ -0,0 +1,33 @@ +*** Settings *** +Documentation Check the hosts mode with api custom mode + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}ansible_tower.json + +${CMD} ${CENTREON_PLUGINS} +... --plugin=apps::automation::ansible::tower::plugin +... --custommode=api +... --hostname=${HOSTNAME} +... --username=username +... --password=password +... --port=${APIPORT} + + +*** Test Cases *** +Hosts ${tc} + [Documentation] Check the number of returned hosts + [Tags] apps automation ansible service-disco + ${command} Catenate + ... ${CMD} + ... --mode=hosts + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc snmpcommunity expected_result -- + ... 1 os/linux/snmp/list-diskio OK: Hosts total: 10, failed: 0 - All hosts are ok | 'hosts.total.count'=10;;;0; 'hosts.failed.count'=0;;;0;10 diff --git a/tests/robot/apps/automation/ansible/tower/jobs.robot b/tests/robot/apps/automation/ansible/tower/jobs.robot new file mode 100644 index 0000000000..7ace1dab07 --- /dev/null +++ b/tests/robot/apps/automation/ansible/tower/jobs.robot @@ -0,0 +1,47 @@ +*** Settings *** +Documentation Check the jobs mode with api custom mode + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}ansible_tower.json + +${cmd} ${CENTREON_PLUGINS} +... --plugin=apps::automation::ansible::tower::plugin +... --custommode=api +... --hostname=${HOSTNAME} +... --username=username +... --password=password +... --port=${APIPORT} + + +*** Test Cases *** +jobs ${tc} + [Documentation] Check the number of returned jobs + [Tags] apps automation ansible jobs + ${command} Catenate + ... ${cmd} + ... --mode=jobs + ... ${extraoptions} + Log ${cmd} + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc extraoptions expected_result -- + ... 1 --filter-name='' OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 2 --filter-name=toto OK: Jobs total: 0, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=0;;;0; 'jobs.successful.count'=0;;;0;0 'jobs.failed.count'=0;;;0;0 'jobs.running.count'=0;;;0;0 'jobs.canceled.count'=0;;;0;0 'jobs.pending.count'=0;;;0;0 'jobs.default.count'=0;;;0;0 + ... 3 --filter-name=toto --critical-total=1:1 CRITICAL: Jobs total: 0 | 'jobs.total.count'=0;;1:1;0; 'jobs.successful.count'=0;;;0;0 'jobs.failed.count'=0;;;0;0 'jobs.running.count'=0;;;0;0 'jobs.canceled.count'=0;;;0;0 'jobs.pending.count'=0;;;0;0 'jobs.default.count'=0;;;0;0 + ... 4 --filter-name='' --critical-total=1:1 CRITICAL: Jobs total: 2 | 'jobs.total.count'=2;;1:1;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 5 --filter-name='' --critical-total=2:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;2:2;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 6 --critical-total=2:1 CRITICAL: Jobs total: 2 | 'jobs.total.count'=2;;2:1;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 7 --filter-name='' --display-failed-jobs OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 8 --filter-name='' --warning-total=1:1 WARNING: Jobs total: 2 | 'jobs.total.count'=2;1:1;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 9 --filter-name='' --warning-total=2:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;2:2;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 10 --filter-name=toto --warning-total=1:1 WARNING: Jobs total: 0 | 'jobs.total.count'=0;1:1;;0; 'jobs.successful.count'=0;;;0;0 'jobs.failed.count'=0;;;0;0 'jobs.running.count'=0;;;0;0 'jobs.canceled.count'=0;;;0;0 'jobs.pending.count'=0;;;0;0 'jobs.default.count'=0;;;0;0 + ... 11 --warning-total=1:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;1:2;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 12 --warning-total=2:1 WARNING: Jobs total: 2 | 'jobs.total.count'=2;2:1;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 13 --critical-total=1:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;1:2;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 diff --git a/tests/robot/apps/microsoft/hyperv/2012/local/nodeintegrationservice.robot b/tests/robot/apps/microsoft/hyperv/2012/local/nodeintegrationservice.robot index 7cd3da3d88..2aaf93b12a 100644 --- a/tests/robot/apps/microsoft/hyperv/2012/local/nodeintegrationservice.robot +++ b/tests/robot/apps/microsoft/hyperv/2012/local/nodeintegrationservice.robot @@ -13,7 +13,8 @@ ${CMD} ${CENTREON_PLUGINS} ... --command=cat ... --command-path=/usr/bin ... --no-ps -... --command-options=nodeintegrationservice-2022.json +... --command-options=${CURDIR}/nodeintegrationservice-2022.json + *** Test Cases *** HyperV 2022 ${tc}/3 @@ -22,16 +23,9 @@ HyperV 2022 ${tc}/3 ${command} Catenate ... ${CMD} ... --filter-vm='${filter_vm}' - - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc filter_vm expected_result -- ... 1 ${EMPTY} CRITICAL: 1 problem(s) detected ... 2 VSERVER05 OK: VM 'VSERVER05' 0 problem(s) detected - VM 'VSERVER05' 0 problem(s) detected ... 3 VSERVER07 CRITICAL: VM 'VSERVER07' 1 problem(s) detected - diff --git a/tests/robot/apps/protocols/http/collection-centreon-web.robot b/tests/robot/apps/protocols/http/collection-centreon-web.robot index 240800dc25..4e7d0ced6f 100644 --- a/tests/robot/apps/protocols/http/collection-centreon-web.robot +++ b/tests/robot/apps/protocols/http/collection-centreon-web.robot @@ -11,23 +11,23 @@ Test Timeout 120s *** Variables *** ${MOCKOON_JSON} ${CURDIR}${/}collection-centreon-web.mockoon.json -${CMD} ${CENTREON_PLUGINS} --plugin apps::protocols::http::plugin --mode collection -... --constant='hostname=127.0.0.1' --constant='protocol=http' --constant='port=3000' -... --constant='username=admin' --constant='password=myPassword' +${CMD} ${CENTREON_PLUGINS} --plugin=apps::protocols::http::plugin +... --mode collection +... --constant='hostname=${HOSTNAME}' +... --constant='protocol=http' +... --constant='port=${APIPORT}' +... --constant='username=admin' +... --constant='password=myPassword' *** Test Cases *** Check if ${test_desc} on Centreon [Tags] centreon collections http - ${output} Run - ... ${CMD} --config=${CURDIR}/${collection} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected} - ... Wrong output result:\n\n ${output}\nInstead of:\n ${expected}\n\n - - Examples: test_desc collection expected -- + ${command} Catenate + ... ${CMD} --config=${CURDIR}/${collection} + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: test_desc collection expected_result -- ... authentication succeeds collection-centreon-web-check-auth.collection.json OK: Authentication resulted in 200 HTTP code ... hosts are down collection-centreon-web-check-down-hosts.collection.json OK: All hosts are UP | 'hostsRequest.down.count'=0;0;;0;1 ... commands are broken collection-centreon-web-check-broken-commands.collection.json WARNING:${SPACE} - Service FakeHostThatIsDown/Svc-BadCommand output is '(Execute command failed)' | 'commands.broken.count'=1;0;;0; diff --git a/tests/robot/apps/protocols/snmp/collection-sputnik.robot b/tests/robot/apps/protocols/snmp/collection-sputnik.robot index cf95b5cd39..18893c1e97 100644 --- a/tests/robot/apps/protocols/snmp/collection-sputnik.robot +++ b/tests/robot/apps/protocols/snmp/collection-sputnik.robot @@ -16,18 +16,13 @@ SNMP Collection - Sputnik Environment ${tc}/3 ${command} Catenate ... ${CMD} ... --mode=collection - ... --hostname=127.0.0.1 - ... --snmp-version=2c - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=apps/protocols/snmp/collection-sputnik ... --config=${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}src/contrib/collection/snmp/sputnik-environment.json - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... ${command}\nWrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n} + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc expected_result -- ... 1 OK: Sensor '1' temperature is '20.06'°C and humidity is '33'% | '1#environment.temperature.celsius'=20.06C;;;; '1#environment.humidity.percent'=33%;;;0;100 diff --git a/tests/robot/apps/protocols/snmp/hashicorp-password-manager.robot b/tests/robot/apps/protocols/snmp/hashicorp-password-manager.robot index 625848d570..16eae15e3c 100644 --- a/tests/robot/apps/protocols/snmp/hashicorp-password-manager.robot +++ b/tests/robot/apps/protocols/snmp/hashicorp-password-manager.robot @@ -9,40 +9,35 @@ Test Timeout 120s *** Variables *** ${MOCKOON_JSON} ${CURDIR}${/}vault-authentication-hashicorp.json -${CMD} ${CENTREON_PLUGINS} --plugin apps::protocols::snmp::plugin --hostname=127.0.0.1 +${CMD} ${CENTREON_PLUGINS} --plugin apps::protocols::snmp::plugin --hostname=${HOSTNAME} *** Test Cases *** check hashicorp vault manager${Name} [Documentation] Check hashicorp vaultmanager [Tags] snmp vault - ${cmd_hashicorp} Catenate + ${command} Catenate ... ${CMD} ... --pass-manager=hashicorpvault - ... --vault-address=127.0.0.1 - ... --vault-port=3000 + ... --vault-address=${HOSTNAME} + ... --vault-port=${APIPORT} ... --vault-protocol=http ... --auth-method=userpass ... --auth-settings="username=hcvaultuser" ... --secret-path="path/of/the/secret" - ... --snmp-port=2024 + ... --snmp-port=${SNMPPORT} ... --map-option="snmp_community=\\%{value_path/of/the/secret}" ... --mode=string-value - ... --snmp-version=2c + ... --snmp-version=${SNMPVERSION} ... --snmp-community=apps/protocols/snmp/snmp-single-oid ... --oid='.1.3.6.1.2.1.1.1.0' ${path-param} ... --format-ok='current value is: \\%{details_ok}' ... --format-details-warning='current value is: \\%{details_warning}' ... --format-details-critical='current value is: \\%{details_critical}' - ${output} Run - ... ${cmd_hashicorp} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${result} - ... ${cmd_hashicorp}\n\n Wrong output result for hashicorp auth manager on snmp generic plugin, output got :\n${output} \nExpected : \n ${result}\n + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} - Examples: Name path-param result -- + Examples: Name path-param expected_result -- ... default path --auth-path='' --auth-settings="password=secrethashicorpPassword" OK: current value is: Linux centreon-devbox 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 ... wrong path --auth-path='specific-url' --auth-settings="password=secrethashicorpPassword" OK: current value is: Linux centreon-devbox 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 ... wrong password --auth-path='' --auth-settings="password=WrongPassword" UNKNOWN: 401 Unauthorized diff --git a/tests/robot/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot b/tests/robot/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot index b5f29c7238..ec2518dd56 100644 --- a/tests/robot/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot +++ b/tests/robot/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot @@ -11,29 +11,30 @@ Test Timeout 120s *** Variables *** ${MOCKOON_JSON} ${CURDIR}${/}cloud-azure-policyinsights-policystates.json -${LOGIN_ENDPOINT} http://localhost:3000/login +${BASE_URL} http://${HOSTNAME}:${APIPORT} +${LOGIN_ENDPOINT} ${BASE_URL}/login ${CMD} ${CENTREON_PLUGINS} --plugin=cloud::azure::policyinsights::policystates::plugin --subscription=subscription --tenant=tenant --client-id=client_id --client-secret=secret --statefile-dir=/tmp/cache/ --login-endpoint=${LOGIN_ENDPOINT} &{compliance_value1} -... endpoint=http://localhost:3000/ok +... endpoint=${BASE_URL}/ok ... policyname= ... resourcelocation= ... resourcetype= ... result=OK: Number of non compliant policies: 0 - All compliances states are ok | 'policies.non_compliant.count'=0;;;0; &{compliance_value2} -... endpoint=http://localhost:3000/oknextlink +... endpoint=${BASE_URL}/oknextlink ... policyname=9daedab3-fb2d-461e-b861-71790eead4f6 ... resourcelocation= ... resourcetype= ... result=OK: Number of non compliant policies: 0 - All compliances states are ok | 'policies.non_compliant.count'=0;;;0; &{compliance_value3} -... endpoint=http://localhost:3000/nok1 +... endpoint=${BASE_URL}/nok1 ... policyname=9daedab3-fb2d-461e-b861-71790eead4f6 ... resourcelocation=fr ... resourcetype= ... result=CRITICAL: Compliance state for policy '9daedab3-fb2d-461e-b861-71790eead4f6' on resource 'mypubip1' is 'NonCompliant' | 'policies.non_compliant.count'=1;;;0; &{compliance_value4} -... endpoint=http://localhost:3000/nok2 +... endpoint=${BASE_URL}/nok2 ... policyname=9daedab3-fb2d-461e-b861-71790eead4f6 ... resourcelocation=fr ... resourcetype=ip @@ -62,10 +63,6 @@ Azure PolicyInsights PolicyStates compliance IF ${length} > 0 ${command} Catenate ${command} --resource-type=${compliance_value.resourcetype} END - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${compliance_value.result} - ... Wrong output result for compliance of ${compliance_value}.{\n}Command output:{\n}${output} + + Ctn Run Command And Check Result As Strings ${command} ${compliance_value.result} END diff --git a/tests/robot/cloud/vmware/velocloud/restapi/edgestatus.robot b/tests/robot/cloud/vmware/velocloud/restapi/edgestatus.robot new file mode 100644 index 0000000000..2ce1789abe --- /dev/null +++ b/tests/robot/cloud/vmware/velocloud/restapi/edgestatus.robot @@ -0,0 +1,43 @@ +*** Settings *** +Documentation VeloCloud REST API Edge Status + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}velocloud.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=cloud::vmware::velocloud::restapi::plugin +... --mode edge-status +... --hostname=${HOSTNAME} +... --username=XloginX +... --password=XpasswordX +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +Edge Status ${tc} + [Tags] cloud api vmware + ${command} Catenate ${CMD} ${extraoptions} + ${output} Run ${command} + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} CRITICAL: Edge 'MYEDGE#02' State is 'OFFLINE', Service State is 'IN_SERVICE', HA State is 'READY', Activation State is 'ACTIVATED' + ... 2 --critical-status='' OK: All edges status are ok \ No newline at end of file diff --git a/tests/robot/cloud/vmware/velocloud/restapi/listedges.robot b/tests/robot/cloud/vmware/velocloud/restapi/listedges.robot new file mode 100644 index 0000000000..302c1c5952 --- /dev/null +++ b/tests/robot/cloud/vmware/velocloud/restapi/listedges.robot @@ -0,0 +1,42 @@ +*** Settings *** +Documentation VeloCloud REST API Edge Status + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}velocloud.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=cloud::vmware::velocloud::restapi::plugin +... --mode list-edges +... --hostname=${HOSTNAME} +... --username=XloginX +... --password=XpasswordX +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +List Edges ${tc} + [Tags] cloud api vmware discovery + ${command} Catenate ${CMD} ${extraoptions} | wc -l + ${output} Run ${command} + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} 9 diff --git a/tests/robot/cloud/vmware/velocloud/restapi/velocloud.mockoon.json b/tests/robot/cloud/vmware/velocloud/restapi/velocloud.mockoon.json new file mode 100644 index 0000000000..77ab5002a6 --- /dev/null +++ b/tests/robot/cloud/vmware/velocloud/restapi/velocloud.mockoon.json @@ -0,0 +1,290 @@ +{ + "uuid": "f6ad0f9a-97d2-4c65-8362-7344934c821f", + "lastMigration": 32, + "name": "Velocloud.mockoon", + "endpointPrefix": "", + "latency": 0, + "port": 3000, + "hostname": "", + "folders": [], + "routes": [ + { + "uuid": "8fe7d016-e0b1-4f19-9e9f-9fd6c0e53cb3", + "type": "http", + "documentation": "", + "method": "get", + "endpoint": "", + "responses": [ + { + "uuid": "0a196fe2-5f0c-408c-84ba-249d347b3748", + "body": "{}", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [], + "bodyType": "INLINE", + "filePath": "", + "databucketID": "", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": true, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + }, + { + "uuid": "ae2261fa-857e-41e6-9cb2-843671684d35", + "type": "http", + "documentation": "", + "method": "post", + "endpoint": "portal/rest/login/enterpriseLogin", + "responses": [ + { + "uuid": "a312c4c0-73f8-4110-b8f8-9452da3b58ce", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [ + { + "key": "access-control-allow-headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "access-control-allow-methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "content-security-policy", + "value": "default-src 'none'" + }, + { + "key": "content-type", + "value": "text/html; charset=utf-8" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + }, + { + "key": "Set-Cookie", + "value": "velocloud.session=s%3AeyJjb250ZW50IjoiNjg1N2YzMGU0OGFjYzcyNzc2YWQyMjZkNWExZDdkM2IzN2U2NzBiNDQ1Y2I2YTA3YTY3MTE2ZjcwYmYzYTg2OGZlNDY0YmYxYTlhOGNkOGEzZGE4YmE0MjZhNjU2ZjQ1NmNlN2ZlMTYzMWNjZThkZDI2YThiMDlmZTRlNGY4NmU2MzZkZjg1M2VmZWNmMGE0MDQzZGE3YzhlNTkxZTMyODcyMDk2NjY1YmQwYjFlNzdhYTVkMmI3MjFhNzY5NTI2MmRiYWVjY2ZiZGQyMGUxNDI3YWYyYWY2YTdmZTBhOWQzMjA3YmVhZTBlZGMzYjU5MDg2YjA4YThjZThmOTk2YzZkYTE2ZGRjZmFlYzVjNDA3Nzg5MTUxMDU5N2Q1Y2Q4NWIzNGUwOTQ3OTEwOWEyZTAwYzFlZDZiNjUwYzRhZDY2NDYwM2ZlM2ViYTkyNzM3NjM4MGMyZjg4Nzg0NTA0NTljMDAyMzE3NjZlNzAzMjQ2OTdlNDkxY2MzYTdhZGJmNmNhODFhYTg0NWRlYzJlNDkyMWEwZjg3YjkwMjY2YmY1MWYzOTFlZjQ5ZWU3MDJjODIwYzA3MTdjZmI0MDNhZGM5ZGY0NDU3YzYzNzE0ZjNkOTQ2MzFjYmEwNmFmMDIzNDc2MjE1NDIwMWY4MGMwOWIxOTBkNWUxYzAzNzdjMWQ2ZWEyMmRkZWUwZTQ0MGQ1YmI0OGRiODVjNGYyNmJkZTYzMTgwYTcxYWY1YWFiOTNhMTM2N2U5M2M5ZjhjODU4MWRiZDE1NDk2NTIzZTUyYWEwNzY3OTQ0YTViNjhjNzNkYTllNmJkNjRjNGJkNDU2OTUxNGFmZjgyODdhOWJmNjBkMDk3YzU3YWZmYzA5MDFlNGYwMmZmMjYzNGY2OWZjNWM2YjMwNWI5ZDE4MTE4ZGY0ZWEyZmY0NjU2MDc4YzY3NzAxODAzYTQ5MGM0MjE5NGZlY2E3OWQ5MzgxNzZkZDNkOWU0OTlmY2RhN2ViNjVhZDFlYjUxMzM3YmY0OGZkMTBhZDQyMzdhYzdlNTQyZDBkNDI2ZDI2Mjc3OGJiY2JhYjE3Mjg2ODljNzQwZDFjMjY0YzMyOWJmNTBmM2U1ODBjOWI2ZDc2N2YxZGUwMjRhNDIwMWExYjhlMmZjY2RmNDJjNDQ2MWYxMzNiODIyZmE3NTdlODE1MjBhNGQ4OTNiYWFiMTYwZjRmNWQwOWMxYThiY2FmNGRmZWRlNTA0YzM4NjBhNWUyZTQwZDJhNjk5ODkxMGFhZjg0YTY1MjE5MmZlMGZkOWFlYzhhNGNhMTlmODI0NjAyZmZlODViZWE1ZDk4N2JlMmQ2Y2Q5NGFhMWE5NmFmOTVjZWM2ODY3YzkyZTVhZDM0Y2NiZDhiNzFkMDdiODMyNWYxZWUwMzk2NWQ5ODBhYjdjYTNlNjJmN2Q0ZDJiN2FmMDg3NDgzOWI1MzU3YzZkNzI5YzExNjhmMGY5ODc3YjJlNzNiMWU5YTJjZjQ1OTYzYjY0Y2JhOWJkMTIwZGUzNjMwOGIxOTY1NDdkOThhNzg5Yzg3YjMxZWMxMjAxM2NhYjgzNWNjNDExYWZiNjEyMmM2NjQ1NzViNDQ4YjU4NjEwNzhlZTI1ZTEwZmY0ZGEwMjBhYTFlYTc5ZjEwNTlkMjUyYzNjNjkzNjhlYmM1MjMiLCJ0YWciOiJkYzI5YTQwNGRlZjIxMzlhNjFiMTE4YWQ3NTNhMTU3ZiIsIml2IjoiYTMzY2FlZTYxMzFmODQ0OTQ2YmYxZjgyZTEyYjQ3MzAiLCJzYWx0IjoiY2M4MTQ4MmYzODY3NTM5NmQzODM1ZjgzIn0.vNJKuHmYJ3EF0XhLuowRqQ3yKnMxRXVmlP1C3eMZ%2FqA; Path=/; HttpOnly; Secure; SameSite=Strict" + } + ], + "bodyType": "INLINE", + "filePath": "", + "databucketID": "", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": false, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + }, + { + "uuid": "199ff3b7-968b-4c8f-a5d8-80d4e72938c0", + "type": "http", + "documentation": "", + "method": "post", + "endpoint": "portal/rest/enterprise/getEnterprise", + "responses": [ + { + "uuid": "d15b81d7-e9f5-4c93-8a3f-8381f9280be5", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [ + { + "key": "access-control-allow-headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "access-control-allow-methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "content-security-policy", + "value": "default-src 'none'" + }, + { + "key": "content-type", + "value": "text/html; charset=utf-8" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + } + ], + "bodyType": "DATABUCKET", + "filePath": "", + "databucketID": "uy64", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": false, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + }, + { + "uuid": "2758e04d-f45b-4e38-9998-41cd17db4968", + "type": "http", + "documentation": "", + "method": "post", + "endpoint": "portal/rest/enterprise/getEnterpriseEdges", + "responses": [ + { + "uuid": "aff44dea-83ae-4357-a737-495410bc1951", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [ + { + "key": "access-control-allow-headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "access-control-allow-methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "content-security-policy", + "value": "default-src 'none'" + }, + { + "key": "content-type", + "value": "text/html; charset=utf-8" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + } + ], + "bodyType": "DATABUCKET", + "filePath": "", + "databucketID": "fjb6", + "sendFileAsBody": false, + "rules": [ + { + "target": "body", + "modifier": ".enterpriseId", + "value": "1511", + "invert": false, + "operator": "equals" + } + ], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": false, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + } + ], + "rootChildren": [ + { + "type": "route", + "uuid": "8fe7d016-e0b1-4f19-9e9f-9fd6c0e53cb3" + }, + { + "type": "route", + "uuid": "ae2261fa-857e-41e6-9cb2-843671684d35" + }, + { + "type": "route", + "uuid": "199ff3b7-968b-4c8f-a5d8-80d4e72938c0" + }, + { + "type": "route", + "uuid": "2758e04d-f45b-4e38-9998-41cd17db4968" + } + ], + "proxyMode": false, + "proxyHost": "", + "proxyRemovePrefix": false, + "tlsOptions": { + "enabled": false, + "type": "CERT", + "pfxPath": "", + "certPath": "", + "keyPath": "", + "caPath": "", + "passphrase": "" + }, + "cors": true, + "headers": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + } + ], + "proxyReqHeaders": [ + { + "key": "", + "value": "" + } + ], + "proxyResHeaders": [ + { + "key": "", + "value": "" + } + ], + "data": [ + { + "uuid": "8ac5926e-cefd-4ea8-b3ae-db0040640b68", + "id": "fjb6", + "name": "EnterpriseEdges", + "documentation": "", + "value": "[\n {\n \"id\": 12345,\n \"created\": \"2023-12-13T08:51:59.000Z\",\n \"enterpriseId\": 1234,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 98765,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2024-07-03T20:39:47.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2023-12-18T16:05:34.000Z\",\n \"softwareVersion\": \"5.2.2.2\",\n \"buildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"factorySoftwareVersion\": \"5.0.0\",\n \"factoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.50.0.9-16_CPLD_0x29_PIC_v20P), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-06-03T20:58:48.000Z\",\n \"selfMacAddress\": \"00:00:00:00:00:00\",\n \"deviceId\": \"C3F5DF82-8E87-4741-A331-95FE2C2EC078\",\n \"logicalId\": \"7a11d6a5-b379-47d6-acad-686fc05d79bc\",\n \"serialNumber\": \"5KGN9Q3\",\n \"modelNumber\": \"edge620-n\",\n \"deviceFamily\": \"EDGE6X0\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#01\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"CONNECTED\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-06-03T21:43:22.000Z\",\n \"serviceUpSince\": \"2024-06-03T21:45:33.000Z\",\n \"lastContact\": \"2024-08-05T07:58:52.633Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-06-03T21:50:52.000Z\",\n \"haSerialNumber\": \"7WDN9Q3\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-08-05T07:57:53.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"enhanced\",\n \"standbySystemUpSince\": \"2024-06-03T21:46:56.000Z\",\n \"standbyServiceUpSince\": \"2024-06-03T21:50:08.508Z\",\n \"standbySoftwareVersion\": \"5.2.2.2\",\n \"standbyFactorySoftwareVersion\": \"5.0.0\",\n \"standbyFactoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"standbyBuildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"standbyModelNumber\": \"edge620-n\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": false\n },\n {\n \"id\": 23456,\n \"created\": \"2024-07-08T14:28:09.000Z\",\n \"enterpriseId\": 2345,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 87654,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2024-08-07T14:28:09.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2024-07-09T08:38:21.000Z\",\n \"softwareVersion\": \"5.2.3.2\",\n \"buildNumber\": \"R5232-20240516-GA-e4ca476843\",\n \"factorySoftwareVersion\": \"5.0.0\",\n \"factoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.43.0.9-16_CPLD_0x34_PIC_v20P), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-07-09T08:45:03.000Z\",\n \"selfMacAddress\": \"e8:65:5f:ed:e1:c0\",\n \"deviceId\": \"D67AEFAA-DE5A-4798-8AF5-648CB3691EFD\",\n \"logicalId\": \"022a9472-aa7e-46bc-a803-d4be34d2fb7f\",\n \"serialNumber\": \"H4C4W43\",\n \"modelNumber\": \"edge610-n\",\n \"deviceFamily\": \"EDGE6X0\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#02\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"OFFLINE\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-07-09T08:41:44.000Z\",\n \"serviceUpSince\": \"2024-07-09T13:53:03.000Z\",\n \"lastContact\": \"2024-07-09T13:57:54.000Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-07-09T13:51:23.000Z\",\n \"haSerialNumber\": \"3HG4W43\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-07-09T14:00:01.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"standard\",\n \"standbySystemUpSince\": \"2024-07-09T08:54:54.000Z\",\n \"standbyServiceUpSince\": \"2024-07-09T13:53:28.835Z\",\n \"standbySoftwareVersion\": \"5.2.3.2\",\n \"standbyFactorySoftwareVersion\": \"5.0.0\",\n \"standbyFactoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"standbyBuildNumber\": \"R5232-20240516-GA-e4ca476843\",\n \"standbyModelNumber\": \"edge610-n\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": false\n },\n {\n \"id\": 34567,\n \"created\": \"2023-11-30T14:31:30.000Z\",\n \"enterpriseId\": 3456,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 76543,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2023-12-30T14:31:30.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2023-12-06T15:42:28.000Z\",\n \"softwareVersion\": \"5.2.2.2\",\n \"buildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"factorySoftwareVersion\": \"3.3.0\",\n \"factoryBuildNumber\": \"R330-MAESTRO-20200528-MFG\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.41.0.9-15_CPLD_0x12_BMC_2.0), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-03-04T06:16:22.000Z\",\n \"selfMacAddress\": \"8c:47:be:9d:16:10\",\n \"deviceId\": \"4a99b5a2-a4c6-4bc6-86d2-023691c2ae89\",\n \"logicalId\": \"7fdb83d8-4eb3-4d3b-8e77-7a9b5318b406\",\n \"serialNumber\": \"3ZKR363\",\n \"modelNumber\": \"edge3800\",\n \"deviceFamily\": \"EDGE3X00\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#03\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"CONNECTED\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-03-04T06:17:34.000Z\",\n \"serviceUpSince\": \"2024-07-08T05:22:43.000Z\",\n \"lastContact\": \"2024-08-05T07:58:46.539Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-07-08T05:25:28.000Z\",\n \"haSerialNumber\": \"479R363\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-08-05T07:56:49.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"standard\",\n \"standbySystemUpSince\": \"2024-03-04T06:13:44.000Z\",\n \"standbyServiceUpSince\": \"2024-07-08T05:24:53.347Z\",\n \"standbySoftwareVersion\": \"5.2.2.2\",\n \"standbyFactorySoftwareVersion\": \"4.0.0\",\n \"standbyFactoryBuildNumber\": \"R400-20200929-3810-MFG-GA\",\n \"standbyBuildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"standbyModelNumber\": \"edge3800\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": true\n },\n {\n \"id\": 45678,\n \"created\": \"2024-05-07T08:26:01.000Z\",\n \"enterpriseId\": 4567,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 65432,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2024-06-06T08:26:02.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2024-05-23T08:29:47.000Z\",\n \"softwareVersion\": \"5.2.3.2\",\n \"buildNumber\": \"R5232-20240516-GA-e4ca476843\",\n \"factorySoftwareVersion\": \"5.0.0\",\n \"factoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.43.0.9-16_CPLD_0x34_PIC_v20P), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-06-04T15:49:15.000Z\",\n \"selfMacAddress\": \"e8:65:5f:ef:39:c0\",\n \"deviceId\": \"1242C148-3B6F-450C-BE31-BED03F949A20\",\n \"logicalId\": \"9bf018c8-fb8e-4f67-8a39-8cd7791d5427\",\n \"serialNumber\": \"HXF4W43\",\n \"modelNumber\": \"edge610-n\",\n \"deviceFamily\": \"EDGE6X0\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#04\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"CONNECTED\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-06-04T15:42:21.000Z\",\n \"serviceUpSince\": \"2024-06-13T05:17:37.000Z\",\n \"lastContact\": \"2024-08-05T07:58:52.247Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-06-27T18:03:50.000Z\",\n \"haSerialNumber\": \"6XD4W43\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-08-05T07:58:52.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"enhanced\",\n \"standbySystemUpSince\": \"2024-06-27T18:01:07.000Z\",\n \"standbyServiceUpSince\": \"2024-06-27T18:04:14.146Z\",\n \"standbySoftwareVersion\": \"5.2.3.2\",\n \"standbyFactorySoftwareVersion\": \"5.0.0\",\n \"standbyFactoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"standbyBuildNumber\": \"R5232-20240516-GA-e4ca476843\",\n \"standbyModelNumber\": \"edge610-n\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": false\n },\n {\n \"id\": 56789,\n \"created\": \"2023-11-30T14:47:20.000Z\",\n \"enterpriseId\": 5678,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 54321,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2024-01-10T11:32:23.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2023-12-11T11:12:33.000Z\",\n \"softwareVersion\": \"5.2.2.2\",\n \"buildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"factorySoftwareVersion\": \"4.0.0\",\n \"factoryBuildNumber\": \"R400-20200929-3810-MFG-GA\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.41.0.9-15_CPLD_0x12_BMC_2.0), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-02-29T06:14:10.000Z\",\n \"selfMacAddress\": \"8c:47:be:ae:f1:41\",\n \"deviceId\": \"6656e51c-eff4-4142-a540-8771ef5ef264\",\n \"logicalId\": \"c9d12500-79a4-4c25-b167-ad472d374e8e\",\n \"serialNumber\": \"6YXR363\",\n \"modelNumber\": \"edge3800\",\n \"deviceFamily\": \"EDGE3X00\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#05\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"CONNECTED\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-02-29T06:15:08.000Z\",\n \"serviceUpSince\": \"2024-07-08T05:06:42.000Z\",\n \"lastContact\": \"2024-08-05T07:58:53.567Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-07-08T05:09:11.000Z\",\n \"haSerialNumber\": \"G99QY03\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-08-05T07:54:55.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"standard\",\n \"standbySystemUpSince\": \"2024-02-29T06:11:36.000Z\",\n \"standbyServiceUpSince\": \"2024-07-08T05:08:52.475Z\",\n \"standbySoftwareVersion\": \"5.2.2.2\",\n \"standbyFactorySoftwareVersion\": \"3.3.0\",\n \"standbyFactoryBuildNumber\": \"R330-MAESTRO-20190404-MFG\",\n \"standbyBuildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"standbyModelNumber\": \"edge3800\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": true\n },\n {\n \"id\": 67890,\n \"created\": \"2023-12-13T08:48:25.000Z\",\n \"enterpriseId\": 6789,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 97654,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2024-03-03T10:39:19.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2024-02-20T18:05:48.000Z\",\n \"softwareVersion\": \"5.2.2.2\",\n \"buildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"factorySoftwareVersion\": \"5.0.0\",\n \"factoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.43.0.9-16_CPLD_0x34_PIC_v20P), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-03-19T18:27:11.000Z\",\n \"selfMacAddress\": \"e8:65:5f:ef:4c:80\",\n \"deviceId\": \"41C300AB-F16B-48AF-B65C-A4680F176ECE\",\n \"logicalId\": \"f3edcf22-c2ed-4b67-9b7b-e64e3f1ffde5\",\n \"serialNumber\": \"7NC4W43\",\n \"modelNumber\": \"edge610-n\",\n \"deviceFamily\": \"EDGE6X0\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#06\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"CONNECTED\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-03-19T18:21:57.000Z\",\n \"serviceUpSince\": \"2024-03-19T18:25:36.000Z\",\n \"lastContact\": \"2024-08-05T07:58:51.309Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-03-19T18:29:36.000Z\",\n \"haSerialNumber\": \"82G4W43\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-08-05T07:51:33.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"standard\",\n \"standbySystemUpSince\": \"2024-03-19T18:23:41.000Z\",\n \"standbyServiceUpSince\": \"2024-03-19T18:29:13.224Z\",\n \"standbySoftwareVersion\": \"5.2.2.2\",\n \"standbyFactorySoftwareVersion\": \"5.0.0\",\n \"standbyFactoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"standbyBuildNumber\": \"R5222-20240223-GA-29802b54f4\",\n \"standbyModelNumber\": \"edge610-n\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": false\n },\n {\n \"id\": 13456,\n \"created\": \"2024-06-21T08:54:53.000Z\",\n \"enterpriseId\": 7890,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 86543,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2024-08-07T13:04:44.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2024-07-04T10:52:57.000Z\",\n \"softwareVersion\": \"5.2.3.2\",\n \"buildNumber\": \"R5232-20240516-GA-e4ca476843\",\n \"factorySoftwareVersion\": \"5.0.0\",\n \"factoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.43.0.9-16_CPLD_0x34_PIC_v20P), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-07-16T12:55:15.000Z\",\n \"selfMacAddress\": \"e8:65:5f:ed:dd:00\",\n \"deviceId\": \"CB849BB5-13A7-4F05-8EE2-A962BB212F69\",\n \"logicalId\": \"55acb00b-e5e3-4cbc-baca-57bfa6debb44\",\n \"serialNumber\": \"B3C4W43\",\n \"modelNumber\": \"edge610-n\",\n \"deviceFamily\": \"EDGE6X0\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#07\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"CONNECTED\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-07-16T12:55:43.000Z\",\n \"serviceUpSince\": \"2024-08-05T05:21:57.000Z\",\n \"lastContact\": \"2024-08-05T07:58:38.881Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-08-05T05:26:05.000Z\",\n \"haSerialNumber\": \"9PF4W43\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-08-05T07:43:50.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"enhanced\",\n \"standbySystemUpSince\": \"2024-07-16T12:51:11.000Z\",\n \"standbyServiceUpSince\": \"2024-08-05T05:25:24.596Z\",\n \"standbySoftwareVersion\": \"5.2.3.2\",\n \"standbyFactorySoftwareVersion\": \"5.0.0\",\n \"standbyFactoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"standbyBuildNumber\": \"R5232-20240516-GA-e4ca476843\",\n \"standbyModelNumber\": \"edge610-n\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": false\n },\n {\n \"id\": 24567,\n \"created\": \"2023-12-06T13:15:53.000Z\",\n \"enterpriseId\": 1345,\n \"enterpriseLogicalId\": \"XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX\",\n \"siteId\": 75432,\n \"activationKey\": \"XXXX-XXXX-XXXX-XXXX\",\n \"activationKeyExpires\": \"2024-01-05T13:15:54.000Z\",\n \"activationState\": \"ACTIVATED\",\n \"activationTime\": \"2023-12-12T13:42:33.000Z\",\n \"softwareVersion\": \"4.5.2\",\n \"buildNumber\": \"R452-20240125-GA-3646337bed\",\n \"factorySoftwareVersion\": \"\\\"5.0.0\\\"\",\n \"factoryBuildNumber\": \"\\\"R5000-20220316-MR-GA\\\"\",\n \"platformFirmwareVersion\": \"**NA**\",\n \"platformBuildNumber\": \"**NA**(BIOS_3.43.0.9-16_CPLD_0x34_PIC_v20P), HASupported Upgradable\",\n \"modemFirmwareVersion\": \"\",\n \"modemBuildNumber\": \"\",\n \"softwareUpdated\": \"2024-02-12T22:08:25.000Z\",\n \"selfMacAddress\": \"e8:65:5f:ed:ce:40\",\n \"deviceId\": \"30E12253-D7A6-45CE-AFCC-33E10F10399C\",\n \"logicalId\": \"69137d19-a8e1-47ef-bae8-0604470f3c4a\",\n \"serialNumber\": \"98C4W43\",\n \"modelNumber\": \"edge610-n\",\n \"deviceFamily\": \"EDGE6X0\",\n \"lteRegion\": null,\n \"name\": \"MYEDGE#08\",\n \"dnsName\": null,\n \"description\": \"\",\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"edgeState\": \"CONNECTED\",\n \"edgeStateTime\": \"0000-00-00 00:00:00\",\n \"isLive\": 0,\n \"systemUpSince\": \"2024-02-12T22:05:32.000Z\",\n \"serviceUpSince\": \"2024-02-12T22:13:39.000Z\",\n \"lastContact\": \"2024-08-05T07:58:51.257Z\",\n \"serviceState\": \"IN_SERVICE\",\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"haState\": \"READY\",\n \"haPreviousState\": \"FAILED\",\n \"haLastContact\": \"2024-03-15T02:06:50.000Z\",\n \"haSerialNumber\": \"10C4W43\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2024-07-31T05:27:15.000Z\",\n \"customInfo\": \"\",\n \"haMode\": \"standard\",\n \"standbySystemUpSince\": \"2024-02-06T22:16:23.000Z\",\n \"standbyServiceUpSince\": \"2024-02-11T21:01:49.417Z\",\n \"standbySoftwareVersion\": \"5.2.2.0\",\n \"standbyFactorySoftwareVersion\": \"5.0.0\",\n \"standbyFactoryBuildNumber\": \"R5000-20220316-MR-GA\",\n \"standbyBuildNumber\": \"R5220-20240104-GA-134893-e49bce97b1\",\n \"standbyModelNumber\": \"edge610-n\",\n \"standbyDeviceId\": null,\n \"haWifiCapabilityMismatch\": null,\n \"isHub\": false\n }\n]\n" + }, + { + "uuid": "e401c35f-1749-462c-ac8b-4b71153257b3", + "id": "uy64", + "name": "Enterprise", + "documentation": "", + "value": "{\n \"id\": 1834,\n \"created\": \"2023-11-30T13:40:15.000Z\",\n \"networkId\": 1,\n \"gatewayPoolId\": 3,\n \"alertsEnabled\": 1,\n \"operatorAlertsEnabled\": 1,\n \"endpointPkiMode\": \"CERTIFICATE_OPTIONAL\",\n \"name\": \"ACME CORP INTL\",\n \"domain\": \"acmecorpintl\",\n \"prefix\": null,\n \"logicalId\": \"46d6cafe-98b3-4b6a-80c4-8b11404692b0\",\n \"accountNumber\": \"ACME-CRP-INTL\",\n \"description\": null,\n \"contactName\": null,\n \"contactPhone\": null,\n \"contactMobile\": null,\n \"contactEmail\": \"admin@acm.e\",\n \"streetAddress\": null,\n \"streetAddress2\": null,\n \"city\": null,\n \"state\": null,\n \"postalCode\": null,\n \"country\": null,\n \"lat\": 37.402866,\n \"lon\": -122.117332,\n \"timezone\": \"America/Los_Angeles\",\n \"locale\": \"en-US\",\n \"bastionState\": \"UNCONFIGURED\",\n \"modified\": \"2023-11-30T13:42:35.000Z\"\n}" + } + ], + "callbacks": [] +} \ No newline at end of file diff --git a/tests/robot/hardware/devices/camera/avigilon/snmp/memory.robot b/tests/robot/hardware/devices/camera/avigilon/snmp/memory.robot index 748028e145..3f1b51a028 100644 --- a/tests/robot/hardware/devices/camera/avigilon/snmp/memory.robot +++ b/tests/robot/hardware/devices/camera/avigilon/snmp/memory.robot @@ -10,8 +10,8 @@ Test Timeout 120s ${CMD} ${CENTREON_PLUGINS} ... --plugin=hardware::devices::camera::avigilon::snmp::plugin ... --mode=memory -... --hostname=127.0.0.1 -... --snmp-port=2024 +... --hostname=${HOSTNAME} +... --snmp-port=${SNMPPORT} *** Test Cases *** @@ -24,12 +24,7 @@ Avigilon camera Memory ${tc}/3 ... --warning-available='${warning_available}' ... --critical-available='${critical_available}' - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc warning_available critical_available expected_result -- ... 1 ${EMPTY} ${EMPTY} OK: total system memory available: 464.85 KB | 'memory.available'=476004B;;;0; diff --git a/tests/robot/hardware/devices/camera/avigilon/snmp/storage.robot b/tests/robot/hardware/devices/camera/avigilon/snmp/storage.robot index cf19e15975..33b422adb3 100644 --- a/tests/robot/hardware/devices/camera/avigilon/snmp/storage.robot +++ b/tests/robot/hardware/devices/camera/avigilon/snmp/storage.robot @@ -10,8 +10,8 @@ Test Timeout 120s ${CMD} ${CENTREON_PLUGINS} ... --plugin=hardware::devices::camera::avigilon::snmp::plugin ... --mode=storage -... --hostname=127.0.0.1 -... --snmp-port=2024 +... --hostname=${HOSTNAME} +... --snmp-port=${SNMPPORT} *** Test Cases *** @@ -25,12 +25,7 @@ Avigilon camera Storage ${tc}/3 ... --critical-status='${critical_status}' ... --unknown-status='${unknown_status}' - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc warning_status critical_status unknown_status expected_result -- ... 1 ${EMPTY} ${EMPTY} ${EMPTY} OK: state of the SD card: mediaNotPresent diff --git a/tests/robot/hardware/devices/camera/avigilon/snmp/temperature.robot b/tests/robot/hardware/devices/camera/avigilon/snmp/temperature.robot index 10ce589f7b..63461c14c4 100644 --- a/tests/robot/hardware/devices/camera/avigilon/snmp/temperature.robot +++ b/tests/robot/hardware/devices/camera/avigilon/snmp/temperature.robot @@ -10,8 +10,8 @@ Test Timeout 120s ${CMD} ${CENTREON_PLUGINS} ... --plugin=hardware::devices::camera::avigilon::snmp::plugin ... --mode=temperature -... --hostname=127.0.0.1 -... --snmp-port=2024 +... --hostname=${HOSTNAME} +... --snmp-port=${SNMPPORT} *** Test Cases *** @@ -26,12 +26,7 @@ Avigilon camera Temperature ${tc}/5 ... --warning-status='${warning_status}' ... --critical-status='${critical_status}' - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc warning_temperature critical_temperature warning_status critical_status expected_result -- ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: temperature: 23.00 C, sensor 1 [type:mainSensor] status: ok | 'sensor.temperature.celsius'=23C;;;0; diff --git a/tests/robot/hardware/kvm/avocent/acs/8000/hardware-kvm-avocent-acs-8000.robot b/tests/robot/hardware/kvm/avocent/acs/8000/hardware-kvm-avocent-acs-8000.robot index 80c050225e..5031172d04 100644 --- a/tests/robot/hardware/kvm/avocent/acs/8000/hardware-kvm-avocent-acs-8000.robot +++ b/tests/robot/hardware/kvm/avocent/acs/8000/hardware-kvm-avocent-acs-8000.robot @@ -7,9 +7,6 @@ Test Timeout 120s *** Variables *** -${HOSTADDRESS} 127.0.0.1 -${SNMPPORT} 2024 -${SNMPVERSION} 2c ${SNMPCOMMUNITY} hardware/kvm/avocent/acs/8000/avocent8000 @@ -93,7 +90,7 @@ Run Avocent 8000 Plugin ... ${CENTREON_PLUGINS} ... --plugin=hardware::kvm::avocent::acs::8000::snmp::plugin ... --mode=${mode} - ... --hostname=${HOSTADDRESS} + ... --hostname=${HOSTNAME} ... --snmp-version=${SNMPVERSION} ... --snmp-port=${SNMPPORT} ... --snmp-community=${SNMPCOMMUNITY} diff --git a/tests/robot/hardware/sensors/apc/snmp/hardware-sensors-apc-snmp.robot b/tests/robot/hardware/sensors/apc/snmp/hardware-sensors-apc-snmp.robot index 1fd8544222..9dc74e06e7 100644 --- a/tests/robot/hardware/sensors/apc/snmp/hardware-sensors-apc-snmp.robot +++ b/tests/robot/hardware/sensors/apc/snmp/hardware-sensors-apc-snmp.robot @@ -7,7 +7,7 @@ Test Timeout 120s *** Variables *** -${CMD} ${CENTREON_PLUGINS} --plugin=hardware::sensors::apc::snmp::plugin --mode=sensors --hostname=127.0.0.1 --snmp-version=2c --snmp-port=2024 +${CMD} ${CENTREON_PLUGINS} --plugin=hardware::sensors::apc::snmp::plugin --mode=sensors --hostname=${HOSTNAME} --snmp-version=${SNMPVERSION} --snmp-port=${SNMPPORT} *** Test Cases *** @@ -22,12 +22,7 @@ APC Sensors ${tc}/9 ${command} Append Option To Command ${command} --critical ${critical} ${command} Append Option To Command ${command} --component ${component} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... Wrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n} + Ctn Run Command And Check Result As Strings ${command} ${expected_result} # --component 'temperature' --warning='humidity,.,45:65' --critical='humidity,.,35:70' Examples: tc component warning critical expected_result -- ... 1 _empty_ _empty_ _empty_ OK: All 2 components are ok [2/2 temperatures]. | 'Main Module:Sonde de temperature#hardware.sensor.temperature.celsius'=23C;;;; 'Main Module:Sonde de temperature#hardware.sensor.humidity.percentage'=35%;;;0;100 'hardware.temperature.count'=2;;;; diff --git a/tests/robot/hardware/ups/inmatics/sputnik/snmp/hardware-ups-sputnik-snmp.robot b/tests/robot/hardware/ups/inmatics/sputnik/snmp/hardware-ups-sputnik-snmp.robot index 7ba4d1290f..b8bb55b34f 100644 --- a/tests/robot/hardware/ups/inmatics/sputnik/snmp/hardware-ups-sputnik-snmp.robot +++ b/tests/robot/hardware/ups/inmatics/sputnik/snmp/hardware-ups-sputnik-snmp.robot @@ -16,9 +16,9 @@ Sputnik UPS - Environment ${tc}/9 ${command} Catenate ... ${CMD} ... --mode=environment - ... --hostname=127.0.0.1 - ... --snmp-version=2c - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=hardware/ups/inmatics/sputnik/snmp/hardware-ups-sputnik # Append options to command @@ -33,12 +33,7 @@ Sputnik UPS - Environment ${tc}/9 ${opt} Append Option --filter-id ${filter_id} ${command} Catenate ${command} ${opt} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... Wrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n} + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc filter_id w_temperature c_temperature w_humidity c_humidity expected_result -- ... 1 1 30 50 50 70 OK: 'Sensor 1': temperature 20.06 C, humidity 33 % | 'Sensor 1#environment.temperature.celsius'=20.06C;0:30;0:50;; 'Sensor 1#environment.humidity.percentage'=33%;0:50;0:70;0;100 diff --git a/tests/robot/hardware/ups/socomec/netvision/snmp/hardware-ups-socomec-netvision-snmp.robot b/tests/robot/hardware/ups/socomec/netvision/snmp/hardware-ups-socomec-netvision-snmp.robot index daff8dba2b..1bcef49b07 100644 --- a/tests/robot/hardware/ups/socomec/netvision/snmp/hardware-ups-socomec-netvision-snmp.robot +++ b/tests/robot/hardware/ups/socomec/netvision/snmp/hardware-ups-socomec-netvision-snmp.robot @@ -16,9 +16,9 @@ Battery ${tc}/4 ${command} Catenate ... ${CMD} ... --mode=battery - ... --hostname=127.0.0.1 - ... --snmp-version=2c - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=hardware/ups/socomec/netvision/snmp/battery # Append options to command @@ -27,12 +27,7 @@ Battery ${tc}/4 ${opt} Append Option --critical-temperature ${c_temperature} ${command} Catenate ${command} ${opt} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... ${command} \nWrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n} + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc w_temperature c_temperature expected_result -- ... 1 30 50 OK: battery status is normal - charge remaining: 100% (0 minutes remaining) | 'battery.charge.remaining.percent'=100%;;;0;100 'battery.charge.remaining.minutes'=0;;;0; 'battery.voltage.volt'=339.1V;;;; 'battery.temperature.celsius'=22C;0:30;0:50;; diff --git a/tests/robot/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot b/tests/robot/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot index 1387268eaf..d1cd1f6f82 100644 --- a/tests/robot/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot +++ b/tests/robot/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot @@ -65,9 +65,9 @@ Hardware UPS Standard SNMP input lines ${command} Catenate ... ${CMD} ... --mode=input-lines - ... --hostname=127.0.0.1 - ... --snmp-version=2c - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=${ups_standard_test.snmpcommunity} ${length} Get Length ${ups_standard_test.warningpower} IF ${length} > 0 diff --git a/tests/robot/network/aruba/instant/snmp/aruba-instant-ap-usage.robot b/tests/robot/network/aruba/instant/snmp/aruba-instant-ap-usage.robot index f40c341446..be24da5b94 100644 --- a/tests/robot/network/aruba/instant/snmp/aruba-instant-ap-usage.robot +++ b/tests/robot/network/aruba/instant/snmp/aruba-instant-ap-usage.robot @@ -7,7 +7,7 @@ Test Timeout 120s *** Variables *** -${CMD} ${CENTREON_PLUGINS} --plugin=network::aruba::instant::snmp::plugin --mode=ap-usage --hostname=127.0.0.1 --snmp-version=2c --snmp-port=2024 +${CMD} ${CENTREON_PLUGINS} --plugin=network::aruba::instant::snmp::plugin --mode=ap-usage --hostname=${HOSTNAME} --snmp-version=${SNMPVERSION} --snmp-port=${SNMPPORT} &{ap_usage_test_1} ... documentation=Test AP usage without filters @@ -66,10 +66,5 @@ Network Aruba Instant SNMP plugin ... --snmp-community=${ap_usage_tc.snmpcommunity} Log To Console ${command} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${ap_usage_tc.result} - ... Wrong output result for compliance of ${ap_usage_tc.result}{\n}Command output:{\n}${output}{\n}{\n}{\n} + Ctn Run Command And Check Result As Strings ${command} ${ap_usage_tc.result} END diff --git a/tests/robot/network/cisco/meraki/cloudcontroller/restapi/vpntunnels.robot b/tests/robot/network/cisco/meraki/cloudcontroller/restapi/vpntunnels.robot index af59e31b9d..59876807da 100644 --- a/tests/robot/network/cisco/meraki/cloudcontroller/restapi/vpntunnels.robot +++ b/tests/robot/network/cisco/meraki/cloudcontroller/restapi/vpntunnels.robot @@ -10,15 +10,16 @@ Test Timeout 120s *** Variables *** ${MOCKOON_JSON} ${CURDIR}${/}meraki.mockoon.json -${CMD} ${CENTREON_PLUGINS} --plugin=network::cisco::meraki::cloudcontroller::restapi::plugin -... --api-token=EEECGFCGFCGF +${CMD} ${CENTREON_PLUGINS} --plugin=network::cisco::meraki::cloudcontroller::restapi::plugin +... --api-token=EEECGFCGFCGF ... --statefile-dir=/dev/shm/ + *** Test Cases *** Create cache from API [Tags] meraki api vpn network cache ${output} Run - ... ${CMD} --mode=cache --proto http --port 3000 --hostname=127.0.0.1 + ... ${CMD} --mode=cache --proto=http --port=${APIPORT} --hostname=${HOSTNAME} ${output} Strip String ${output} Should Be Equal As Strings @@ -30,17 +31,13 @@ Create cache from API Check if ${test_desc} works [Tags] meraki api vpn network - ${output} Run - ... ${CMD} --mode=vpn-tunnels --filter-network-name=${filter_network_name} --cache-use --critical-total-dormant=1: + ${command} Catenate + ... ${CMD} + ... --mode=vpn-tunnels --filter-network-name=${filter_network_name} --cache-use --critical-total-dormant=1: + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected} - ... Wrong output result:\n\n ${output}\nInstead of:\n ${expected}\n\n - - Examples: test_desc filter_network_name expected -- + Examples: test_desc filter_network_name expected_result -- ... all links .* OK: vpn tunnel 'C3PO-R2P2-BB88' status: dormant [mode: spoke] | 'vpn.tunnels.online.count'=0;;;0;1 'vpn.tunnels.offline.count'=0;;;0;1 'vpn.tunnels.dormant.count'=1;;1:;0;1 ... empty filter ${EMPTY} OK: vpn tunnel 'C3PO-R2P2-BB88' status: dormant [mode: spoke] | 'vpn.tunnels.online.count'=0;;;0;1 'vpn.tunnels.offline.count'=0;;;0;1 'vpn.tunnels.dormant.count'=1;;1:;0;1 ... absurd filter toto CRITICAL: Vpn tunnels dormant: 0 | 'vpn.tunnels.online.count'=0;;;0;0 'vpn.tunnels.offline.count'=0;;;0;0 'vpn.tunnels.dormant.count'=0;;1:;0;0 - diff --git a/tests/robot/network/citrix/netscaler/snmp/mode/components/netscaler-health.robot b/tests/robot/network/citrix/netscaler/snmp/mode/components/netscaler-health.robot index 127ae7db03..2fa17547b6 100644 --- a/tests/robot/network/citrix/netscaler/snmp/mode/components/netscaler-health.robot +++ b/tests/robot/network/citrix/netscaler/snmp/mode/components/netscaler-health.robot @@ -17,18 +17,13 @@ check psu components ${tc}/2 ${command} Catenate ... ${CMD} ... --mode=health - ... --hostname='127.0.0.1' - ... --snmp-port='2024' + ... --hostname=${HOSTNAME} + ... --snmp-port=${SNMPPORT} ... --snmp-community='network/citrix/netscaler/snmp/mode/components/${community}' ... --component=psu ... --alternative-status-mapping='${alternative_status_mapping}' - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc alternative_status_mapping community expected_result -- ... 1 true psu-citrix-v13 OK: All 4 components are ok [4/4 psus]. | 'count_psu'=4;;;; diff --git a/tests/robot/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot b/tests/robot/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot index 0ed4814b0b..5bfad4334e 100644 --- a/tests/robot/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot +++ b/tests/robot/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot @@ -306,9 +306,9 @@ Network Fortinet Fortigate SNMP link monitor ${command} Catenate ... ${CMD} ... --mode=link-monitor - ... --hostname=127.0.0.1 - ... --snmp-version=2c - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor ${length} Get Length ${fortinet_fortigate_linkmonitor_test.filterid} IF ${length} > 0 @@ -382,14 +382,9 @@ Network Fortinet Fortigate SNMP link monitor ... ${command} ... --critical-packet-loss=${fortinet_fortigate_linkmonitor_test.criticalpacketloss} END - ${output} Run ${command} + Log To Console . no_newline=true - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${fortinet_fortigate_linkmonitor_test.result} - ... Wrong result output for:${\n}Command: ${\n}${command}${\n}${\n}Expected output: ${\n}${fortinet_fortigate_linkmonitor_test.result}${\n}${\n}Obtained output:${\n}${output}${\n}${\n}${\n} - ... values=False + Ctn Run Command And Check Result As Strings ${command} ${fortinet_fortigate_linkmonitor_test.result} END Network Fortinet Fortigate SNMP list link monitor @@ -399,9 +394,9 @@ Network Fortinet Fortigate SNMP list link monitor ${command} Catenate ... ${CMD} ... --mode=list-link-monitors - ... --hostname=127.0.0.1 - ... --snmp-version=2c - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor ${length} Get Length ${fortinet_fortigate_listlinkmonitors_test.filterstate} IF ${length} > 0 @@ -421,12 +416,5 @@ Network Fortinet Fortigate SNMP list link monitor ... ${command} ... --filter-vdom=${fortinet_fortigate_listlinkmonitors_test.filtervdom} END - ${output} Run ${command} - Log To Console . no_newline=true - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${fortinet_fortigate_listlinkmonitors_test.result} - ... Wrong result output for:${\n}Command: ${\n}${command}${\n}${\n}Expected output: ${\n}${fortinet_fortigate_listlinkmonitors_test.result}${\n}${\n}Obtained output:${\n}${output}${\n}${\n}${\n} - ... values=False + Ctn Run Command And Check Result As Strings ${command} ${fortinet_fortigate_listlinkmonitors_test.result} END diff --git a/tests/robot/network/teldat/snmp/cellsradio.robot b/tests/robot/network/teldat/snmp/cellsradio.robot new file mode 100644 index 0000000000..1dd25f1544 --- /dev/null +++ b/tests/robot/network/teldat/snmp/cellsradio.robot @@ -0,0 +1,52 @@ +*** 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} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + + Examples: tc customperfdatainstances criticalstatus warningmodulescellradiodetected criticalmodulescellradiodetected warningmodulecellradiorsrp criticalmodulecellradiorsrp warningmodulecellradiorsrq criticalmodulecellradiorsrq warningmodulecellradiocsq criticalmodulecellradiocsq warningmodulecellradiosnr criticalmodulecellradiosnr expected_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; diff --git a/tests/robot/network/teldat/snmp/cpu.robot b/tests/robot/network/teldat/snmp/cpu.robot new file mode 100644 index 0000000000..3fe0542f3b --- /dev/null +++ b/tests/robot/network/teldat/snmp/cpu.robot @@ -0,0 +1,40 @@ +*** 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 *** +CPU ${tc} + [Tags] network teldat snmp + ${command} Catenate + ... ${CMD} + ... --mode=cpu + ... --hostname=127.0.0.1 + ... --snmp-version=2c + ... --snmp-port=2024 + ... --snmp-community=network/teldat/snmp/teldat + ... --warning-cpu-utilization-5s=${warningcpuutilization5s} + ... --critical-cpu-utilization-5s=${criticalcpuutilization5s} + ... --warning-cpu-utilization-1m=${warningcpuutilization1m} + ... --critical-cpu-utilization-1m=${criticalcpuutilization1m} + ... --warning-cpu-utilization-5m=${warningcpuutilization5m} + ... --critical-cpu-utilization-5m=${criticalcpuutilization5m} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + + Examples: tc warningcpuutilization5s criticalcpuutilization5s warningcpuutilization1m criticalcpuutilization1m warningcpuutilization5m criticalcpuutilization5m expected_result -- + ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 2 0.5 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 3 ${EMPTY} 0.5 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 4 ${EMPTY} ${EMPTY} 0.5 ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 5 ${EMPTY} ${EMPTY} ${EMPTY} 0.5 ${EMPTY} ${EMPTY} 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 + ... 6 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0.5 ${EMPTY} 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 + ... 7 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0.5 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 diff --git a/tests/robot/network/teldat/snmp/memory.robot b/tests/robot/network/teldat/snmp/memory.robot new file mode 100644 index 0000000000..e97040be17 --- /dev/null +++ b/tests/robot/network/teldat/snmp/memory.robot @@ -0,0 +1,40 @@ +*** 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 *** +Memory ${tc} + [Tags] network teldat snmp + ${command} Catenate + ... ${CMD} + ... --mode=memory + ... --hostname=127.0.0.1 + ... --snmp-version=2c + ... --snmp-port=2024 + ... --snmp-community=network/teldat/snmp/teldat + ... --warning-usage=${warningusage} + ... --critical-usage=${criticalusage} + ... --warning-usage-free=${warningusagefree} + ... --critical-usage-free=${criticalusagefree} + ... --warning-usage-prct=${warningusageprct} + ... --critical-usage-prct=${criticalusageprct} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + + Examples: tc warningusage criticalusage warningusagefree criticalusagefree warningusageprct criticalusageprct expected_result -- + ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 2 100 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 3 ${EMPTY} 100 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 4 ${EMPTY} ${EMPTY} 100 ${EMPTY} ${EMPTY} ${EMPTY} 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 + ... 5 ${EMPTY} ${EMPTY} ${EMPTY} 100 ${EMPTY} ${EMPTY} 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 + ... 6 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 30 ${EMPTY} 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 + ... 7 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 30 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 diff --git a/tests/robot/network/teldat/snmp/teldat.robot b/tests/robot/network/teldat/snmp/teldat.robot deleted file mode 100644 index 86a5e5619e..0000000000 --- a/tests/robot/network/teldat/snmp/teldat.robot +++ /dev/null @@ -1,719 +0,0 @@ -*** Settings *** -Documentation Network Teldat SNMP plugin - -Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource - -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= -... 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/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 - [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/teldat - ${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/teldat - ${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 diff --git a/tests/robot/os/linux/snmp/list-diskio.robot b/tests/robot/os/linux/snmp/list-diskio.robot index 15ba6333f6..04a6ce48e0 100644 --- a/tests/robot/os/linux/snmp/list-diskio.robot +++ b/tests/robot/os/linux/snmp/list-diskio.robot @@ -7,7 +7,7 @@ Test Timeout 120s *** Variables *** -${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin +${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin *** Test Cases *** @@ -17,9 +17,9 @@ List diskio ${tc} ${command} Catenate ... ${CMD} ... --mode=list-diskio - ... --hostname=127.0.0.1 - ... --snmp-version=2 - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --disco-show ... --snmp-community=${snmpcommunity} ${output} Run ${command} @@ -32,5 +32,5 @@ List diskio ${tc} ... Wrong output result for command:{\n}{\n}${command}{\n}{\n}Command output:{\n}{\n}${output} Examples: tc snmpcommunity expected_result -- - ... 1 os/linux/snmp/list-diskio 10 - ... 2 os/linux/snmp/list-diskio-2 4 \ No newline at end of file + ... 1 os/linux/snmp/list-diskio 10 + ... 2 os/linux/snmp/list-diskio-2 4 diff --git a/tests/robot/os/linux/snmp/network-interfaces.robot b/tests/robot/os/linux/snmp/network-interfaces.robot index 1284ef19ac..9c5e79caa9 100644 --- a/tests/robot/os/linux/snmp/network-interfaces.robot +++ b/tests/robot/os/linux/snmp/network-interfaces.robot @@ -10,8 +10,8 @@ Test Timeout 120s ${CMD} ${CENTREON_PLUGINS} ... --plugin=os::linux::snmp::plugin ... --mode=interfaces -... --hostname=127.0.0.1 -... --snmp-port=2024 +... --hostname=${HOSTNAME} +... --snmp-port=${SNMPPORT} ... --snmp-community=os/linux/snmp/network-interfaces ... --statefile-dir=/tmp/cache/ @@ -26,15 +26,10 @@ Interfaces by id ${tc}/5 ... --interface='${filter}' ... ${extra_options} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} - Examples: tc filter extra_options expected_result -- - ... 1 1 ${EMPTY} OK: Interface 'lo' Status : up (admin: up) + Examples: tc filter extra_options expected_result -- + ... 1 1 ${EMPTY} OK: Interface 'lo' Status : up (admin: up) ... 2 1,3 --add-traffic OK: All interfaces are ok ... 3 1,3 --add-traffic OK: All interfaces are ok | 'traffic_in_lo'=0.00b/s;;;0;10000000 'traffic_out_lo'=0.00b/s;;;0;10000000 'traffic_in_eth1'=0.00b/s;;;0;1000000000 'traffic_out_eth1'=0.00b/s;;;0;1000000000 ... 4 2,3,4 --add-traffic OK: All interfaces are ok @@ -50,12 +45,7 @@ Interfaces by id regexp ${tc}/6 ... --regex-id ... ${extra_options} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc filter extra_options expected_result -- ... 1 ^1$ ${EMPTY} OK: Interface 'lo' Status : up (admin: up) diff --git a/tests/robot/os/windows/snmp/services.robot b/tests/robot/os/windows/snmp/services.robot index d00096e9d6..69d85a7846 100644 --- a/tests/robot/os/windows/snmp/services.robot +++ b/tests/robot/os/windows/snmp/services.robot @@ -10,12 +10,12 @@ Test Timeout 120s ${CMD} ${CENTREON_PLUGINS} ... --plugin=os::windows::snmp::plugin ... --mode=service -... --hostname=127.0.0.1 -... --snmp-port=2024 +... --hostname=${HOSTNAME} +... --snmp-port=${SNMPPORT} *** Test Cases *** -Windows Services EN ${tc}/x +Windows Services EN ${tc} [Documentation] Full ASCII [Tags] os linux local ${command} Catenate @@ -24,12 +24,7 @@ Windows Services EN ${tc}/x ... --filter-name='${filter}' ... ${extra_option} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n + Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc filter extra_option expected_result -- ... 1 ${EMPTY} ${EMPTY} OK: All services are ok | 'services.total.count'=168;;;0; 'services.active.count'=168;;;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0; diff --git a/tests/robot/storage/datacore/restapi/storage-datacore-restapi.robot b/tests/robot/storage/datacore/restapi/storage-datacore-restapi.robot index 00bbb67a93..0d34cccb6d 100644 --- a/tests/robot/storage/datacore/restapi/storage-datacore-restapi.robot +++ b/tests/robot/storage/datacore/restapi/storage-datacore-restapi.robot @@ -11,50 +11,53 @@ Test Timeout 120s *** Variables *** ${MOCKOON_JSON} ${CURDIR}${/}storage-datacore-api.json -${CMD} ${CENTREON_PLUGINS} --plugin=storage::datacore::restapi::plugin --password=pass --username=user --port=3000 --hostname=127.0.0.1 --proto=http +${CMD} ${CENTREON_PLUGINS} --plugin=storage::datacore::restapi::plugin --password=pass --username=user --port=${APIPORT} --hostname=${HOSTNAME} --proto=http *** Test Cases *** Datacore check pool usage [Documentation] Check Datacore pool usage [Tags] storage api - ${output} Run - ... ${CMD} --mode=pool-usage --critical-oversubscribed=${critical-oversubscribed} --warning-oversubscribed=${warning-oversubscribed} --warning-bytesallocatedpercentage=${warning-bytesallocatedpercentage} --critical-bytesallocatedpercentage=${critical-bytesallocatedpercentage} --pool-id=B5C140F5-6B13-4CAD-AF9D-F7C4172B3A1D:{4dec1b5a-2577-11e5-80c3-00155d651622} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${result} - ... Wrong output result for pool usage :\n\n ${output} \n\n ${result}\n\n - - Examples: warning-bytesallocatedpercentage critical-bytesallocatedpercentage warning-oversubscribed critical-oversubscribed result -- - ... 2 5 -1 3 CRITICAL: Bytes Allocated : 12 % WARNING: Over subscribed bytes : 0 | 'datacore.pool.bytesallocated.percentage'=12%;0:2;0:5;0;100 'datacore.pool.oversubscribed.bytes'=0bytes;0:-1;0:3;0; - ... 70 80 10 20 OK: Bytes Allocated : 12 % - Over subscribed bytes : 0 | 'datacore.pool.bytesallocated.percentage'=12%;0:70;0:80;0;100 'datacore.pool.oversubscribed.bytes'=0bytes;0:10;0:20;0; + ${command} Catenate + ... ${CMD} + ... --mode=pool-usage + ... --critical-oversubscribed=${critical-oversubscribed} + ... --warning-oversubscribed=${warning-oversubscribed} + ... --warning-bytesallocatedpercentage=${warning-bytesallocatedpercentage} + ... --critical-bytesallocatedpercentage=${critical-bytesallocatedpercentage} + ... --pool-id=B5C140F5-6B13-4CAD-AF9D-F7C4172B3A1D:{4dec1b5a-2577-11e5-80c3-00155d651622} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: warning-bytesallocatedpercentage critical-bytesallocatedpercentage warning-oversubscribed critical-oversubscribed expected_result -- + ... 2 5 -1 3 CRITICAL: Bytes Allocated : 12 % WARNING: Over subscribed bytes : 0 | 'datacore.pool.bytesallocated.percentage'=12%;0:2;0:5;0;100 'datacore.pool.oversubscribed.bytes'=0bytes;0:-1;0:3;0; + ... 70 80 10 20 OK: Bytes Allocated : 12 % - Over subscribed bytes : 0 | 'datacore.pool.bytesallocated.percentage'=12%;0:70;0:80;0;100 'datacore.pool.oversubscribed.bytes'=0bytes;0:10;0:20;0; Datacore check alert count [Documentation] Check Datacore pool usage [Tags] storage api - ${output} Run - ... ${CMD} --mode=alerts --warning-error=${warning-error} --critical-error=${critical-error} --warning-warning=${warning-warning} --critical-warning=${critical-warning} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${result} - ... Wrong output result for alert count :\n\n ${output} \n\n ${result}\n\n - - Examples: warning-error critical-error warning-warning critical-warning result -- - ... 0 1 5 5 WARNING: number of error alerts : 1 | 'datacore.event.error.count'=1;0:0;0:1;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; - ... 5 5 5 5 OK: number of error alerts : 1, number of warning alerts : 1, number of info alerts : 0, number of trace alerts : 0 | 'datacore.event.error.count'=1;0:5;0:5;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; + ${command} Catenate + ... ${CMD} + ... --mode=alerts + ... --warning-error=${warning-error} + ... --critical-error=${critical-error} + ... --warning-warning=${warning-warning} + ... --critical-warning=${critical-warning} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: warning-error critical-error warning-warning critical-warning expected_result -- + ... 0 1 5 5 WARNING: number of error alerts : 1 | 'datacore.event.error.count'=1;0:0;0:1;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; + ... 5 5 5 5 OK: number of error alerts : 1, number of warning alerts : 1, number of info alerts : 0, number of trace alerts : 0 | 'datacore.event.error.count'=1;0:5;0:5;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; Datacore check status monitor [Documentation] Check Datacore pool usage [Tags] storage api - ${output} Run - ... ${CMD} --mode=status-monitor - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${result} - ... Wrong output result for status monitor :\n${output} \nresult:\n${result}\n\n - - Examples: result -- - ... CRITICAL: 'State of HostVM2' status : 'Critical', message is 'Connected' + ${command} Catenate + ... ${CMD} + ... --mode=status-monitor + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: expected_result -- + ... CRITICAL: 'State of HostVM2' status : 'Critical', message is 'Connected' diff --git a/tests/robot/storage/hp/primera/restapi/capacity.robot b/tests/robot/storage/hp/primera/restapi/capacity.robot new file mode 100644 index 0000000000..90be1e33e6 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/capacity.robot @@ -0,0 +1,54 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode=capacity +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +Capacity ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + + Examples: tc extraoptions expected_result -- + ... 1 --filter-type=allCapacity OK: storage 'allCapacity' space usage total: 378.60 TB used: 127.11 TB (33.57%) free: 251.50 TB (66.43%), unavailable: 0.00 B, failed: 0.00 B - compaction: 1.66, deduplication: 1.02, compression: 1.37, data reduction: 1.37, overprovisioning: 0.45 | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 2 --filter-type=FCCapacity OK: storage 'FCCapacity' space usage total: 104.72 TB used: 25.69 TB (24.53%) free: 79.03 TB (75.47%), unavailable: 0.00 B, failed: 0.00 B - compaction: 1.98, deduplication: 0, data reduction: 0, overprovisioning: 0.39 | 'FCCapacity#storage.space.usage.bytes'=28242631196672B;;;0;115139483271168 'FCCapacity#storage.space.free.bytes'=86896852074496B;;;0;115139483271168 'FCCapacity#storage.space.usage.percentage'=24.53%;;;0;100 'FCCapacity#storage.space.unavailable.bytes'=0B;;;0; 'FCCapacity#storage.space.failed.bytes'=0B;;;0; 'FCCapacity#storage.space.compaction.ratio.count'=1.98;;;0; 'FCCapacity#storage.space.deduplication.ratio.count'=0;;;0; 'FCCapacity#storage.space.data_reduction.ratio.count'=0;;;0; 'FCCapacity#storage.space.overprovisioning.ratio.count'=0.39;;;0; + ... 3 --filter-type=SSDCapacity OK: storage 'SSDCapacity' space usage total: 24.43 TB used: 10.23 TB (41.88%) free: 14.20 TB (58.12%), unavailable: 0.00 B, failed: 0.00 B - compaction: 2.12, deduplication: 1.02, compression: 1.37, data reduction: 1.37, overprovisioning: 0.54 | 'SSDCapacity#storage.space.usage.bytes'=11250666831872B;;;0;26862872952832 'SSDCapacity#storage.space.free.bytes'=15612206120960B;;;0;26862872952832 'SSDCapacity#storage.space.usage.percentage'=41.88%;;;0;100 'SSDCapacity#storage.space.unavailable.bytes'=0B;;;0; 'SSDCapacity#storage.space.failed.bytes'=0B;;;0; 'SSDCapacity#storage.space.compaction.ratio.count'=2.12;;;0; 'SSDCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'SSDCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'SSDCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'SSDCapacity#storage.space.overprovisioning.ratio.count'=0.54;;;0; + ... 4 --filter-type=NLCapacity OK: storage 'NLCapacity' space usage total: 249.45 TB used: 91.19 TB (36.55%) free: 158.27 TB (63.45%), unavailable: 0.00 B, failed: 0.00 B - compaction: 1.51, deduplication: 0, data reduction: 0, overprovisioning: 0.47 | 'NLCapacity#storage.space.usage.bytes'=100261716557824B;;;0;274276611522560 'NLCapacity#storage.space.free.bytes'=174014894964736B;;;0;274276611522560 'NLCapacity#storage.space.usage.percentage'=36.55%;;;0;100 'NLCapacity#storage.space.unavailable.bytes'=0B;;;0; 'NLCapacity#storage.space.failed.bytes'=0B;;;0; 'NLCapacity#storage.space.compaction.ratio.count'=1.51;;;0; 'NLCapacity#storage.space.deduplication.ratio.count'=0;;;0; 'NLCapacity#storage.space.data_reduction.ratio.count'=0;;;0; 'NLCapacity#storage.space.overprovisioning.ratio.count'=0.47;;;0; + ... 5 --filter-type=allCapacity --warning-compaction=2: WARNING: storage 'allCapacity' compaction: 1.66 | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;2:;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 6 --filter-type=allCapacity --critical-deduplication=2: CRITICAL: storage 'allCapacity' deduplication: 1.02 | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;2:;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 7 --filter-type=allCapacity --warning-data-reduction=2: WARNING: storage 'allCapacity' data reduction: 1.37 | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;2:;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 8 --filter-type=allCapacity --critical-overprovisioning=20 OK: storage 'allCapacity' space usage total: 378.60 TB used: 127.11 TB (33.57%) free: 251.50 TB (66.43%), unavailable: 0.00 B, failed: 0.00 B - compaction: 1.66, deduplication: 1.02, compression: 1.37, data reduction: 1.37, overprovisioning: 0.45 | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;0:20;0; + ... 9 --critical-deduplication=2: CRITICAL: storage 'FCCapacity' deduplication: 0 - storage 'NLCapacity' deduplication: 0 - storage 'SSDCapacity' deduplication: 1.02 - storage 'allCapacity' deduplication: 1.02 | 'FCCapacity#storage.space.usage.bytes'=28242631196672B;;;0;115139483271168 'FCCapacity#storage.space.free.bytes'=86896852074496B;;;0;115139483271168 'FCCapacity#storage.space.usage.percentage'=24.53%;;;0;100 'FCCapacity#storage.space.unavailable.bytes'=0B;;;0; 'FCCapacity#storage.space.failed.bytes'=0B;;;0; 'FCCapacity#storage.space.compaction.ratio.count'=1.98;;;0; 'FCCapacity#storage.space.deduplication.ratio.count'=0;;2:;0; 'FCCapacity#storage.space.data_reduction.ratio.count'=0;;;0; 'FCCapacity#storage.space.overprovisioning.ratio.count'=0.39;;;0; 'NLCapacity#storage.space.usage.bytes'=100261716557824B;;;0;274276611522560 'NLCapacity#storage.space.free.bytes'=174014894964736B;;;0;274276611522560 'NLCapacity#storage.space.usage.percentage'=36.55%;;;0;100 'NLCapacity#storage.space.unavailable.bytes'=0B;;;0; 'NLCapacity#storage.space.failed.bytes'=0B;;;0; 'NLCapacity#storage.space.compaction.ratio.count'=1.51;;;0; 'NLCapacity#storage.space.deduplication.ratio.count'=0;;2:;0; 'NLCapacity#storage.space.data_reduction.ratio.count'=0;;;0; 'NLCapacity#storage.space.overprovisioning.ratio.count'=0.47;;;0; 'SSDCapacity#storage.space.usage.bytes'=11250666831872B;;;0;26862872952832 'SSDCapacity#storage.space.free.bytes'=15612206120960B;;;0;26862872952832 'SSDCapacity#storage.space.usage.percentage'=41.88%;;;0;100 'SSDCapacity#storage.space.unavailable.bytes'=0B;;;0; 'SSDCapacity#storage.space.failed.bytes'=0B;;;0; 'SSDCapacity#storage.space.compaction.ratio.count'=2.12;;;0; 'SSDCapacity#storage.space.deduplication.ratio.count'=1.02;;2:;0; 'SSDCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'SSDCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'SSDCapacity#storage.space.overprovisioning.ratio.count'=0.54;;;0; 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;2:;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 10 --filter-type=allCapacity --warning-space-usage=180 WARNING: storage 'allCapacity' space usage total: 378.60 TB used: 127.11 TB (33.57%) free: 251.50 TB (66.43%) | 'allCapacity#storage.space.usage.bytes'=139755014586368B;0:180;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 11 --filter-type=allCapacity --critical-space-usage-free=180 CRITICAL: storage 'allCapacity' space usage total: 378.60 TB used: 127.11 TB (33.57%) free: 251.50 TB (66.43%) | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;0:180;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 12 --filter-type=allCapacity --warning-space-usage-prct=20 WARNING: storage 'allCapacity' space usage total: 378.60 TB used: 127.11 TB (33.57%) free: 251.50 TB (66.43%) | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;0:20;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 13 --filter-type=allCapacity --critical-space-unavailable=20 OK: storage 'allCapacity' space usage total: 378.60 TB used: 127.11 TB (33.57%) free: 251.50 TB (66.43%), unavailable: 0.00 B, failed: 0.00 B - compaction: 1.66, deduplication: 1.02, compression: 1.37, data reduction: 1.37, overprovisioning: 0.45 | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;0:20;0; 'allCapacity#storage.space.failed.bytes'=0B;;;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; + ... 14 --filter-type=allCapacity --critical-space-failed=20 OK: storage 'allCapacity' space usage total: 378.60 TB used: 127.11 TB (33.57%) free: 251.50 TB (66.43%), unavailable: 0.00 B, failed: 0.00 B - compaction: 1.66, deduplication: 1.02, compression: 1.37, data reduction: 1.37, overprovisioning: 0.45 | 'allCapacity#storage.space.usage.bytes'=139755014586368B;;;0;416278967746560 'allCapacity#storage.space.free.bytes'=276523953160192B;;;0;416278967746560 'allCapacity#storage.space.usage.percentage'=33.57%;;;0;100 'allCapacity#storage.space.unavailable.bytes'=0B;;;0; 'allCapacity#storage.space.failed.bytes'=0B;;0:20;0; 'allCapacity#storage.space.compaction.ratio.count'=1.66;;;0; 'allCapacity#storage.space.deduplication.ratio.count'=1.02;;;0; 'allCapacity#storage.space.compression.ratio.count'=1.37;;;0; 'allCapacity#storage.space.data_reduction.ratio.count'=1.37;;;0; 'allCapacity#storage.space.overprovisioning.ratio.count'=0.45;;;0; diff --git a/tests/robot/storage/hp/primera/restapi/diskstatus.robot b/tests/robot/storage/hp/primera/restapi/diskstatus.robot new file mode 100644 index 0000000000..18848b0a49 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/diskstatus.robot @@ -0,0 +1,49 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode disk-status +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +Diskstatus ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} CRITICAL: Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed WARNING: Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;;;0;82 + ... 2 --critical-status='' WARNING: Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;;;0;82 + ... 3 --warning-status='' CRITICAL: Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;;;0;82 + ... 4 --warning-disks-new=0 CRITICAL: Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed WARNING: Disks new: 2 - Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;0:0;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;;;0;82 + ... 5 --warning-disks-total=83:83 CRITICAL: Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed WARNING: Disks total: 82 - Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;83:83;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;;;0;82 + ... 6 --critical-disks-failed=0 CRITICAL: Disks failed: 1 - Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed WARNING: Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;0:0;0;82 'disks.unknown.count'=1;;;0;82 + ... 7 --warning-disks-degraded=0 CRITICAL: Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed WARNING: Disks degraded: 1 - Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;0:0;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;;;0;82 + ... 8 --warning-disks-unknown=0 CRITICAL: Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed WARNING: Disks unknown: 1 - Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;0:0;;0;82 + ... 9 --warning-disks-normal=82:82 CRITICAL: Disk #73 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SWLT) located 7:5:0 is failed WARNING: Disks normal: 77 - Disk #75 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4SSKT) located 8:1:0 is unknown - Disk #78 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4TLLT) located 8:4:0 is new - Disk #79 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N1TT) located 8:5:0 is new - Disk #81 (WDC/WLEB14T0S5xeF7.2, serial: 9MJ4N8UT) located 8:7:0 is degraded | 'disks.total.count'=82;;;0; 'disks.normal.count'=77;82:82;;0;82 'disks.degraded.count'=1;;;0;82 'disks.new.count'=2;;;0;82 'disks.failed.count'=1;;;0;82 'disks.unknown.count'=1;;;0;82 diff --git a/tests/robot/storage/hp/primera/restapi/diskusage.robot b/tests/robot/storage/hp/primera/restapi/diskusage.robot new file mode 100644 index 0000000000..67d3ecbe28 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/diskusage.robot @@ -0,0 +1,53 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode=disk-usage +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +Disk Usage ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} + + ${output} Strip String ${output} + + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + Examples: tc extraoptions expected_result -- + ... 1 --filter-manufacturer=SAMSUNG --filter-counters='^usage$' OK: All disks are ok | '0#disk.space.usage.bytes'=652835028992B;;;0;1918776639488 '1#disk.space.usage.bytes'=651761287168B;;;0;1918776639488 '14#disk.space.usage.bytes'=1006096089088B;;;0;1918776639488 '15#disk.space.usage.bytes'=1006096089088B;;;0;1918776639488 '2#disk.space.usage.bytes'=652835028992B;;;0;1918776639488 '26#disk.space.usage.bytes'=1006096089088B;;;0;1918776639488 '27#disk.space.usage.bytes'=1006096089088B;;;0;1918776639488 '3#disk.space.usage.bytes'=651761287168B;;;0;1918776639488 '38#disk.space.usage.bytes'=651761287168B;;;0;1918776639488 '39#disk.space.usage.bytes'=650687545344B;;;0;1918776639488 '40#disk.space.usage.bytes'=651761287168B;;;0;1918776639488 '41#disk.space.usage.bytes'=650687545344B;;;0;1918776639488 '50#disk.space.usage.bytes'=1006096089088B;;;0;1918776639488 '51#disk.space.usage.bytes'=1006096089088B;;;0;1918776639488 + ... 2 --filter-manufacturer=SAMSUNG --filter-counters='^usage-free$' OK: All disks are ok | '0#disk.space.free.bytes'=652835028992B;;;0;1918776639488 '1#disk.space.free.bytes'=651761287168B;;;0;1918776639488 '14#disk.space.free.bytes'=1006096089088B;;;0;1918776639488 '15#disk.space.free.bytes'=1006096089088B;;;0;1918776639488 '2#disk.space.free.bytes'=652835028992B;;;0;1918776639488 '26#disk.space.free.bytes'=1006096089088B;;;0;1918776639488 '27#disk.space.free.bytes'=1006096089088B;;;0;1918776639488 '3#disk.space.free.bytes'=651761287168B;;;0;1918776639488 '38#disk.space.free.bytes'=651761287168B;;;0;1918776639488 '39#disk.space.free.bytes'=650687545344B;;;0;1918776639488 '40#disk.space.free.bytes'=651761287168B;;;0;1918776639488 '41#disk.space.free.bytes'=650687545344B;;;0;1918776639488 '50#disk.space.free.bytes'=1006096089088B;;;0;1918776639488 '51#disk.space.free.bytes'=1006096089088B;;;0;1918776639488 + ... 3 --filter-manufacturer=SAMSUNG --filter-counters='^usage-prct$' OK: All disks are ok | '0#disk.space.usage.percentage'=34.02%;;;0;100 '1#disk.space.usage.percentage'=33.97%;;;0;100 '14#disk.space.usage.percentage'=52.43%;;;0;100 '15#disk.space.usage.percentage'=52.43%;;;0;100 '2#disk.space.usage.percentage'=34.02%;;;0;100 '26#disk.space.usage.percentage'=52.43%;;;0;100 '27#disk.space.usage.percentage'=52.43%;;;0;100 '3#disk.space.usage.percentage'=33.97%;;;0;100 '38#disk.space.usage.percentage'=33.97%;;;0;100 '39#disk.space.usage.percentage'=33.91%;;;0;100 '40#disk.space.usage.percentage'=33.97%;;;0;100 '41#disk.space.usage.percentage'=33.91%;;;0;100 '50#disk.space.usage.percentage'=52.43%;;;0;100 '51#disk.space.usage.percentage'=52.43%;;;0;100 + ... 4 --filter-manufacturer=SAMSUNG --filter-counters='total' OK: Total Used: 10.23 TB / 24.43 TB, Total percentage used: 41.88 %, Total Free: 14.20 TB | 'disks.total.space.usage.bytes'=11250666831872;;;0;26862872952832 'disks.total.space.usage.percent'=41.8818450715485;;;0;100 'disks.total.space.free.bytes'=15612206120960;;;0;26862872952832 + ... 5 --filter-manufacturer=SAMSUNG --filter-counters='total' --warning-total-usage=5 WARNING: Total Used: 10.23 TB / 24.43 TB | 'disks.total.space.usage.bytes'=11250666831872;0:5;;0;26862872952832 'disks.total.space.usage.percent'=41.8818450715485;;;0;100 'disks.total.space.free.bytes'=15612206120960;;;0;26862872952832 + ... 6 --filter-manufacturer=SAMSUNG --filter-counters='total' --critical-total-usage=5 CRITICAL: Total Used: 10.23 TB / 24.43 TB | 'disks.total.space.usage.bytes'=11250666831872;;0:5;0;26862872952832 'disks.total.space.usage.percent'=41.8818450715485;;;0;100 'disks.total.space.free.bytes'=15612206120960;;;0;26862872952832 + ... 7 --filter-manufacturer=SAMSUNG --filter-counters='total' --warning-total-usage-prct=35 WARNING: Total percentage used: 41.88 % | 'disks.total.space.usage.bytes'=11250666831872;;;0;26862872952832 'disks.total.space.usage.percent'=41.8818450715485;0:35;;0;100 'disks.total.space.free.bytes'=15612206120960;;;0;26862872952832 + ... 8 --filter-manufacturer=SAMSUNG --filter-counters='total' --critical-total-usage-prct=35 CRITICAL: Total percentage used: 41.88 % | 'disks.total.space.usage.bytes'=11250666831872;;;0;26862872952832 'disks.total.space.usage.percent'=41.8818450715485;;0:35;0;100 'disks.total.space.free.bytes'=15612206120960;;;0;26862872952832 + ... 9 --filter-manufacturer=SAMSUNG --filter-counters='^usage$' --warning-usage=1000000000000 WARNING: Disk #14 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600288) located 2:0:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #15 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600290) located 2:1:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #26 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600289) located 3:0:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #27 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600293) located 3:1:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #50 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600297) located 5:0:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #51 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600287) located 5:1:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) | '0#disk.space.usage.bytes'=652835028992B;0:1000000000000;;0;1918776639488 '1#disk.space.usage.bytes'=651761287168B;0:1000000000000;;0;1918776639488 '14#disk.space.usage.bytes'=1006096089088B;0:1000000000000;;0;1918776639488 '15#disk.space.usage.bytes'=1006096089088B;0:1000000000000;;0;1918776639488 '2#disk.space.usage.bytes'=652835028992B;0:1000000000000;;0;1918776639488 '26#disk.space.usage.bytes'=1006096089088B;0:1000000000000;;0;1918776639488 '27#disk.space.usage.bytes'=1006096089088B;0:1000000000000;;0;1918776639488 '3#disk.space.usage.bytes'=651761287168B;0:1000000000000;;0;1918776639488 '38#disk.space.usage.bytes'=651761287168B;0:1000000000000;;0;1918776639488 '39#disk.space.usage.bytes'=650687545344B;0:1000000000000;;0;1918776639488 '40#disk.space.usage.bytes'=651761287168B;0:1000000000000;;0;1918776639488 '41#disk.space.usage.bytes'=650687545344B;0:1000000000000;;0;1918776639488 '50#disk.space.usage.bytes'=1006096089088B;0:1000000000000;;0;1918776639488 '51#disk.space.usage.bytes'=1006096089088B;0:1000000000000;;0;1918776639488 + ... 10 --filter-manufacturer=SAMSUNG --filter-counters='^usage$' --critical-usage=1000000000000 CRITICAL: Disk #14 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600288) located 2:0:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #15 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600290) located 2:1:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #26 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600289) located 3:0:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #27 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600293) located 3:1:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #50 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600297) located 5:0:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) - Disk #51 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600287) located 5:1:0 has Used: 937.00 GB of 1.75 TB (52.43%) Free: 850.00 GB (47.57%) | '0#disk.space.usage.bytes'=652835028992B;;0:1000000000000;0;1918776639488 '1#disk.space.usage.bytes'=651761287168B;;0:1000000000000;0;1918776639488 '14#disk.space.usage.bytes'=1006096089088B;;0:1000000000000;0;1918776639488 '15#disk.space.usage.bytes'=1006096089088B;;0:1000000000000;0;1918776639488 '2#disk.space.usage.bytes'=652835028992B;;0:1000000000000;0;1918776639488 '26#disk.space.usage.bytes'=1006096089088B;;0:1000000000000;0;1918776639488 '27#disk.space.usage.bytes'=1006096089088B;;0:1000000000000;0;1918776639488 '3#disk.space.usage.bytes'=651761287168B;;0:1000000000000;0;1918776639488 '38#disk.space.usage.bytes'=651761287168B;;0:1000000000000;0;1918776639488 '39#disk.space.usage.bytes'=650687545344B;;0:1000000000000;0;1918776639488 '40#disk.space.usage.bytes'=651761287168B;;0:1000000000000;0;1918776639488 '41#disk.space.usage.bytes'=650687545344B;;0:1000000000000;0;1918776639488 '50#disk.space.usage.bytes'=1006096089088B;;0:1000000000000;0;1918776639488 '51#disk.space.usage.bytes'=1006096089088B;;0:1000000000000;0;1918776639488 + ... 11 --filter-manufacturer=SAMSUNG --filter-counters='^usage-prct$' --warning-usage-prct=35 WARNING: Disk #14 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600288) located 2:0:0 has Used : 52.43 % - Disk #15 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600290) located 2:1:0 has Used : 52.43 % - Disk #26 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600289) located 3:0:0 has Used : 52.43 % - Disk #27 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600293) located 3:1:0 has Used : 52.43 % - Disk #50 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600297) located 5:0:0 has Used : 52.43 % - Disk #51 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600287) located 5:1:0 has Used : 52.43 % | '0#disk.space.usage.percentage'=34.02%;0:35;;0;100 '1#disk.space.usage.percentage'=33.97%;0:35;;0;100 '14#disk.space.usage.percentage'=52.43%;0:35;;0;100 '15#disk.space.usage.percentage'=52.43%;0:35;;0;100 '2#disk.space.usage.percentage'=34.02%;0:35;;0;100 '26#disk.space.usage.percentage'=52.43%;0:35;;0;100 '27#disk.space.usage.percentage'=52.43%;0:35;;0;100 '3#disk.space.usage.percentage'=33.97%;0:35;;0;100 '38#disk.space.usage.percentage'=33.97%;0:35;;0;100 '39#disk.space.usage.percentage'=33.91%;0:35;;0;100 '40#disk.space.usage.percentage'=33.97%;0:35;;0;100 '41#disk.space.usage.percentage'=33.91%;0:35;;0;100 '50#disk.space.usage.percentage'=52.43%;0:35;;0;100 '51#disk.space.usage.percentage'=52.43%;0:35;;0;100 + ... 12 --filter-manufacturer=SAMSUNG --filter-counters='^usage-prct$' --critical-usage-prct=35 CRITICAL: Disk #14 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600288) located 2:0:0 has Used : 52.43 % - Disk #15 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600290) located 2:1:0 has Used : 52.43 % - Disk #26 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600289) located 3:0:0 has Used : 52.43 % - Disk #27 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600293) located 3:1:0 has Used : 52.43 % - Disk #50 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600297) located 5:0:0 has Used : 52.43 % - Disk #51 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600287) located 5:1:0 has Used : 52.43 % | '0#disk.space.usage.percentage'=34.02%;;0:35;0;100 '1#disk.space.usage.percentage'=33.97%;;0:35;0;100 '14#disk.space.usage.percentage'=52.43%;;0:35;0;100 '15#disk.space.usage.percentage'=52.43%;;0:35;0;100 '2#disk.space.usage.percentage'=34.02%;;0:35;0;100 '26#disk.space.usage.percentage'=52.43%;;0:35;0;100 '27#disk.space.usage.percentage'=52.43%;;0:35;0;100 '3#disk.space.usage.percentage'=33.97%;;0:35;0;100 '38#disk.space.usage.percentage'=33.97%;;0:35;0;100 '39#disk.space.usage.percentage'=33.91%;;0:35;0;100 '40#disk.space.usage.percentage'=33.97%;;0:35;0;100 '41#disk.space.usage.percentage'=33.91%;;0:35;0;100 '50#disk.space.usage.percentage'=52.43%;;0:35;0;100 '51#disk.space.usage.percentage'=52.43%;;0:35;0;100 + ... 13 --filter-manufacturer=SAMSUNG --filter-counters='^usage-free$' --warning-usage-free=1000000000000: WARNING: Disk #0 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600283) located 0:0:0 has Used: 608.00 GB of 1.75 TB (34.02%) Free: 1.15 TB (65.98%) - Disk #1 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600286) located 0:1:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #2 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600197) located 0:2:0 has Used: 608.00 GB of 1.75 TB (34.02%) Free: 1.15 TB (65.98%) - Disk #3 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600285) located 0:3:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #38 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600303) located 4:0:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #39 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600302) located 4:1:0 has Used: 606.00 GB of 1.75 TB (33.91%) Free: 1.15 TB (66.09%) - Disk #40 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600296) located 4:2:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #41 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600291) located 4:3:0 has Used: 606.00 GB of 1.75 TB (33.91%) Free: 1.15 TB (66.09%) | '0#disk.space.free.bytes'=652835028992B;1000000000000:;;0;1918776639488 '1#disk.space.free.bytes'=651761287168B;1000000000000:;;0;1918776639488 '14#disk.space.free.bytes'=1006096089088B;1000000000000:;;0;1918776639488 '15#disk.space.free.bytes'=1006096089088B;1000000000000:;;0;1918776639488 '2#disk.space.free.bytes'=652835028992B;1000000000000:;;0;1918776639488 '26#disk.space.free.bytes'=1006096089088B;1000000000000:;;0;1918776639488 '27#disk.space.free.bytes'=1006096089088B;1000000000000:;;0;1918776639488 '3#disk.space.free.bytes'=651761287168B;1000000000000:;;0;1918776639488 '38#disk.space.free.bytes'=651761287168B;1000000000000:;;0;1918776639488 '39#disk.space.free.bytes'=650687545344B;1000000000000:;;0;1918776639488 '40#disk.space.free.bytes'=651761287168B;1000000000000:;;0;1918776639488 '41#disk.space.free.bytes'=650687545344B;1000000000000:;;0;1918776639488 '50#disk.space.free.bytes'=1006096089088B;1000000000000:;;0;1918776639488 '51#disk.space.free.bytes'=1006096089088B;1000000000000:;;0;1918776639488 + ... 14 --filter-manufacturer=SAMSUNG --filter-counters='^usage-free$' --critical-usage-free=1000000000000: CRITICAL: Disk #0 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600283) located 0:0:0 has Used: 608.00 GB of 1.75 TB (34.02%) Free: 1.15 TB (65.98%) - Disk #1 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600286) located 0:1:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #2 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600197) located 0:2:0 has Used: 608.00 GB of 1.75 TB (34.02%) Free: 1.15 TB (65.98%) - Disk #3 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600285) located 0:3:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #38 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600303) located 4:0:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #39 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600302) located 4:1:0 has Used: 606.00 GB of 1.75 TB (33.91%) Free: 1.15 TB (66.09%) - Disk #40 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600296) located 4:2:0 has Used: 607.00 GB of 1.75 TB (33.97%) Free: 1.15 TB (66.03%) - Disk #41 (SAMSUNG/ARFA1920S5xnFTRI, serial: 0T600291) located 4:3:0 has Used: 606.00 GB of 1.75 TB (33.91%) Free: 1.15 TB (66.09%) | '0#disk.space.free.bytes'=652835028992B;;1000000000000:;0;1918776639488 '1#disk.space.free.bytes'=651761287168B;;1000000000000:;0;1918776639488 '14#disk.space.free.bytes'=1006096089088B;;1000000000000:;0;1918776639488 '15#disk.space.free.bytes'=1006096089088B;;1000000000000:;0;1918776639488 '2#disk.space.free.bytes'=652835028992B;;1000000000000:;0;1918776639488 '26#disk.space.free.bytes'=1006096089088B;;1000000000000:;0;1918776639488 '27#disk.space.free.bytes'=1006096089088B;;1000000000000:;0;1918776639488 '3#disk.space.free.bytes'=651761287168B;;1000000000000:;0;1918776639488 '38#disk.space.free.bytes'=651761287168B;;1000000000000:;0;1918776639488 '39#disk.space.free.bytes'=650687545344B;;1000000000000:;0;1918776639488 '40#disk.space.free.bytes'=651761287168B;;1000000000000:;0;1918776639488 '41#disk.space.free.bytes'=650687545344B;;1000000000000:;0;1918776639488 '50#disk.space.free.bytes'=1006096089088B;;1000000000000:;0;1918776639488 '51#disk.space.free.bytes'=1006096089088B;;1000000000000:;0;1918776639488 diff --git a/tests/robot/storage/hp/primera/restapi/hpe-primera.mockoon.json b/tests/robot/storage/hp/primera/restapi/hpe-primera.mockoon.json new file mode 100644 index 0000000000..333ed49264 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/hpe-primera.mockoon.json @@ -0,0 +1,382 @@ +{ + "uuid": "54020981-6583-49fe-a7ad-9203a5d2e301", + "lastMigration": 32, + "name": "Hpe primera", + "endpointPrefix": "", + "latency": 0, + "port": 3000, + "hostname": "", + "folders": [], + "routes": [ + { + "uuid": "605e6996-b75c-4c15-a24b-92e58e8f93de", + "type": "http", + "documentation": "", + "method": "post", + "endpoint": "api/v1/credentials", + "responses": [ + { + "uuid": "d631b9f7-7424-4bd0-85a6-dbc9229c5d59", + "body": "{}", + "latency": 0, + "statusCode": 201, + "label": "", + "headers": [], + "bodyType": "DATABUCKET", + "filePath": "", + "databucketID": "876o", + "sendFileAsBody": false, + "rules": [ + { + "target": "body", + "modifier": ".user", + "value": "toto", + "invert": false, + "operator": "equals" + }, + { + "target": "body", + "modifier": ".password", + "value": "tata", + "invert": false, + "operator": "equals" + } + ], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": true, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + }, + { + "uuid": "c932681f-83a0-4487-8a83-d881a188d601", + "type": "http", + "documentation": "", + "method": "get", + "endpoint": "api/v1/system", + "responses": [ + { + "uuid": "7f552333-cc1c-4991-b7f5-1abaf88f711c", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [ + { + "key": "access-control-allow-headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "access-control-allow-methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "content-security-policy", + "value": "default-src 'none'" + }, + { + "key": "content-type", + "value": "text/html; charset=utf-8" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + } + ], + "bodyType": "DATABUCKET", + "filePath": "", + "databucketID": "qn5k", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": false, + "crudKey": "id", + "callbacks": [], + "body": "{}" + } + ], + "responseMode": null + }, + { + "uuid": "4edc0f57-f739-4e3e-8d72-0e828a076b34", + "type": "http", + "documentation": "", + "method": "get", + "endpoint": "api/v1/disks", + "responses": [ + { + "uuid": "d99384c5-949f-416a-8a26-21721f62c5d8", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [ + { + "key": "access-control-allow-headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "access-control-allow-methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "content-security-policy", + "value": "default-src 'none'" + }, + { + "key": "content-type", + "value": "text/html; charset=utf-8" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + } + ], + "bodyType": "DATABUCKET", + "filePath": "", + "databucketID": "5g65", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": false, + "crudKey": "id", + "callbacks": [], + "body": "{}" + } + ], + "responseMode": null + }, + { + "uuid": "8d84d238-b927-4bfa-ab48-e9ea86daa4b6", + "type": "http", + "documentation": "", + "method": "get", + "endpoint": "api/v1/capacity", + "responses": [ + { + "uuid": "4d1237d8-0d0e-4852-999c-2c9fd2e17d65", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [ + { + "key": "access-control-allow-headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "access-control-allow-methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "content-security-policy", + "value": "default-src 'none'" + }, + { + "key": "content-type", + "value": "text/html; charset=utf-8" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + } + ], + "bodyType": "DATABUCKET", + "filePath": "", + "databucketID": "ht18", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": false, + "crudKey": "id", + "callbacks": [], + "body": "{}" + } + ], + "responseMode": null + }, + { + "uuid": "d32b730b-459c-41ea-83f8-398759252585", + "type": "http", + "documentation": "", + "method": "get", + "endpoint": "api/v1/volumes", + "responses": [ + { + "uuid": "82e25d2e-8692-42d5-911a-7a75f69b70aa", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [ + { + "key": "access-control-allow-headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "access-control-allow-methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "content-security-policy", + "value": "default-src 'none'" + }, + { + "key": "content-type", + "value": "text/html; charset=utf-8" + }, + { + "key": "x-content-type-options", + "value": "nosniff" + } + ], + "bodyType": "DATABUCKET", + "filePath": "", + "databucketID": "8ar6", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": false, + "crudKey": "id", + "callbacks": [], + "body": "{}" + } + ], + "responseMode": null + } + ], + "rootChildren": [ + { + "type": "route", + "uuid": "605e6996-b75c-4c15-a24b-92e58e8f93de" + }, + { + "type": "route", + "uuid": "c932681f-83a0-4487-8a83-d881a188d601" + }, + { + "type": "route", + "uuid": "4edc0f57-f739-4e3e-8d72-0e828a076b34" + }, + { + "type": "route", + "uuid": "8d84d238-b927-4bfa-ab48-e9ea86daa4b6" + }, + { + "type": "route", + "uuid": "d32b730b-459c-41ea-83f8-398759252585" + } + ], + "proxyMode": false, + "proxyHost": "", + "proxyRemovePrefix": false, + "tlsOptions": { + "enabled": false, + "type": "CERT", + "pfxPath": "", + "certPath": "", + "keyPath": "", + "caPath": "", + "passphrase": "" + }, + "cors": true, + "headers": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + } + ], + "proxyReqHeaders": [ + { + "key": "", + "value": "" + } + ], + "proxyResHeaders": [ + { + "key": "", + "value": "" + } + ], + "data": [ + { + "uuid": "15b1a9ff-c65c-4fb4-87d4-2dcf3d3508c0", + "id": "876o", + "name": "Authentication reply", + "documentation": "", + "value": "{\"key\":\"4GDSG6GF54G4FG6G8SG4FD94\"}" + }, + { + "uuid": "bd99f046-7aec-49f5-af0e-45b7e2c80a5c", + "id": "5tfv", + "name": "System (original)", + "documentation": "", + "value": "{\r\n \"id\": 171727,\r\n \"name\": \"lfeat-primera\",\r\n \"systemVersion\": \"4.5.24.7\",\r\n \"IPv4Addr\": \"192.168.1.1\",\r\n \"model\": \"HPE_3PAR C650\",\r\n \"serialNumber\": \"DE44820JXS\",\r\n \"totalNodes\": 2,\r\n \"masterNode\": 0,\r\n \"onlineNodes\": [\r\n 1\r\n ],\r\n \"clusterNodes\": [\r\n 0,\r\n 1\r\n ],\r\n \"chunkletSizeMiB\": 1024,\r\n \"totalCapacityMiB\": 396994560.0,\r\n \"allocatedCapacityMiB\": 132963328.0,\r\n \"freeCapacityMiB\": 264031232.0,\r\n \"failedCapacityMiB\": 0.0,\r\n \"readOnlyParameters\": {\r\n \"maxVolumeSizeMiB\": 67108864,\r\n \"maxDedupVolumeSizeMiB\": 16777216,\r\n \"maxCompressedVolumeSizeMiB\": 16777216\r\n },\r\n \"location\": \"Administrative Temple Garden 313A\",\r\n \"contact\": \"Vader D., +3XCVZ, lordv@emp.ga\",\r\n \"timeZone\": \"Coruscant/Imperial City\",\r\n \"licenseInfo\": {\r\n \"issueTimeSec\": 1670005863,\r\n \"issueTime8601\": \"2022-12-02T19:31:03+01:00\",\r\n \"diskCount\": -1,\r\n \"WWNBASE\": 171727,\r\n \"licenses\": [\r\n {\r\n \"name\": \"Adaptive Flash Cache\"\r\n },\r\n {\r\n \"name\": \"Autonomic Rebalance\"\r\n },\r\n {\r\n \"name\": \"Cluster Extension\"\r\n },\r\n {\r\n \"name\": \"Compression\"\r\n },\r\n {\r\n \"name\": \"Data Encryption\"\r\n },\r\n {\r\n \"name\": \"Dynamic Optimization\"\r\n },\r\n {\r\n \"name\": \"HPE Primera OS Suite\"\r\n },\r\n {\r\n \"name\": \"Management Plug-In for VMware vCenter\"\r\n },\r\n {\r\n \"name\": \"Online Import\"\r\n },\r\n {\r\n \"name\": \"Peer Motion\"\r\n },\r\n {\r\n \"name\": \"Peer Persistence\"\r\n },\r\n {\r\n \"name\": \"Priority Optimization\"\r\n },\r\n {\r\n \"name\": \"Remote Copy\"\r\n },\r\n {\r\n \"name\": \"RMC Application Suite\"\r\n },\r\n {\r\n \"name\": \"Smart SAN\"\r\n },\r\n {\r\n \"name\": \"System Reporter\"\r\n },\r\n {\r\n \"name\": \"Thin Conversion\"\r\n },\r\n {\r\n \"name\": \"Thin Copy Reclamation\"\r\n },\r\n {\r\n \"name\": \"Thin Deduplication\"\r\n },\r\n {\r\n \"name\": \"Thin Persistence\"\r\n },\r\n {\r\n \"name\": \"Thin Provisioning (10240000G)\"\r\n },\r\n {\r\n \"name\": \"Virtual Copy\"\r\n },\r\n {\r\n \"name\": \"Virtual Domains\"\r\n },\r\n {\r\n \"name\": \"Virtual Lock\"\r\n },\r\n {\r\n \"name\": \"VSS Provider for Microsoft Windows\"\r\n }\r\n ],\r\n \"licenseState\": {\r\n \"virtualCopy\": true,\r\n \"remoteCopy\": true,\r\n \"thinProvisioing\": true,\r\n \"thinProvisioning\": true,\r\n \"domains\": true,\r\n \"dynamicOptimization\": true,\r\n \"virtualLock\": true,\r\n \"thinPersistence\": true,\r\n \"thinConversion\": true,\r\n \"adaptiveOptimization\": false,\r\n \"peerVirtualization\": true,\r\n \"qos\": true,\r\n \"systemReporter\": true,\r\n \"darEncryption\": true,\r\n \"fileServices\": false,\r\n \"storageFederation\": false,\r\n \"onlineImport\": true,\r\n \"rmcApplicationSuite\": true,\r\n \"smartSAN\": true,\r\n \"sedEncryption\": false\r\n }\r\n },\r\n \"parameters\": {\r\n \"rawSpaceAlertFC\": 0,\r\n \"rawSpaceAlertNL\": 0,\r\n \"rawSpaceAlertSSD\": 0,\r\n \"remoteSyslog\": false,\r\n \"remoteSyslogHost\": \"0.0.0.0\",\r\n \"remoteSyslogSecurityHost\": \"0.0.0.0\",\r\n \"sparingAlgorithm\": \"Default\",\r\n \"eventLogsize\": 4194304,\r\n \"eventLogNum\": 1,\r\n \"VVRetentionTimeMax\": 1209600,\r\n \"upgradeNote\": \"\",\r\n \"portFailoverEnabled\": true,\r\n \"autoExportAfterReboot\": true,\r\n \"thermalShutdown\": true,\r\n \"failoverMatchedSet\": true,\r\n \"sessionTimeout\": 3600,\r\n \"hostDIF\": true,\r\n \"hostDIFTemplate\": 2,\r\n \"allowWrtbackSingleNode\": 7,\r\n \"allowWrtbackUpgrade\": 7,\r\n \"overProvRatioLimit\": 0.0,\r\n \"overProvRatioWarning\": 0.0,\r\n \"disableChunkletInitUNMAP\": false,\r\n \"personaProfile\": 1,\r\n \"complianceOfficerApproval\": false,\r\n \"remoteCopyHostThrottling\": false,\r\n \"autoAdmitTune\": true,\r\n \"singleLunHost\": false,\r\n \"allowDomainUsersAffectNoDomain\": 2,\r\n \"enableAIQoS\": false\r\n }\r\n}" + }, + { + "uuid": "45fe526e-47a6-44cf-bc41-3c6e7eeb7fff", + "id": "qn5k", + "name": "System (fake with expiration date)", + "documentation": "", + "value": "{\r\n \"id\": 171727,\r\n \"name\": \"lfeat-primera\",\r\n \"systemVersion\": \"4.5.24.7\",\r\n \"IPv4Addr\": \"192.168.1.1\",\r\n \"model\": \"HPE_3PAR C650\",\r\n \"serialNumber\": \"DE44820JXS\",\r\n \"totalNodes\": 2,\r\n \"masterNode\": 0,\r\n \"onlineNodes\": [\r\n 1\r\n ],\r\n \"clusterNodes\": [\r\n 0,\r\n 1\r\n ],\r\n \"chunkletSizeMiB\": 1024,\r\n \"totalCapacityMiB\": 396994560.0,\r\n \"allocatedCapacityMiB\": 132963328.0,\r\n \"freeCapacityMiB\": 264031232.0,\r\n \"failedCapacityMiB\": 0.0,\r\n \"readOnlyParameters\": {\r\n \"maxVolumeSizeMiB\": 67108864,\r\n \"maxDedupVolumeSizeMiB\": 16777216,\r\n \"maxCompressedVolumeSizeMiB\": 16777216\r\n },\r\n \"location\": \"Administrative Temple Garden 313A\",\r\n \"contact\": \"Vader D., +3XCVZ, lordv@emp.ga\",\r\n \"timeZone\": \"Coruscant/Imperial City\",\r\n \"licenseInfo\": {\r\n \"issueTimeSec\": 1670005863,\r\n \"issueTime8601\": \"2022-12-02T19:31:03+01:00\",\r\n \"diskCount\": -1,\r\n \"WWNBASE\": 171727,\r\n \"licenses\": [\r\n {\r\n \"name\": \"Adaptive Flash Cache\",\r\n \"expiryTimeSec\": 1721054769,\r\n \"expiryTime8601\": \"2024-07-14\"\r\n },\r\n {\r\n \"name\": \"Autonomic Rebalance\",\r\n \"expiryTimeSec\": 9921054769,\r\n \"expiryTime8601\": \"2284-05-21\"\r\n },\r\n {\r\n \"name\": \"Cluster Extension\"\r\n },\r\n {\r\n \"name\": \"Compression\"\r\n },\r\n {\r\n \"name\": \"Data Encryption\"\r\n },\r\n {\r\n \"name\": \"Dynamic Optimization\"\r\n },\r\n {\r\n \"name\": \"HPE Primera OS Suite\"\r\n },\r\n {\r\n \"name\": \"Management Plug-In for VMware vCenter\"\r\n },\r\n {\r\n \"name\": \"Online Import\"\r\n },\r\n {\r\n \"name\": \"Peer Motion\"\r\n },\r\n {\r\n \"name\": \"Peer Persistence\"\r\n },\r\n {\r\n \"name\": \"Priority Optimization\"\r\n },\r\n {\r\n \"name\": \"Remote Copy\"\r\n },\r\n {\r\n \"name\": \"RMC Application Suite\"\r\n },\r\n {\r\n \"name\": \"Smart SAN\"\r\n },\r\n {\r\n \"name\": \"System Reporter\"\r\n },\r\n {\r\n \"name\": \"Thin Conversion\"\r\n },\r\n {\r\n \"name\": \"Thin Copy Reclamation\"\r\n },\r\n {\r\n \"name\": \"Thin Deduplication\"\r\n },\r\n {\r\n \"name\": \"Thin Persistence\"\r\n },\r\n {\r\n \"name\": \"Thin Provisioning (10240000G)\"\r\n },\r\n {\r\n \"name\": \"Virtual Copy\"\r\n },\r\n {\r\n \"name\": \"Virtual Domains\"\r\n },\r\n {\r\n \"name\": \"Virtual Lock\"\r\n },\r\n {\r\n \"name\": \"VSS Provider for Microsoft Windows\"\r\n }\r\n ],\r\n \"licenseState\": {\r\n \"virtualCopy\": true,\r\n \"remoteCopy\": true,\r\n \"thinProvisioing\": true,\r\n \"thinProvisioning\": true,\r\n \"domains\": true,\r\n \"dynamicOptimization\": true,\r\n \"virtualLock\": true,\r\n \"thinPersistence\": true,\r\n \"thinConversion\": true,\r\n \"adaptiveOptimization\": false,\r\n \"peerVirtualization\": true,\r\n \"qos\": true,\r\n \"systemReporter\": true,\r\n \"darEncryption\": true,\r\n \"fileServices\": false,\r\n \"storageFederation\": false,\r\n \"onlineImport\": true,\r\n \"rmcApplicationSuite\": true,\r\n \"smartSAN\": true,\r\n \"sedEncryption\": false\r\n }\r\n },\r\n \"parameters\": {\r\n \"rawSpaceAlertFC\": 0,\r\n \"rawSpaceAlertNL\": 0,\r\n \"rawSpaceAlertSSD\": 0,\r\n \"remoteSyslog\": false,\r\n \"remoteSyslogHost\": \"0.0.0.0\",\r\n \"remoteSyslogSecurityHost\": \"0.0.0.0\",\r\n \"sparingAlgorithm\": \"Default\",\r\n \"eventLogsize\": 4194304,\r\n \"eventLogNum\": 1,\r\n \"VVRetentionTimeMax\": 1209600,\r\n \"upgradeNote\": \"\",\r\n \"portFailoverEnabled\": true,\r\n \"autoExportAfterReboot\": true,\r\n \"thermalShutdown\": true,\r\n \"failoverMatchedSet\": true,\r\n \"sessionTimeout\": 3600,\r\n \"hostDIF\": true,\r\n \"hostDIFTemplate\": 2,\r\n \"allowWrtbackSingleNode\": 7,\r\n \"allowWrtbackUpgrade\": 7,\r\n \"overProvRatioLimit\": 0.0,\r\n \"overProvRatioWarning\": 0.0,\r\n \"disableChunkletInitUNMAP\": false,\r\n \"personaProfile\": 1,\r\n \"complianceOfficerApproval\": false,\r\n \"remoteCopyHostThrottling\": false,\r\n \"autoAdmitTune\": true,\r\n \"singleLunHost\": false,\r\n \"allowDomainUsersAffectNoDomain\": 2,\r\n \"enableAIQoS\": false\r\n }\r\n}" + }, + { + "uuid": "f543256b-40f3-4ee3-a93d-9f50beba504a", + "id": "5g65", + "name": "Disks", + "documentation": "", + "value": "{\n \"total\": 82,\n \"members\": [\n {\n \"id\": 0,\n \"position\": \"0:0:0\",\n \"lastPosition\": \"0:0:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1207296,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B12658671\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600283\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B12658671\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 1,\n \"position\": \"0:1:0\",\n \"lastPosition\": \"0:1:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1208320,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126586A1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600286\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126586A1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 2,\n \"position\": \"0:2:0\",\n \"lastPosition\": \"0:2:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1207296,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B12658111\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600197\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B12658111\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 3,\n \"position\": \"0:3:0\",\n \"lastPosition\": \"0:3:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1208320,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B12658691\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600285\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B12658691\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 4,\n \"position\": \"0:4:0\",\n \"lastPosition\": \"0:4:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121FF0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM71M8A\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121FF0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 5,\n \"position\": \"0:5:0\",\n \"lastPosition\": \"0:5:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12341C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM6ZNWE\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12341C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 6,\n \"position\": \"0:6:0\",\n \"lastPosition\": \"0:6:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123510\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73BQY\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123510\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 7,\n \"position\": \"0:7:0\",\n \"lastPosition\": \"0:7:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12166C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM735KS\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12166C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 8,\n \"position\": \"0:8:0\",\n \"lastPosition\": \"0:8:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1236B4\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73BMX\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1236B4\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 9,\n \"position\": \"0:9:0\",\n \"lastPosition\": \"0:9:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123380\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73CT0\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123380\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 10,\n \"position\": \"0:10:0\",\n \"lastPosition\": \"0:10:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123174\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73EMY\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123174\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 11,\n \"position\": \"0:11:0\",\n \"lastPosition\": \"0:11:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1235D8\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73FSN\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:31+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1235D8\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 12,\n \"position\": \"0:12:0\",\n \"lastPosition\": \"0:12:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12224C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM733YD\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12224C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 13,\n \"position\": \"0:13:0\",\n \"lastPosition\": \"0:13:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1740800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA122270\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73HE6\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA122270\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 14,\n \"position\": \"2:0:0\",\n \"lastPosition\": \"2:0:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 870400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126586C1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600288\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126586C1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 15,\n \"position\": \"2:1:0\",\n \"lastPosition\": \"2:1:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 870400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126586E1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600290\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126586E1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 16,\n \"position\": \"2:2:0\",\n \"lastPosition\": \"2:2:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121C6C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM735E2\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121C6C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 17,\n \"position\": \"2:3:0\",\n \"lastPosition\": \"2:3:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA122118\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM7354D\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA122118\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 18,\n \"position\": \"2:4:0\",\n \"lastPosition\": \"2:4:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1744896,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123A30\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73G91\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123A30\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 19,\n \"position\": \"2:5:0\",\n \"lastPosition\": \"2:5:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12303C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM6ZP1Q\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12303C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 20,\n \"position\": \"2:6:0\",\n \"lastPosition\": \"2:6:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123D98\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM6ZPE0\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123D98\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 21,\n \"position\": \"2:7:0\",\n \"lastPosition\": \"2:7:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123448\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73DP4\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123448\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 22,\n \"position\": \"2:8:0\",\n \"lastPosition\": \"2:8:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123164\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73FTX\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123164\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 23,\n \"position\": \"2:9:0\",\n \"lastPosition\": \"2:9:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1740800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1218A0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM735VP\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1218A0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 24,\n \"position\": \"2:10:0\",\n \"lastPosition\": \"2:10:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1744896,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1238A8\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73AXN\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1238A8\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 25,\n \"position\": \"2:11:0\",\n \"lastPosition\": \"2:11:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123054\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73GQT\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123054\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 26,\n \"position\": \"3:0:0\",\n \"lastPosition\": \"3:0:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 870400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126586D1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600289\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126586D1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 27,\n \"position\": \"3:1:0\",\n \"lastPosition\": \"3:1:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 870400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B12658711\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600293\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B12658711\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 28,\n \"position\": \"3:2:0\",\n \"lastPosition\": \"3:2:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12147C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73580\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12147C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 29,\n \"position\": \"3:3:0\",\n \"lastPosition\": \"3:3:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12218C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM71DEQ\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12218C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 30,\n \"position\": \"3:4:0\",\n \"lastPosition\": \"3:4:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12394C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM6ZPCB\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12394C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 31,\n \"position\": \"3:5:0\",\n \"lastPosition\": \"3:5:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123890\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73BYG\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123890\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 32,\n \"position\": \"3:6:0\",\n \"lastPosition\": \"3:6:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123C88\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73DN0\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123C88\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 33,\n \"position\": \"3:7:0\",\n \"lastPosition\": \"3:7:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121428\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73EFJ\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121428\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 34,\n \"position\": \"3:8:0\",\n \"lastPosition\": \"3:8:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1224B0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73CHH\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1224B0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 35,\n \"position\": \"3:9:0\",\n \"lastPosition\": \"3:9:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1740800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1236C0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73C97\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1236C0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 36,\n \"position\": \"3:10:0\",\n \"lastPosition\": \"3:10:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1744896,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA122524\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73ENE\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA122524\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 37,\n \"position\": \"3:11:0\",\n \"lastPosition\": \"3:11:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 1,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1217B0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM734AD\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:32+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1217B0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 38,\n \"position\": \"4:0:0\",\n \"lastPosition\": \"4:0:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1208320,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126587B1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600303\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126587B1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 39,\n \"position\": \"4:1:0\",\n \"lastPosition\": \"4:1:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1209344,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126587A1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600302\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126587A1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 40,\n \"position\": \"4:2:0\",\n \"lastPosition\": \"4:2:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1208320,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B12658741\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600296\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B12658741\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 41,\n \"position\": \"4:3:0\",\n \"lastPosition\": \"4:3:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 1209344,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126586F1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600291\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126586F1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 42,\n \"position\": \"4:4:0\",\n \"lastPosition\": \"4:4:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1642496,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1219F8\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM735JQ\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1219F8\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 43,\n \"position\": \"4:5:0\",\n \"lastPosition\": \"4:5:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1635328,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121AA8\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM7359T\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121AA8\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 44,\n \"position\": \"4:6:0\",\n \"lastPosition\": \"4:6:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1638400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121FC0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM7363M\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121FC0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 45,\n \"position\": \"4:7:0\",\n \"lastPosition\": \"4:7:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1639424,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA122180\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM732S0\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA122180\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 46,\n \"position\": \"4:8:0\",\n \"lastPosition\": \"4:8:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1638400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1231D0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM738LV\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1231D0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 47,\n \"position\": \"4:9:0\",\n \"lastPosition\": \"4:9:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1635328,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1214DC\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73G0M\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1214DC\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 48,\n \"position\": \"4:10:0\",\n \"lastPosition\": \"4:10:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1642496,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121510\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM732F8\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121510\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 49,\n \"position\": \"4:11:0\",\n \"lastPosition\": \"4:11:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1639424,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121380\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM7342P\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121380\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 50,\n \"position\": \"5:0:0\",\n \"lastPosition\": \"5:0:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 870400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B12658751\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600297\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B12658751\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 51,\n \"position\": \"5:1:0\",\n \"lastPosition\": \"5:1:0\",\n \"type\": 3,\n \"state\": 1,\n \"totalSizeMiB\": 1829888,\n \"freeSizeMiB\": 870400,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 1920,\n \"WWN\": \"5002538B126586B1\",\n \"manufacturer\": \"SAMSUNG\",\n \"model\": \"ARFA1920S5xnFTRI\",\n \"serialNumber\": \"0T600287\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 3,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5002538B126586B1\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 52,\n \"position\": \"5:2:0\",\n \"lastPosition\": \"5:2:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12213C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM72RV6\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12213C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 53,\n \"position\": \"5:3:0\",\n \"lastPosition\": \"5:3:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123DD0\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73EVQ\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123DD0\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 54,\n \"position\": \"5:4:0\",\n \"lastPosition\": \"5:4:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12354C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM7399M\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12354C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 55,\n \"position\": \"5:5:0\",\n \"lastPosition\": \"5:5:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1742848,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123554\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73CBQ\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123554\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 56,\n \"position\": \"5:6:0\",\n \"lastPosition\": \"5:6:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA123DB4\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73CWW\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA123DB4\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 57,\n \"position\": \"5:7:0\",\n \"lastPosition\": \"5:7:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12177C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73FY5\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12177C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 58,\n \"position\": \"5:8:0\",\n \"lastPosition\": \"5:8:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1223F4\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM732WQ\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1223F4\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 59,\n \"position\": \"5:9:0\",\n \"lastPosition\": \"5:9:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1740800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA1230F8\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73EVS\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA1230F8\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 60,\n \"position\": \"5:10:0\",\n \"lastPosition\": \"5:10:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1745920,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA12393C\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73GC3\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA12393C\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 61,\n \"position\": \"5:11:0\",\n \"lastPosition\": \"5:11:0\",\n \"type\": 1,\n \"RPM\": 10,\n \"state\": 1,\n \"totalSizeMiB\": 2287616,\n \"freeSizeMiB\": 1743872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 2,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 2400,\n \"WWN\": \"5000C500DA121D10\",\n \"manufacturer\": \"SEAGATE\",\n \"model\": \"SSKS2400S5xeF010\",\n \"serialNumber\": \"WBM73FBT\",\n \"fwVersion\": \"3P04\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000C500DA121D10\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 62,\n \"position\": \"6:0:0\",\n \"lastPosition\": \"6:0:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7884800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA29079802B\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4UG1T\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA29079802B\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 63,\n \"position\": \"6:1:0\",\n \"lastPosition\": \"6:1:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7884800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA2907946C7\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4PMKU\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA2907946C7\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 64,\n \"position\": \"6:2:0\",\n \"lastPosition\": \"6:2:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7885824,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290795A6F\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4RY4U\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:33+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290795A6F\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 65,\n \"position\": \"6:3:0\",\n \"lastPosition\": \"6:3:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7885824,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290792CC3\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4MWVT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290792CC3\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 66,\n \"position\": \"6:4:0\",\n \"lastPosition\": \"6:4:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7887872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290793B33\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4NVNT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290793B33\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 67,\n \"position\": \"6:5:0\",\n \"lastPosition\": \"6:5:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7887872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA2907982D3\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4UMJT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA2907982D3\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 68,\n \"position\": \"7:0:0\",\n \"lastPosition\": \"7:0:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7884800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290792E1F\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4MZNT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290792E1F\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 69,\n \"position\": \"7:1:0\",\n \"lastPosition\": \"7:1:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7884800,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA2907975B3\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4TSET\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA2907975B3\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 70,\n \"position\": \"7:2:0\",\n \"lastPosition\": \"7:2:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7885824,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA2907977FB\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4TX4T\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA2907977FB\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 71,\n \"position\": \"7:3:0\",\n \"lastPosition\": \"7:3:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7885824,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA2907932A7\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4N90T\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA2907932A7\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 72,\n \"position\": \"7:4:0\",\n \"lastPosition\": \"7:4:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7887872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290791F87\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4M0JT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290791F87\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 73,\n \"position\": \"7:5:0\",\n \"lastPosition\": \"7:5:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 4,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 7887872,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 3,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA2907968B3\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4SWLT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA2907968B3\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 74,\n \"position\": \"8:0:0\",\n \"lastPosition\": \"8:0:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8912896,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290795FFF\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4S9MT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290795FFF\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 75,\n \"position\": \"8:1:0\",\n \"lastPosition\": \"8:1:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 99,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8912896,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA2907966BF\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4SSKT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA2907966BF\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 76,\n \"position\": \"8:2:0\",\n \"lastPosition\": \"8:2:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8912896,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290797723\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4TVDT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290797723\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 77,\n \"position\": \"8:3:0\",\n \"lastPosition\": \"8:3:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8912896,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA29079342B\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4ND4T\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA29079342B\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 78,\n \"position\": \"8:4:0\",\n \"lastPosition\": \"8:4:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 3,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8916992,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA29079735B\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4TLLT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA29079735B\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 79,\n \"position\": \"8:5:0\",\n \"lastPosition\": \"8:5:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 3,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8916992,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290792F27\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4N1TT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290792F27\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 80,\n \"position\": \"8:6:0\",\n \"lastPosition\": \"8:6:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 1,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8916992,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA290796F2B\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4T9YT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA290796F2B\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"id\": 81,\n \"position\": \"8:7:0\",\n \"lastPosition\": \"8:7:0\",\n \"type\": 2,\n \"RPM\": 7,\n \"state\": 2,\n \"totalSizeMiB\": 13078528,\n \"freeSizeMiB\": 8916992,\n \"loopA0\": {\n \"node\": 0,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"loopB0\": {\n \"node\": 1,\n \"slot\": 0,\n \"port\": 4,\n \"primary\": true,\n \"disabled\": false,\n \"degraded\": false\n },\n \"mfgCapacityGB\": 14000,\n \"WWN\": \"5000CCA29079328F\",\n \"manufacturer\": \"WDC\",\n \"model\": \"WLEB14T0S5xeF7.2\",\n \"serialNumber\": \"9MJ4N8UT\",\n \"fwVersion\": \"3P00\",\n \"protocol\": 3,\n \"mediaType\": 1,\n \"admissionTime\": \"2023-10-25T14:39:34+02:00\",\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks/5000CCA29079328F\",\n \"rel\": \"self\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/disks\",\n \"rel\": \"self\"\n }\n ]\n}\n" + }, + { + "uuid": "fd0decef-2085-49de-8f69-afc795f41b08", + "id": "ht18", + "name": "Capacity", + "documentation": "", + "value": "{\r\n \"allCapacity\": {\r\n \"totalMiB\": 396994560,\r\n \"allocated\": {\r\n \"totalAllocatedMiB\": 133280768,\r\n \"volumes\": {\r\n \"totalVolumesMiB\": 101242880,\r\n \"nonCPGsMiB\": 0,\r\n \"nonCPGUserMiB\": 0,\r\n \"nonCPGSnapshotMiB\": 0,\r\n \"nonCPGAdminMiB\": 0,\r\n \"CPGsMiB\": 101242880,\r\n \"CPGUserMiB\": 100830854,\r\n \"CPGUserUsedMiB\": 100830854,\r\n \"CPGUserUsedBulkVVMiB\": 0,\r\n \"CPGUserUnusedMiB\": 0,\r\n \"CPGSnapshotMiB\": 412026,\r\n \"CPGSnapshotUsedMiB\": 17682,\r\n \"CPGSnapshotUsedBulkVVMiB\": 0,\r\n \"CPGSnapshotUnusedMiB\": 394344,\r\n \"CPGAdminMiB\": 436224,\r\n \"CPGAdminUsedMiB\": 346368,\r\n \"CPGAdminUsedBulkVVMiB\": 0,\r\n \"CPGAdminUnusedMiB\": 89856,\r\n \"CPGSharedMiB\": 125120,\r\n \"CPGPrivateMiB\": 100723416,\r\n \"CPGBasePrivateMiB\": 100705734,\r\n \"CPGBasePrivateReservedMiB\": 100705734,\r\n \"CPGBasePrivatevSphereVVolsMiB\": 0,\r\n \"CPGSnapshotPrivateMiB\": 17682,\r\n \"CPGSnapshotPrivateReservedMiB\": 17682,\r\n \"CPGSnapshotPrivatevSphereVVolsMiB\": 0,\r\n \"CPGFreeMiB\": 394344,\r\n \"unmappedMiB\": 0,\r\n \"capacityEfficiency\": {\r\n \"compaction\": 1.66,\r\n \"deduplication\": 1.02,\r\n \"compression\": 1.37,\r\n \"dataReduction\": 1.37,\r\n \"overProvisioning\": 0.45\r\n }\r\n },\r\n \"system\": {\r\n \"totalSystemMiB\": 32037888,\r\n \"internalMiB\": 1784832,\r\n \"spareMiB\": 29816832,\r\n \"spareUsedMiB\": 0,\r\n \"spareUnusedMiB\": 29816832,\r\n \"adminMiB\": 436224\r\n }\r\n },\r\n \"freeMiB\": 263713792,\r\n \"freeInitializedMiB\": 263713792,\r\n \"freeUninitializedMiB\": 0,\r\n \"unavailableCapacityMiB\": 0,\r\n \"failedCapacityMiB\": 0,\r\n \"overProvisionedVirtualSizeMiB\": 164459910,\r\n \"overProvisionedUsedMiB\": 102127552,\r\n \"overProvisionedAllocatedMiB\": 393984,\r\n \"overProvisionedFreeMiB\": 263713792\r\n },\r\n \"FCCapacity\": {\r\n \"totalMiB\": 109805568,\r\n \"allocated\": {\r\n \"totalAllocatedMiB\": 26934272,\r\n \"volumes\": {\r\n \"totalVolumesMiB\": 20500480,\r\n \"nonCPGsMiB\": 0,\r\n \"nonCPGUserMiB\": 0,\r\n \"nonCPGSnapshotMiB\": 0,\r\n \"nonCPGAdminMiB\": 0,\r\n \"CPGsMiB\": 20500480,\r\n \"CPGUserMiB\": 20153299,\r\n \"CPGUserUsedMiB\": 20153299,\r\n \"CPGUserUsedBulkVVMiB\": 0,\r\n \"CPGUserUnusedMiB\": 0,\r\n \"CPGSnapshotMiB\": 347181,\r\n \"CPGSnapshotUsedMiB\": 6408,\r\n \"CPGSnapshotUsedBulkVVMiB\": 0,\r\n \"CPGSnapshotUnusedMiB\": 340773,\r\n \"CPGAdminMiB\": 196608,\r\n \"CPGAdminUsedMiB\": 134400,\r\n \"CPGAdminUsedBulkVVMiB\": 0,\r\n \"CPGAdminUnusedMiB\": 62208,\r\n \"CPGSharedMiB\": 0,\r\n \"CPGPrivateMiB\": 20159707,\r\n \"CPGBasePrivateMiB\": 20153299,\r\n \"CPGBasePrivateReservedMiB\": 20153299,\r\n \"CPGBasePrivatevSphereVVolsMiB\": 0,\r\n \"CPGSnapshotPrivateMiB\": 6408,\r\n \"CPGSnapshotPrivateReservedMiB\": 6408,\r\n \"CPGSnapshotPrivatevSphereVVolsMiB\": 0,\r\n \"CPGFreeMiB\": 340773,\r\n \"unmappedMiB\": 0,\r\n \"capacityEfficiency\": {\r\n \"compaction\": 1.98,\r\n \"deduplication\": 0.00,\r\n \"dataReduction\": 0.00,\r\n \"overProvisioning\": 0.39\r\n }\r\n },\r\n \"system\": {\r\n \"totalSystemMiB\": 6433792,\r\n \"internalMiB\": 1661952,\r\n \"spareMiB\": 4575232,\r\n \"spareUsedMiB\": 0,\r\n \"spareUnusedMiB\": 4575232,\r\n \"adminMiB\": 196608\r\n }\r\n },\r\n \"freeMiB\": 82871296,\r\n \"freeInitializedMiB\": 82871296,\r\n \"freeUninitializedMiB\": 0,\r\n \"unavailableCapacityMiB\": 0,\r\n \"failedCapacityMiB\": 0,\r\n \"overProvisionedVirtualSizeMiB\": 41062400,\r\n \"overProvisionedUsedMiB\": 21480960,\r\n \"overProvisionedAllocatedMiB\": 340480,\r\n \"overProvisionedFreeMiB\": 82871296\r\n },\r\n \"NLCapacity\": {\r\n \"totalMiB\": 261570560,\r\n \"allocated\": {\r\n \"totalAllocatedMiB\": 95617024,\r\n \"volumes\": {\r\n \"totalVolumesMiB\": 74035200,\r\n \"nonCPGsMiB\": 0,\r\n \"nonCPGUserMiB\": 0,\r\n \"nonCPGSnapshotMiB\": 0,\r\n \"nonCPGAdminMiB\": 0,\r\n \"CPGsMiB\": 74035200,\r\n \"CPGUserMiB\": 74015208,\r\n \"CPGUserUsedMiB\": 74015208,\r\n \"CPGUserUsedBulkVVMiB\": 0,\r\n \"CPGUserUnusedMiB\": 0,\r\n \"CPGSnapshotMiB\": 19992,\r\n \"CPGSnapshotUsedMiB\": 6150,\r\n \"CPGSnapshotUsedBulkVVMiB\": 0,\r\n \"CPGSnapshotUnusedMiB\": 13842,\r\n \"CPGAdminMiB\": 0,\r\n \"CPGAdminUsedMiB\": 0,\r\n \"CPGAdminUsedBulkVVMiB\": 0,\r\n \"CPGAdminUnusedMiB\": 0,\r\n \"CPGSharedMiB\": 0,\r\n \"CPGPrivateMiB\": 74021358,\r\n \"CPGBasePrivateMiB\": 74015208,\r\n \"CPGBasePrivateReservedMiB\": 74015208,\r\n \"CPGBasePrivatevSphereVVolsMiB\": 0,\r\n \"CPGSnapshotPrivateMiB\": 6150,\r\n \"CPGSnapshotPrivateReservedMiB\": 6150,\r\n \"CPGSnapshotPrivatevSphereVVolsMiB\": 0,\r\n \"CPGFreeMiB\": 13842,\r\n \"unmappedMiB\": 0,\r\n \"capacityEfficiency\": {\r\n \"compaction\": 1.51,\r\n \"deduplication\": 0.00,\r\n \"dataReduction\": 0.00,\r\n \"overProvisioning\": 0.47\r\n }\r\n },\r\n \"system\": {\r\n \"totalSystemMiB\": 21581824,\r\n \"internalMiB\": 0,\r\n \"spareMiB\": 21581824,\r\n \"spareUsedMiB\": 0,\r\n \"spareUnusedMiB\": 21581824,\r\n \"adminMiB\": 0\r\n }\r\n },\r\n \"freeMiB\": 165953536,\r\n \"freeInitializedMiB\": 165953536,\r\n \"freeUninitializedMiB\": 0,\r\n \"unavailableCapacityMiB\": 0,\r\n \"failedCapacityMiB\": 0,\r\n \"overProvisionedVirtualSizeMiB\": 111654912,\r\n \"overProvisionedUsedMiB\": 73982592,\r\n \"overProvisionedAllocatedMiB\": 13824,\r\n \"overProvisionedFreeMiB\": 165953536\r\n },\r\n \"SSDCapacity\": {\r\n \"totalMiB\": 25618432,\r\n \"allocated\": {\r\n \"totalAllocatedMiB\": 10729472,\r\n \"volumes\": {\r\n \"totalVolumesMiB\": 6707200,\r\n \"nonCPGsMiB\": 0,\r\n \"nonCPGUserMiB\": 0,\r\n \"nonCPGSnapshotMiB\": 0,\r\n \"nonCPGAdminMiB\": 0,\r\n \"CPGsMiB\": 6707200,\r\n \"CPGUserMiB\": 6662347,\r\n \"CPGUserUsedMiB\": 6662347,\r\n \"CPGUserUsedBulkVVMiB\": 0,\r\n \"CPGUserUnusedMiB\": 0,\r\n \"CPGSnapshotMiB\": 44853,\r\n \"CPGSnapshotUsedMiB\": 5124,\r\n \"CPGSnapshotUsedBulkVVMiB\": 0,\r\n \"CPGSnapshotUnusedMiB\": 39729,\r\n \"CPGAdminMiB\": 239616,\r\n \"CPGAdminUsedMiB\": 211968,\r\n \"CPGAdminUsedBulkVVMiB\": 0,\r\n \"CPGAdminUnusedMiB\": 27648,\r\n \"CPGSharedMiB\": 125120,\r\n \"CPGPrivateMiB\": 6542351,\r\n \"CPGBasePrivateMiB\": 6537227,\r\n \"CPGBasePrivateReservedMiB\": 6537227,\r\n \"CPGBasePrivatevSphereVVolsMiB\": 0,\r\n \"CPGSnapshotPrivateMiB\": 5124,\r\n \"CPGSnapshotPrivateReservedMiB\": 5124,\r\n \"CPGSnapshotPrivatevSphereVVolsMiB\": 0,\r\n \"CPGFreeMiB\": 39729,\r\n \"unmappedMiB\": 0,\r\n \"capacityEfficiency\": {\r\n \"compaction\": 2.12,\r\n \"deduplication\": 1.02,\r\n \"compression\": 1.37,\r\n \"dataReduction\": 1.37,\r\n \"overProvisioning\": 0.54\r\n }\r\n },\r\n \"system\": {\r\n \"totalSystemMiB\": 4022272,\r\n \"internalMiB\": 122880,\r\n \"spareMiB\": 3659776,\r\n \"spareUsedMiB\": 0,\r\n \"spareUnusedMiB\": 3659776,\r\n \"adminMiB\": 239616\r\n }\r\n },\r\n \"freeMiB\": 14888960,\r\n \"freeInitializedMiB\": 14888960,\r\n \"freeUninitializedMiB\": 0,\r\n \"unavailableCapacityMiB\": 0,\r\n \"failedCapacityMiB\": 0,\r\n \"overProvisionedVirtualSizeMiB\": 11742598,\r\n \"overProvisionedUsedMiB\": 6664000,\r\n \"overProvisionedAllocatedMiB\": 39680,\r\n \"overProvisionedFreeMiB\": 14888960\r\n }\r\n}" + }, + { + "uuid": "a4416a7a-51a5-4dda-a4cd-837747657199", + "id": "8ar6", + "name": "Volumes", + "documentation": "", + "value": "{\n \"total\": 17,\n \"members\": [\n {\n \"id\": 0,\n \"name\": \"admin\",\n \"deduplicationState\": 3,\n \"compressionState\": 4,\n \"provisioningType\": 1,\n \"copyType\": 1,\n \"baseId\": 0,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 0,\n \"rawReservedMiB\": 0,\n \"usedMiB\": 0,\n \"freeMiB\": 0\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 0,\n \"rawReservedMiB\": 0,\n \"usedMiB\": 0,\n \"freeMiB\": 0\n },\n \"userSpace\": {\n \"reservedMiB\": 10240,\n \"rawReservedMiB\": 30720,\n \"usedMiB\": 10240,\n \"freeMiB\": 0\n },\n \"totalReservedMiB\": 10240,\n \"totalUsedMiB\": 10240,\n \"sizeMiB\": 10240,\n \"wwn\": \"60002AC0000000000000000000029ECF\",\n \"nguid\": \"60002AC0000000000002AC0000029ECF\",\n \"creationTimeSec\": 1698237590,\n \"creationTime8601\": \"2023-10-25T14:39:50+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": false,\n \"system\": true,\n \"caching\": true,\n \"fsvc\": false\n },\n \"uuid\": \"c5d22b73-be29-4106-8947-98253f583417\",\n \"udid\": 0,\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/admin\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/admin\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 1,\n \"name\": \".srdata\",\n \"deduplicationState\": 3,\n \"compressionState\": 4,\n \"provisioningType\": 1,\n \"copyType\": 1,\n \"baseId\": 1,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 0,\n \"rawReservedMiB\": 0,\n \"usedMiB\": 0,\n \"freeMiB\": 0\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 0,\n \"rawReservedMiB\": 0,\n \"usedMiB\": 0,\n \"freeMiB\": 0\n },\n \"userSpace\": {\n \"reservedMiB\": 215040,\n \"rawReservedMiB\": 645120,\n \"usedMiB\": 215040,\n \"freeMiB\": 0\n },\n \"totalReservedMiB\": 215040,\n \"totalUsedMiB\": 215040,\n \"sizeMiB\": 215040,\n \"wwn\": \"60002AC0000000000000000100029ECF\",\n \"nguid\": \"60002AC0000000000002AC0100029ECF\",\n \"creationTimeSec\": 1698237835,\n \"creationTime8601\": \"2023-10-25T14:43:55+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": false,\n \"system\": true,\n \"caching\": true,\n \"fsvc\": false\n },\n \"uuid\": \"172a1cc9-84a5-429e-a738-53526b2ef33e\",\n \"udid\": 1,\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/.srdata\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/.srdata\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 2,\n \"name\": \".mgmtdata\",\n \"deduplicationState\": 3,\n \"compressionState\": 4,\n \"provisioningType\": 1,\n \"copyType\": 1,\n \"baseId\": 2,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 0,\n \"rawReservedMiB\": 0,\n \"usedMiB\": 0,\n \"freeMiB\": 0\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 0,\n \"rawReservedMiB\": 0,\n \"usedMiB\": 0,\n \"freeMiB\": 0\n },\n \"userSpace\": {\n \"reservedMiB\": 524288,\n \"rawReservedMiB\": 655360,\n \"usedMiB\": 524288,\n \"freeMiB\": 0\n },\n \"totalReservedMiB\": 524288,\n \"totalUsedMiB\": 524288,\n \"sizeMiB\": 524288,\n \"wwn\": \"60002AC0000000000000000200029ECF\",\n \"nguid\": \"60002AC0000000000002AC0200029ECF\",\n \"creationTimeSec\": 1698237944,\n \"creationTime8601\": \"2023-10-25T14:45:44+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": false,\n \"system\": true,\n \"caching\": true,\n \"fsvc\": false\n },\n \"uuid\": \"f34577fb-2e8e-4ad3-ae59-62ec99361781\",\n \"udid\": 2,\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/.mgmtdata\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/.mgmtdata\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 3,\n \"name\": \".shared.SSD_r6_0\",\n \"deduplicationState\": 3,\n \"compressionState\": 4,\n \"provisioningType\": 7,\n \"copyType\": 1,\n \"baseId\": 3,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 65792,\n \"rawReservedMiB\": 197376,\n \"usedMiB\": 65549,\n \"freeMiB\": 243\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 0,\n \"rawReservedMiB\": 0,\n \"usedMiB\": 0,\n \"freeMiB\": 0\n },\n \"userSpace\": {\n \"reservedMiB\": 100096,\n \"rawReservedMiB\": 125120,\n \"usedMiB\": 93333,\n \"freeMiB\": 6763\n },\n \"totalReservedMiB\": 100096,\n \"totalUsedMiB\": 93333,\n \"sizeMiB\": 67108864,\n \"wwn\": \"60002AC0000000000000000300029ECF\",\n \"nguid\": \"60002AC0000000000002AC0300029ECF\",\n \"creationTimeSec\": 1698404870,\n \"creationTime8601\": \"2023-10-27T13:07:50+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": false,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"SSD_r6\",\n \"uuid\": \"57afc591-10c1-4afe-9f28-3bf2de5221e5\",\n \"udid\": 3,\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/.shared.SSD_r6_0\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/.shared.SSD_r6_0\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 4,\n \"name\": \"Quorum-.0\",\n \"deduplicationState\": 1,\n \"compressionState\": 6,\n \"provisioningType\": 6,\n \"copyType\": 1,\n \"baseId\": 4,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 256,\n \"rawReservedMiB\": 768,\n \"usedMiB\": 2,\n \"freeMiB\": 254\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 3072,\n \"rawReservedMiB\": 3840,\n \"usedMiB\": 403,\n \"freeMiB\": 2669\n },\n \"totalReservedMiB\": 4096,\n \"totalUsedMiB\": 403,\n \"sizeMiB\": 102400,\n \"hostWriteMiB\": 445,\n \"wwn\": \"60002AC0000000000000000400029ECF\",\n \"nguid\": \"60002AC0000000000002AC0400029ECF\",\n \"creationTimeSec\": 1698404870,\n \"creationTime8601\": \"2023-10-27T13:07:50+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": false,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"SSD_r6\",\n \"snapCPG\": \"SSD_r6\",\n \"uuid\": \"f7a3b71f-4df1-4466-9afa-a4030fa1273c\",\n \"sharedParentId\": 3,\n \"udid\": 4,\n \"capacityEfficiency\": {\n \"compaction\": 253.80,\n \"deduplication\": 1.10,\n \"compression\": 1.01\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/Quorum-.0\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/Quorum-.0\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 5,\n \"name\": \"Quorum-.1\",\n \"deduplicationState\": 1,\n \"compressionState\": 6,\n \"provisioningType\": 6,\n \"copyType\": 1,\n \"baseId\": 5,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 256,\n \"rawReservedMiB\": 768,\n \"usedMiB\": 2,\n \"freeMiB\": 254\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 1,\n \"freeMiB\": 1023\n },\n \"totalReservedMiB\": 2048,\n \"totalUsedMiB\": 1,\n \"sizeMiB\": 102400,\n \"hostWriteMiB\": 51,\n \"wwn\": \"60002AC0000000000000000500029ECF\",\n \"nguid\": \"60002AC0000000000002AC0500029ECF\",\n \"creationTimeSec\": 1698404870,\n \"creationTime8601\": \"2023-10-27T13:07:50+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": false,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"SSD_r6\",\n \"snapCPG\": \"SSD_r6\",\n \"uuid\": \"6fd1bd0c-b964-404b-bd35-ee26eaa71362\",\n \"sharedParentId\": 3,\n \"udid\": 5,\n \"capacityEfficiency\": {\n \"compaction\": 69719.15,\n \"deduplication\": 13.36,\n \"compression\": 3.90\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/Quorum-.1\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/Quorum-.1\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 7,\n \"name\": \"YLBQG01\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 7,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 512,\n \"rawReservedMiB\": 1536,\n \"usedMiB\": 246,\n \"freeMiB\": 266\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 344960,\n \"rawReservedMiB\": 431200,\n \"usedMiB\": 340529,\n \"freeMiB\": 4431\n },\n \"totalReservedMiB\": 345984,\n \"totalUsedMiB\": 340529,\n \"sizeMiB\": 1048576,\n \"hostWriteMiB\": 340529,\n \"wwn\": \"60002AC0000000000000000700029ECF\",\n \"nguid\": \"60002AC0000000000002AC0700029ECF\",\n \"creationTimeSec\": 1705695394,\n \"creationTime8601\": \"2024-01-19T21:16:34+01:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"FC_r6\",\n \"snapCPG\": \"FC_r6\",\n \"uuid\": \"b87e37e3-719a-4a73-a524-f6f494f584d4\",\n \"udid\": 7,\n \"capacityEfficiency\": {\n \"compaction\": 3.08\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/YLBQG01\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/YLBQG01\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 8,\n \"name\": \"YLBQYLBQ01\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 8,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 8960,\n \"rawReservedMiB\": 26880,\n \"usedMiB\": 8572,\n \"freeMiB\": 388\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 13206144,\n \"rawReservedMiB\": 16507680,\n \"usedMiB\": 13189316,\n \"freeMiB\": 16828\n },\n \"totalReservedMiB\": 13207168,\n \"totalUsedMiB\": 13189316,\n \"sizeMiB\": 20971520,\n \"hostWriteMiB\": 13189315,\n \"wwn\": \"60002AC0000000000000000800029ECF\",\n \"nguid\": \"60002AC0000000000002AC0800029ECF\",\n \"creationTimeSec\": 1706865588,\n \"creationTime8601\": \"2024-02-02T10:19:48+01:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"FC_r6\",\n \"snapCPG\": \"FC_r6\",\n \"uuid\": \"8714afbd-1208-4369-a059-8174a442e4b8\",\n \"udid\": 8,\n \"capacityEfficiency\": {\n \"compaction\": 1.59\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/YLBQYLBQ01\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/YLBQYLBQ01\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 9,\n \"name\": \"YLBQFC\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 9,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 1536,\n \"rawReservedMiB\": 4608,\n \"usedMiB\": 1271,\n \"freeMiB\": 265\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 1969536,\n \"rawReservedMiB\": 2461920,\n \"usedMiB\": 1962500,\n \"freeMiB\": 7036\n },\n \"totalReservedMiB\": 1970560,\n \"totalUsedMiB\": 1962500,\n \"sizeMiB\": 4194304,\n \"hostWriteMiB\": 1962499,\n \"wwn\": \"60002AC0000000000000000900029ECF\",\n \"nguid\": \"60002AC0000000000002AC0900029ECF\",\n \"creationTimeSec\": 1707305151,\n \"creationTime8601\": \"2024-02-07T12:25:51+01:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"FC_r6\",\n \"snapCPG\": \"FC_r6\",\n \"uuid\": \"0f81c696-c524-4665-8311-ce89e728141f\",\n \"udid\": 9,\n \"capacityEfficiency\": {\n \"compaction\": 2.14\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/YLBQFC\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/YLBQFC\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 10,\n \"name\": \"DR-WOO-SSD01\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 10,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 3072,\n \"rawReservedMiB\": 9216,\n \"usedMiB\": 2666,\n \"freeMiB\": 406\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 4132096,\n \"rawReservedMiB\": 5165120,\n \"usedMiB\": 4123911,\n \"freeMiB\": 8185\n },\n \"totalReservedMiB\": 4133120,\n \"totalUsedMiB\": 4123911,\n \"sizeMiB\": 5767168,\n \"hostWriteMiB\": 4123911,\n \"wwn\": \"60002AC0000000000000000A00029ECF\",\n \"nguid\": \"60002AC0000000000002AC0A00029ECF\",\n \"creationTimeSec\": 1708590627,\n \"creationTime8601\": \"2024-02-22T09:30:27+01:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"SSD_r6\",\n \"snapCPG\": \"SSD_r6\",\n \"uuid\": \"2f4b05e3-5e6a-4d5d-85b9-bcf749732722\",\n \"udid\": 10,\n \"capacityEfficiency\": {\n \"compaction\": 1.40\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/DR-WOO-SSD01\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/DR-WOO-SSD01\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 11,\n \"name\": \"QUPODHDG01\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 11,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 256,\n \"rawReservedMiB\": 768,\n \"usedMiB\": 51,\n \"freeMiB\": 205\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 73856,\n \"rawReservedMiB\": 92320,\n \"usedMiB\": 71374,\n \"freeMiB\": 2482\n },\n \"totalReservedMiB\": 74880,\n \"totalUsedMiB\": 71374,\n \"sizeMiB\": 327680,\n \"hostWriteMiB\": 71374,\n \"wwn\": \"60002AC0000000000000000B00029ECF\",\n \"nguid\": \"60002AC0000000000002AC0B00029ECF\",\n \"creationTimeSec\": 1708591654,\n \"creationTime8601\": \"2024-02-22T09:47:34+01:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"FC_r6\",\n \"snapCPG\": \"FC_r6\",\n \"uuid\": \"bc749492-9161-414a-a7c3-d324039457f7\",\n \"udid\": 11,\n \"capacityEfficiency\": {\n \"compaction\": 4.59\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/DRORAMNG01\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/DRORAMNG01\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 12,\n \"name\": \"LZRFEE_NL01\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 12,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 14848,\n \"rawReservedMiB\": 44544,\n \"usedMiB\": 14176,\n \"freeMiB\": 672\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1536,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 22952960,\n \"rawReservedMiB\": 34429440,\n \"usedMiB\": 22952784,\n \"freeMiB\": 176\n },\n \"totalReservedMiB\": 22953984,\n \"totalUsedMiB\": 22952784,\n \"sizeMiB\": 31457280,\n \"hostWriteMiB\": 22952783,\n \"wwn\": \"60002AC0000000000000000C00029ECF\",\n \"nguid\": \"60002AC0000000000002AC0C00029ECF\",\n \"creationTimeSec\": 1714984909,\n \"creationTime8601\": \"2024-05-06T10:41:49+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"NL_r6\",\n \"snapCPG\": \"NL_r6\",\n \"uuid\": \"05e9cec9-9e8e-43b6-a86e-80b584649ef6\",\n \"udid\": 12,\n \"capacityEfficiency\": {\n \"compaction\": 1.37\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/LZRFEE_NL01\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/LZRFEE_NL01\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 13,\n \"name\": \"LZRFEE_NL02\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 13,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 15872,\n \"rawReservedMiB\": 47616,\n \"usedMiB\": 14995,\n \"freeMiB\": 877\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1536,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 24236800,\n \"rawReservedMiB\": 36355200,\n \"usedMiB\": 24228746,\n \"freeMiB\": 8054\n },\n \"totalReservedMiB\": 24237824,\n \"totalUsedMiB\": 24228746,\n \"sizeMiB\": 31457280,\n \"hostWriteMiB\": 24228745,\n \"wwn\": \"60002AC0000000000000000D00029ECF\",\n \"nguid\": \"60002AC0000000000002AC0D00029ECF\",\n \"creationTimeSec\": 1714984919,\n \"creationTime8601\": \"2024-05-06T10:41:59+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"NL_r6\",\n \"snapCPG\": \"NL_r6\",\n \"uuid\": \"78d5af3e-07fa-4633-a4be-4847054eec75\",\n \"udid\": 13,\n \"capacityEfficiency\": {\n \"compaction\": 1.30\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/LZRFEE_NL02\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/LZRFEE_NL02\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 14,\n \"name\": \"LZRFEE_NL03\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 14,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 1536,\n \"rawReservedMiB\": 4608,\n \"usedMiB\": 1043,\n \"freeMiB\": 493\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1536,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 1681920,\n \"rawReservedMiB\": 2522880,\n \"usedMiB\": 1674259,\n \"freeMiB\": 7661\n },\n \"totalReservedMiB\": 1682944,\n \"totalUsedMiB\": 1674259,\n \"sizeMiB\": 5767168,\n \"hostWriteMiB\": 1674258,\n \"wwn\": \"60002AC0000000000000000E00029ECF\",\n \"nguid\": \"60002AC0000000000002AC0E00029ECF\",\n \"creationTimeSec\": 1714984956,\n \"creationTime8601\": \"2024-05-06T10:42:36+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"NL_r6\",\n \"snapCPG\": \"NL_r6\",\n \"uuid\": \"ae602d85-5502-439a-ae91-010fcc027668\",\n \"udid\": 14,\n \"capacityEfficiency\": {\n \"compaction\": 3.44\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/LZRFEE_NL03\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/LZRFEE_NL03\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 15,\n \"name\": \"LZRFEE_NL2024\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 15,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 512,\n \"rawReservedMiB\": 1536,\n \"usedMiB\": 286,\n \"freeMiB\": 226\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1536,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 445952,\n \"rawReservedMiB\": 668928,\n \"usedMiB\": 440606,\n \"freeMiB\": 5346\n },\n \"totalReservedMiB\": 446976,\n \"totalUsedMiB\": 440606,\n \"sizeMiB\": 5754880,\n \"hostWriteMiB\": 440606,\n \"wwn\": \"60002AC0000000000000000F00029ECF\",\n \"nguid\": \"60002AC0000000000002AC0F00029ECF\",\n \"creationTimeSec\": 1715258997,\n \"creationTime8601\": \"2024-05-09T14:49:57+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"NL_r6\",\n \"snapCPG\": \"NL_r6\",\n \"uuid\": \"011ec0da-2900-412e-9ddf-bd54531cbe46\",\n \"udid\": 15,\n \"capacityEfficiency\": {\n \"compaction\": 13.06\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/LZRFEE_NL2024\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/LZRFEE_NL2024\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 16,\n \"name\": \"JHDFB_NL01\",\n \"deduplicationState\": 2,\n \"compressionState\": 2,\n \"provisioningType\": 2,\n \"copyType\": 1,\n \"baseId\": 16,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 768,\n \"rawReservedMiB\": 2304,\n \"usedMiB\": 485,\n \"freeMiB\": 283\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 520192,\n \"rawReservedMiB\": 650240,\n \"usedMiB\": 512160,\n \"freeMiB\": 8032\n },\n \"totalReservedMiB\": 521216,\n \"totalUsedMiB\": 512160,\n \"sizeMiB\": 5242880,\n \"hostWriteMiB\": 512159,\n \"wwn\": \"60002AC0000000000000001000029ECF\",\n \"nguid\": \"60002AC0000000000002AC1000029ECF\",\n \"creationTimeSec\": 1715264791,\n \"creationTime8601\": \"2024-05-09T16:26:31+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": true,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"FC_r6\",\n \"snapCPG\": \"FC_r6\",\n \"uuid\": \"a44d942b-182d-4983-a4ec-72f9285c0dfd\",\n \"udid\": 16,\n \"capacityEfficiency\": {\n \"compaction\": 10.24\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/JHDFB_NL01\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/JHDFB_NL01\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n },\n {\n \"id\": 17,\n \"name\": \"DR-WOO-SSD02\",\n \"deduplicationState\": 1,\n \"compressionState\": 6,\n \"provisioningType\": 6,\n \"copyType\": 1,\n \"baseId\": 17,\n \"readOnly\": false,\n \"state\": 1,\n \"failedStates\": [],\n \"degradedStates\": [],\n \"additionalStates\": [],\n \"adminSpace\": {\n \"reservedMiB\": 1280,\n \"rawReservedMiB\": 3840,\n \"usedMiB\": 942,\n \"freeMiB\": 338\n },\n \"snapshotSpace\": {\n \"reservedMiB\": 1024,\n \"rawReservedMiB\": 1280,\n \"usedMiB\": 0,\n \"freeMiB\": 1024\n },\n \"userSpace\": {\n \"reservedMiB\": 1090816,\n \"rawReservedMiB\": 1363520,\n \"usedMiB\": 1084104,\n \"freeMiB\": 6712\n },\n \"totalReservedMiB\": 1091840,\n \"totalUsedMiB\": 1084104,\n \"sizeMiB\": 5242880,\n \"hostWriteMiB\": 1609376,\n \"wwn\": \"60002AC0000000000000001100029ECF\",\n \"nguid\": \"60002AC0000000000002AC1100029ECF\",\n \"creationTimeSec\": 1715277439,\n \"creationTime8601\": \"2024-05-09T19:57:19+02:00\",\n \"ssSpcAllocWarningPct\": 0,\n \"ssSpcAllocLimitPct\": 0,\n \"usrSpcAllocWarningPct\": 0,\n \"usrSpcAllocLimitPct\": 0,\n \"policies\": {\n \"staleSS\": true,\n \"oneHost\": false,\n \"zeroDetect\": false,\n \"system\": false,\n \"caching\": true,\n \"fsvc\": false,\n \"hostDIF\": 1\n },\n \"userCPG\": \"SSD_r6\",\n \"snapCPG\": \"SSD_r6\",\n \"uuid\": \"9d89830e-33fb-4e28-adbb-c74ef23b10b8\",\n \"sharedParentId\": 3,\n \"udid\": 17,\n \"capacityEfficiency\": {\n \"compaction\": 4.84,\n \"deduplication\": 1.08,\n \"compression\": 1.37\n },\n \"rcopyStatus\": 1,\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes/DR-WOO-SSD02\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution/DR-WOO-SSD02\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumes\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"https://lfeat-primera.vesl19.dv/api/v1/volumespacedistribution\",\n \"rel\": \"volumeSpaceDistribution\"\n }\n ]\n}\n" + } + ], + "callbacks": [] +} \ No newline at end of file diff --git a/tests/robot/storage/hp/primera/restapi/licenses.robot b/tests/robot/storage/hp/primera/restapi/licenses.robot new file mode 100644 index 0000000000..ed34ca4df9 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/licenses.robot @@ -0,0 +1,47 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode=licenses +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +Licenses ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} + + ${output} Strip String ${output} + + Should Match Regexp + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} OK: Number of licenses: 25, Number of expired licenses: 1 - All licenses are ok \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0; + ... 2 --critical-license-expiration=86400: CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;86400:;0; + ... 3 --warning-license-expiration=86400: WARNING: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;86400:;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;86400:;;0; + ... 4 --warning-expired=0:0 WARNING: Number of expired licenses: 1 \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;0:0;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0; + ... 5 --critical-license-expiration=86400: --warning-license-expiration=1296000: CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;1296000:;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;1296000:;86400:;0; + ... 6 --critical-license-expiration=86400: --warning-license-expiration=86400: CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;86400:;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;86400:;86400:;0; + ... 7 --critical-license-expiration=86400: --warning-license-expiration=1296000: --warning-expired=0:0 CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. WARNING: Number of expired licenses: 1 \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;0:0;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;1296000:;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;1296000:;86400:;0; + ... 8 --critical-expired=0:0 CRITICAL: Number of expired licenses: 1 \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;0:0;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0; + ... 9 --filter-name='Autonomic Rebalance' OK: Number of licenses: 1, Number of expired licenses: 0 - License 'Autonomic Rebalance' expires: 2284-05-21. Autonomic Rebalance license expires in .*. \| 'licenses.total.count'=1;;;0; 'licenses.expired.count'=0;;;0;1 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0; diff --git a/tests/robot/storage/hp/primera/restapi/listdisks.robot b/tests/robot/storage/hp/primera/restapi/listdisks.robot new file mode 100644 index 0000000000..f5b7b7f3a7 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/listdisks.robot @@ -0,0 +1,44 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode=list-disks +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ +... + +*** Test Cases *** +List-Disks ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} | wc -l + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} 83 + ... 2 --disco-show 85 + ... 3 --disco-format 9 diff --git a/tests/robot/storage/hp/primera/restapi/listvolumes.robot b/tests/robot/storage/hp/primera/restapi/listvolumes.robot new file mode 100644 index 0000000000..e329149527 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/listvolumes.robot @@ -0,0 +1,44 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode=list-volumes +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ +... + +*** Test Cases *** +List-Volumes ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} | wc -l + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} 18 + ... 2 --disco-show 20 + ... 3 --disco-format 7 diff --git a/tests/robot/storage/hp/primera/restapi/nodes.robot b/tests/robot/storage/hp/primera/restapi/nodes.robot new file mode 100644 index 0000000000..845b755c57 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/nodes.robot @@ -0,0 +1,44 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode=nodes +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +Nodes ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} + + ${output} Strip String ${output} + + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} WARNING: node 0 is offline | 'nodes.total.count'=2;;;0; 'nodes.online.count'=1;;;0;2 'nodes.offline.count'=1;;;0;2 + ... 2 --warning-node-status='${PERCENT}\\{status\\} ne "offline"' WARNING: node 1 is online | 'nodes.total.count'=2;;;0; 'nodes.online.count'=1;;;0;2 'nodes.offline.count'=1;;;0;2 + ... 3 --warning-online=2:2 WARNING: Number of online nodes: 1 - node 0 is offline | 'nodes.total.count'=2;;;0; 'nodes.online.count'=1;2:2;;0;2 'nodes.offline.count'=1;;;0;2 + ... 4 --critical-online=2:2 CRITICAL: Number of online nodes: 1 WARNING: node 0 is offline | 'nodes.total.count'=2;;;0; 'nodes.online.count'=1;;2:2;0;2 'nodes.offline.count'=1;;;0;2 + ... 5 --critical-offline=0:0 CRITICAL: Number of offline nodes: 1 WARNING: node 0 is offline | 'nodes.total.count'=2;;;0; 'nodes.online.count'=1;;;0;2 'nodes.offline.count'=1;;0:0;0;2 diff --git a/tests/robot/storage/hp/primera/restapi/volumeusage.robot b/tests/robot/storage/hp/primera/restapi/volumeusage.robot new file mode 100644 index 0000000000..827ff24fe8 --- /dev/null +++ b/tests/robot/storage/hp/primera/restapi/volumeusage.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation HPE Primera Storage REST API + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json +${HOSTNAME} 127.0.0.1 +${APIPORT} 3000 +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::hp::primera::restapi::plugin +... --mode=volume-usage +... --hostname=${HOSTNAME} +... --api-username=toto +... --api-password=toto +... --proto=http +... --port=${APIPORT} +... --custommode=api +... --statefile-dir=/dev/shm/ + +*** Test Cases *** +Volumeusage ${tc} + [Tags] storage api hpe hp + ${output} Run ${CMD} ${extraoptions} + + ${output} Strip String ${output} + + Should Be Equal As Strings + ... ${output} + ... ${expected_result} + ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n + ... values=False + ... collapse_spaces=True + + Examples: tc extraoptions expected_result -- + ... 1 ${EMPTY} OK: All volumes are ok | '.mgmtdata#volume.space.usage.bytes'=549755813888B;;;0;549755813888 '.mgmtdata#volume.space.free.bytes'=0B;;;0;549755813888 '.mgmtdata#volume.space.usage.percentage'=100.00%;;;0;100 '.shared.SSD_r6_0#volume.space.usage.bytes'=166599852032B;;;0;70368744177664 '.shared.SSD_r6_0#volume.space.free.bytes'=70202144325632B;;;0;70368744177664 '.shared.SSD_r6_0#volume.space.usage.percentage'=0.24%;;;0;100 '.srdata#volume.space.usage.bytes'=225485783040B;;;0;225485783040 '.srdata#volume.space.free.bytes'=0B;;;0;225485783040 '.srdata#volume.space.usage.percentage'=100.00%;;;0;100 'DR-WOO-SSD01#volume.space.usage.bytes'=4327029604352B;;;0;6047313952768 'DR-WOO-SSD01#volume.space.free.bytes'=1720284348416B;;;0;6047313952768 'DR-WOO-SSD01#volume.space.usage.percentage'=71.55%;;;0;100 'DR-WOO-SSD02#volume.space.usage.bytes'=1137753194496B;;;0;5497558138880 'DR-WOO-SSD02#volume.space.free.bytes'=4359804944384B;;;0;5497558138880 'DR-WOO-SSD02#volume.space.usage.percentage'=20.70%;;;0;100 'JHDFB_NL01#volume.space.usage.bytes'=537547243520B;;;0;5497558138880 'JHDFB_NL01#volume.space.free.bytes'=4960010895360B;;;0;5497558138880 'JHDFB_NL01#volume.space.usage.percentage'=9.78%;;;0;100 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;;;0;32985348833280 'LZRFEE_NL01#volume.space.free.bytes'=8902745784320B;;;0;32985348833280 'LZRFEE_NL01#volume.space.usage.percentage'=73.01%;;;0;100 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;;;0;32985348833280 'LZRFEE_NL02#volume.space.free.bytes'=7563943870464B;;;0;32985348833280 'LZRFEE_NL02#volume.space.usage.percentage'=77.07%;;;0;100 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.free.bytes'=5572120281088B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.usage.percentage'=7.66%;;;0;100 'QUPODHDG01#volume.space.usage.bytes'=74894540800B;;;0;343597383680 'QUPODHDG01#volume.space.free.bytes'=268702842880B;;;0;343597383680 'QUPODHDG01#volume.space.usage.percentage'=21.80%;;;0;100 'Quorum-.0#volume.space.usage.bytes'=424673280B;;;0;107374182400 'Quorum-.0#volume.space.free.bytes'=106949509120B;;;0;107374182400 'Quorum-.0#volume.space.usage.percentage'=0.40%;;;0;100 'Quorum-.1#volume.space.usage.bytes'=3145728B;;;0;107374182400 'Quorum-.1#volume.space.free.bytes'=107371036672B;;;0;107374182400 'Quorum-.1#volume.space.usage.percentage'=0.00%;;;0;100 'YLBQFC#volume.space.usage.bytes'=2059163140096B;;;0;4398046511104 'YLBQFC#volume.space.free.bytes'=2338883371008B;;;0;4398046511104 'YLBQFC#volume.space.usage.percentage'=46.82%;;;0;100 'YLBQG01#volume.space.usage.bytes'=357328486400B;;;0;1099511627776 'YLBQG01#volume.space.free.bytes'=742183141376B;;;0;1099511627776 'YLBQG01#volume.space.usage.percentage'=32.50%;;;0;100 'YLBQYLBQ01#volume.space.usage.bytes'=13838988607488B;;;0;21990232555520 'YLBQYLBQ01#volume.space.free.bytes'=8151243948032B;;;0;21990232555520 'YLBQYLBQ01#volume.space.usage.percentage'=62.93%;;;0;100 'admin#volume.space.usage.bytes'=10737418240B;;;0;10737418240 'admin#volume.space.free.bytes'=0B;;;0;10737418240 'admin#volume.space.usage.percentage'=100.00%;;;0;100 + ... 2 --filter-name=LZRFEE_NL03 OK: Volume 'LZRFEE_NL03' (#14) Usage Total: 5.50 TB Used: 1.60 TB (29.05%) Free: 3.90 TB (70.95%) | 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 + ... 3 --filter-counters='^usage$' OK: All volumes are ok | '.mgmtdata#volume.space.usage.bytes'=549755813888B;;;0;549755813888 '.shared.SSD_r6_0#volume.space.usage.bytes'=166599852032B;;;0;70368744177664 '.srdata#volume.space.usage.bytes'=225485783040B;;;0;225485783040 'DR-WOO-SSD01#volume.space.usage.bytes'=4327029604352B;;;0;6047313952768 'DR-WOO-SSD02#volume.space.usage.bytes'=1137753194496B;;;0;5497558138880 'JHDFB_NL01#volume.space.usage.bytes'=537547243520B;;;0;5497558138880 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;;;0;32985348833280 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;;;0;32985348833280 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;;;0;6034429050880 'QUPODHDG01#volume.space.usage.bytes'=74894540800B;;;0;343597383680 'Quorum-.0#volume.space.usage.bytes'=424673280B;;;0;107374182400 'Quorum-.1#volume.space.usage.bytes'=3145728B;;;0;107374182400 'YLBQFC#volume.space.usage.bytes'=2059163140096B;;;0;4398046511104 'YLBQG01#volume.space.usage.bytes'=357328486400B;;;0;1099511627776 'YLBQYLBQ01#volume.space.usage.bytes'=13838988607488B;;;0;21990232555520 'admin#volume.space.usage.bytes'=10737418240B;;;0;10737418240 + ... 4 --warning-usage-prct='70' --filter-name=LZRFEE WARNING: Volume 'LZRFEE_NL01' (#12) Used : 73.01 % - Volume 'LZRFEE_NL02' (#13) Used : 77.07 % | 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;;;0;32985348833280 'LZRFEE_NL01#volume.space.free.bytes'=8902745784320B;;;0;32985348833280 'LZRFEE_NL01#volume.space.usage.percentage'=73.01%;0:70;;0;100 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;;;0;32985348833280 'LZRFEE_NL02#volume.space.free.bytes'=7563943870464B;;;0;32985348833280 'LZRFEE_NL02#volume.space.usage.percentage'=77.07%;0:70;;0;100 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;0:70;;0;100 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.free.bytes'=5572120281088B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.usage.percentage'=7.66%;0:70;;0;100 + ... 5 --critical-usage-prct='70' --filter-name=LZRFEE CRITICAL: Volume 'LZRFEE_NL01' (#12) Used : 73.01 % - Volume 'LZRFEE_NL02' (#13) Used : 77.07 % | 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;;;0;32985348833280 'LZRFEE_NL01#volume.space.free.bytes'=8902745784320B;;;0;32985348833280 'LZRFEE_NL01#volume.space.usage.percentage'=73.01%;;0:70;0;100 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;;;0;32985348833280 'LZRFEE_NL02#volume.space.free.bytes'=7563943870464B;;;0;32985348833280 'LZRFEE_NL02#volume.space.usage.percentage'=77.07%;;0:70;0;100 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;0:70;0;100 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.free.bytes'=5572120281088B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.usage.percentage'=7.66%;;0:70;0;100 + ... 6 --warning-usage='70' --filter-name=LZRFEE WARNING: Volume 'LZRFEE_NL01' (#12) Usage Total: 30.00 TB Used: 21.90 TB (73.01%) Free: 8.10 TB (26.99%) - Volume 'LZRFEE_NL02' (#13) Usage Total: 30.00 TB Used: 23.12 TB (77.07%) Free: 6.88 TB (22.93%) - Volume 'LZRFEE_NL03' (#14) Usage Total: 5.50 TB Used: 1.60 TB (29.05%) Free: 3.90 TB (70.95%) - Volume 'LZRFEE_NL2024' (#15) Usage Total: 5.49 TB Used: 430.56 GB (7.66%) Free: 5.07 TB (92.34%) | 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;0:70;;0;32985348833280 'LZRFEE_NL01#volume.space.free.bytes'=8902745784320B;;;0;32985348833280 'LZRFEE_NL01#volume.space.usage.percentage'=73.01%;;;0;100 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;0:70;;0;32985348833280 'LZRFEE_NL02#volume.space.free.bytes'=7563943870464B;;;0;32985348833280 'LZRFEE_NL02#volume.space.usage.percentage'=77.07%;;;0;100 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;0:70;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;0:70;;0;6034429050880 'LZRFEE_NL2024#volume.space.free.bytes'=5572120281088B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.usage.percentage'=7.66%;;;0;100 + ... 7 --critical-usage='70' --filter-name=LZRFEE CRITICAL: Volume 'LZRFEE_NL01' (#12) Usage Total: 30.00 TB Used: 21.90 TB (73.01%) Free: 8.10 TB (26.99%) - Volume 'LZRFEE_NL02' (#13) Usage Total: 30.00 TB Used: 23.12 TB (77.07%) Free: 6.88 TB (22.93%) - Volume 'LZRFEE_NL03' (#14) Usage Total: 5.50 TB Used: 1.60 TB (29.05%) Free: 3.90 TB (70.95%) - Volume 'LZRFEE_NL2024' (#15) Usage Total: 5.49 TB Used: 430.56 GB (7.66%) Free: 5.07 TB (92.34%) | 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;;0:70;0;32985348833280 'LZRFEE_NL01#volume.space.free.bytes'=8902745784320B;;;0;32985348833280 'LZRFEE_NL01#volume.space.usage.percentage'=73.01%;;;0;100 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;;0:70;0;32985348833280 'LZRFEE_NL02#volume.space.free.bytes'=7563943870464B;;;0;32985348833280 'LZRFEE_NL02#volume.space.usage.percentage'=77.07%;;;0;100 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;0:70;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;;0:70;0;6034429050880 'LZRFEE_NL2024#volume.space.free.bytes'=5572120281088B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.usage.percentage'=7.66%;;;0;100 + ... 8 --warning-usage-free='10:' --filter-name=LZRFEE OK: All volumes are ok | 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;;;0;32985348833280 'LZRFEE_NL01#volume.space.free.bytes'=8902745784320B;10:;;0;32985348833280 'LZRFEE_NL01#volume.space.usage.percentage'=73.01%;;;0;100 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;;;0;32985348833280 'LZRFEE_NL02#volume.space.free.bytes'=7563943870464B;10:;;0;32985348833280 'LZRFEE_NL02#volume.space.usage.percentage'=77.07%;;;0;100 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;10:;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.free.bytes'=5572120281088B;10:;;0;6034429050880 'LZRFEE_NL2024#volume.space.usage.percentage'=7.66%;;;0;100 + ... 9 --critical-usage-free='10:' --filter-name=LZRFEE OK: All volumes are ok | 'LZRFEE_NL01#volume.space.usage.bytes'=24082603048960B;;;0;32985348833280 'LZRFEE_NL01#volume.space.free.bytes'=8902745784320B;;10:;0;32985348833280 'LZRFEE_NL01#volume.space.usage.percentage'=73.01%;;;0;100 'LZRFEE_NL02#volume.space.usage.bytes'=25421404962816B;;;0;32985348833280 'LZRFEE_NL02#volume.space.free.bytes'=7563943870464B;;10:;0;32985348833280 'LZRFEE_NL02#volume.space.usage.percentage'=77.07%;;;0;100 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;10:;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 'LZRFEE_NL2024#volume.space.usage.bytes'=462308769792B;;;0;6034429050880 'LZRFEE_NL2024#volume.space.free.bytes'=5572120281088B;;10:;0;6034429050880 'LZRFEE_NL2024#volume.space.usage.percentage'=7.66%;;;0;100 + ... 10 --warning-usage='70' --filter-id='^14$' WARNING: Volume 'LZRFEE_NL03' (#14) Usage Total: 5.50 TB Used: 1.60 TB (29.05%) Free: 3.90 TB (70.95%) | 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;0:70;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 + ... 11 --critical-usage='70' --filter-id='^14$' CRITICAL: Volume 'LZRFEE_NL03' (#14) Usage Total: 5.50 TB Used: 1.60 TB (29.05%) Free: 3.90 TB (70.95%) | 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;0:70;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 + ... 12 --warning-usage-free='10:' --filter-id='^14$' OK: Volume 'LZRFEE_NL03' (#14) Usage Total: 5.50 TB Used: 1.60 TB (29.05%) Free: 3.90 TB (70.95%) | 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;10:;;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 + ... 13 --critical-usage-free='10:' --filter-id='^14$' OK: Volume 'LZRFEE_NL03' (#14) Usage Total: 5.50 TB Used: 1.60 TB (29.05%) Free: 3.90 TB (70.95%) | 'LZRFEE_NL03#volume.space.usage.bytes'=1756681469952B;;;0;6047313952768 'LZRFEE_NL03#volume.space.free.bytes'=4290632482816B;;10:;0;6047313952768 'LZRFEE_NL03#volume.space.usage.percentage'=29.05%;;;0;100 diff --git a/tests/robot/storage/synology/snmp/storage-synology-snmp.robot b/tests/robot/storage/synology/snmp/storage-synology-snmp.robot index be230e3bb0..e14997dd55 100644 --- a/tests/robot/storage/synology/snmp/storage-synology-snmp.robot +++ b/tests/robot/storage/synology/snmp/storage-synology-snmp.robot @@ -63,16 +63,12 @@ Components ${command} Catenate ... ${CMD} ... --mode=components - ... --hostname=127.0.0.1 - ... --snmp-version=2 - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=${check_components_test.snmpcommunity} - - ${output} Run ${command} - Should Be Equal As Strings - ... ${check_components_test.expected_output} - ... ${output} - ... ${check_components_test.description} failed. Wrong output for components mode: ${check_components_test}.{\n}Command output:{\n}${output} + + Ctn Run Command And Check Result As Strings ${command} ${check_components_test.expected_output} END Uptime @@ -81,16 +77,12 @@ Uptime ${command} Catenate ... ${CMD} ... --mode=uptime - ... --hostname=127.0.0.1 - ... --snmp-version=2 - ... --snmp-port=2024 + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} ... --snmp-community=${test_item.snmpcommunity} ... --warning-uptime=${test_item.warning} ... --critical-uptime=${test_item.critical} - - ${output} Run ${command} - Should Be Equal As Strings - ... ${test_item.expected_output} - ... ${output} - ... ${test_item.description} failed. Wrong output for components mode: ${test_item}.{\n}Command output:{\n}${output} + + Ctn Run Command And Check Result As Strings ${command} ${test_item.expected_output} END