diff --git a/centreon-plugins/apps/vmware/connector/mode/alarmdatacenter.pm b/centreon-plugins/apps/vmware/connector/mode/alarmdatacenter.pm index 5dc2b828c..c82c08c02 100644 --- a/centreon-plugins/apps/vmware/connector/mode/alarmdatacenter.pm +++ b/centreon-plugins/apps/vmware/connector/mode/alarmdatacenter.pm @@ -70,19 +70,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{entity_name} = $options{new_datas}->{$self->{instance} . '_entity_name'}; - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{name} = $options{new_datas}->{$self->{instance} . '_name'}; - $self->{result_values}->{type} = $options{new_datas}->{$self->{instance} . '_type'}; - $self->{result_values}->{since} = $options{new_datas}->{$self->{instance} . '_since'}; - $self->{result_values}->{description} = $options{new_datas}->{$self->{instance} . '_description'}; - $self->{result_values}->{time} = $options{new_datas}->{$self->{instance} . '_time'}; - return 0; -} - sub custom_dcmetrics_perfdata { my ($self, %options) = @_; @@ -146,7 +133,6 @@ sub set_counters { { label => 'status', threshold => 0, set => { key_values => [ { name => 'entity_name' }, { name => 'status' }, { name => 'time' }, { name => 'description' }, { name => 'name' }, { name => 'type' }, { name => 'since' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/alarmhost.pm b/centreon-plugins/apps/vmware/connector/mode/alarmhost.pm index 708524b5e..07be989fd 100644 --- a/centreon-plugins/apps/vmware/connector/mode/alarmhost.pm +++ b/centreon-plugins/apps/vmware/connector/mode/alarmhost.pm @@ -70,19 +70,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{entity_name} = $options{new_datas}->{$self->{instance} . '_entity_name'}; - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{name} = $options{new_datas}->{$self->{instance} . '_name'}; - $self->{result_values}->{type} = $options{new_datas}->{$self->{instance} . '_type'}; - $self->{result_values}->{since} = $options{new_datas}->{$self->{instance} . '_since'}; - $self->{result_values}->{description} = $options{new_datas}->{$self->{instance} . '_description'}; - $self->{result_values}->{time} = $options{new_datas}->{$self->{instance} . '_time'}; - return 0; -} - sub custom_esxhost_perfdata { my ($self, %options) = @_; @@ -145,7 +132,6 @@ sub set_counters { { label => 'status', threshold => 0, set => { key_values => [ { name => 'entity_name' }, { name => 'status' }, { name => 'time' }, { name => 'description' }, { name => 'name' }, { name => 'type' }, { name => 'since' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/datastoreusage.pm b/centreon-plugins/apps/vmware/connector/mode/datastoreusage.pm index d60959c89..c03815b50 100644 --- a/centreon-plugins/apps/vmware/connector/mode/datastoreusage.pm +++ b/centreon-plugins/apps/vmware/connector/mode/datastoreusage.pm @@ -33,13 +33,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{accessible} = $options{new_datas}->{$self->{instance} . '_accessible'}; - return 0; -} - sub custom_usage_output { my ($self, %options) = @_; @@ -94,7 +87,6 @@ sub set_counters { $self->{maps_counters}->{datastore} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'accessible' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/datastorevm.pm b/centreon-plugins/apps/vmware/connector/mode/datastorevm.pm index abcb4a60f..6f74e6646 100644 --- a/centreon-plugins/apps/vmware/connector/mode/datastorevm.pm +++ b/centreon-plugins/apps/vmware/connector/mode/datastorevm.pm @@ -34,14 +34,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{connection_state} = $options{new_datas}->{$self->{instance} . '_connection_state'}; - $self->{result_values}->{power_state} = $options{new_datas}->{$self->{instance} . '_power_state'}; - return 0; -} - sub set_counters { my ($self, %options) = @_; @@ -58,7 +50,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'connection_state' }, { name => 'power_state' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/devicevm.pm b/centreon-plugins/apps/vmware/connector/mode/devicevm.pm index f8ba791eb..3693db2da 100644 --- a/centreon-plugins/apps/vmware/connector/mode/devicevm.pm +++ b/centreon-plugins/apps/vmware/connector/mode/devicevm.pm @@ -33,14 +33,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{connection_state} = $options{new_datas}->{$self->{instance} . '_connection_state'}; - $self->{result_values}->{power_state} = $options{new_datas}->{$self->{instance} . '_power_state'}; - return 0; -} - sub custom_device_output { my ($self, %options) = @_; @@ -71,7 +63,6 @@ sub set_counters { $self->{maps_counters}->{vm} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'connection_state' }, { name => 'power_state' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/discovery.pm b/centreon-plugins/apps/vmware/connector/mode/discovery.pm index dc2efc1f4..4f848f564 100644 --- a/centreon-plugins/apps/vmware/connector/mode/discovery.pm +++ b/centreon-plugins/apps/vmware/connector/mode/discovery.pm @@ -32,8 +32,8 @@ sub new { bless $self, $class; $options{options}->add_options(arguments => { - "resource-type:s" => { name => 'resource_type' }, - "prettify" => { name => 'prettify' }, + 'resource-type:s' => { name => 'resource_type' }, + 'prettify' => { name => 'prettify' } }); return $self; diff --git a/centreon-plugins/apps/vmware/connector/mode/getmap.pm b/centreon-plugins/apps/vmware/connector/mode/getmap.pm index 4ce5b292a..38b30a543 100644 --- a/centreon-plugins/apps/vmware/connector/mode/getmap.pm +++ b/centreon-plugins/apps/vmware/connector/mode/getmap.pm @@ -30,14 +30,14 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "esx-hostname:s" => { name => 'esx_hostname' }, - "filter" => { name => 'filter' }, - "scope-datacenter:s" => { name => 'scope_datacenter' }, - "scope-cluster:s" => { name => 'scope_cluster' }, - "vm-no" => { name => 'vm_no' }, - }); + $options{options}->add_options(arguments => { + 'esx-hostname:s' => { name => 'esx_hostname' }, + 'filter' => { name => 'filter' }, + 'scope-datacenter:s' => { name => 'scope_datacenter' }, + 'scope-cluster:s' => { name => 'scope_cluster' }, + 'vm-no' => { name => 'vm_no' }, + }); + return $self; } diff --git a/centreon-plugins/apps/vmware/connector/mode/listclusters.pm b/centreon-plugins/apps/vmware/connector/mode/listclusters.pm index 34454fa13..3243a1730 100644 --- a/centreon-plugins/apps/vmware/connector/mode/listclusters.pm +++ b/centreon-plugins/apps/vmware/connector/mode/listclusters.pm @@ -30,11 +30,11 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "cluster:s" => { name => 'cluster' }, - "filter" => { name => 'filter' }, - }); + $options{options}->add_options(arguments => { + 'cluster:s' => { name => 'cluster' }, + 'filter' => { name => 'filter' }, + }); + return $self; } diff --git a/centreon-plugins/apps/vmware/connector/mode/listdatacenters.pm b/centreon-plugins/apps/vmware/connector/mode/listdatacenters.pm index febaa7fcf..8446d0c0b 100644 --- a/centreon-plugins/apps/vmware/connector/mode/listdatacenters.pm +++ b/centreon-plugins/apps/vmware/connector/mode/listdatacenters.pm @@ -30,11 +30,11 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "datacenter:s" => { name => 'datacenter' }, - "filter" => { name => 'filter' }, - }); + $options{options}->add_options(arguments => { + 'datacenter:s' => { name => 'datacenter' }, + 'filter' => { name => 'filter' } + }); + return $self; } @@ -43,7 +43,6 @@ sub check_options { $self->SUPER::init(%options); } - sub run { my ($self, %options) = @_; diff --git a/centreon-plugins/apps/vmware/connector/mode/listdatastores.pm b/centreon-plugins/apps/vmware/connector/mode/listdatastores.pm index e4e93bd38..e0395ed7e 100644 --- a/centreon-plugins/apps/vmware/connector/mode/listdatastores.pm +++ b/centreon-plugins/apps/vmware/connector/mode/listdatastores.pm @@ -30,12 +30,12 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "datastore-name:s" => { name => 'datastore_name' }, - "filter" => { name => 'filter' }, - "scope-datacenter:s" => { name => 'scope_datacenter' }, - }); + $options{options}->add_options(arguments => { + 'datastore-name:s' => { name => 'datastore_name' }, + 'filter' => { name => 'filter' }, + 'scope-datacenter:s' => { name => 'scope_datacenter' } + }); + return $self; } diff --git a/centreon-plugins/apps/vmware/connector/mode/listnichost.pm b/centreon-plugins/apps/vmware/connector/mode/listnichost.pm index b057d1f34..daafc28c7 100644 --- a/centreon-plugins/apps/vmware/connector/mode/listnichost.pm +++ b/centreon-plugins/apps/vmware/connector/mode/listnichost.pm @@ -30,11 +30,11 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "esx-hostname:s" => { name => 'esx_hostname' }, - "filter" => { name => 'filter' }, - }); + $options{options}->add_options(arguments => { + 'esx-hostname:s' => { name => 'esx_hostname' }, + 'filter' => { name => 'filter' } + }); + return $self; } diff --git a/centreon-plugins/apps/vmware/connector/mode/maintenancehost.pm b/centreon-plugins/apps/vmware/connector/mode/maintenancehost.pm index d4bd4e308..22572d5f0 100644 --- a/centreon-plugins/apps/vmware/connector/mode/maintenancehost.pm +++ b/centreon-plugins/apps/vmware/connector/mode/maintenancehost.pm @@ -47,13 +47,6 @@ sub custom_maintenance_output { return $msg; } -sub custom_maintenance_calc { - my ($self, %options) = @_; - - $self->{result_values}->{maintenance} = $options{new_datas}->{$self->{instance} . '_maintenance'}; - return 0; -} - sub set_counters { my ($self, %options) = @_; @@ -72,7 +65,6 @@ sub set_counters { }, { label => 'maintenance-status', threshold => 0, set => { key_values => [ { name => 'maintenance' } ], - closure_custom_calc => $self->can('custom_maintenance_calc'), closure_custom_output => $self->can('custom_maintenance_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/memoryvm.pm b/centreon-plugins/apps/vmware/connector/mode/memoryvm.pm index 3d337967c..8f7841083 100644 --- a/centreon-plugins/apps/vmware/connector/mode/memoryvm.pm +++ b/centreon-plugins/apps/vmware/connector/mode/memoryvm.pm @@ -33,14 +33,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{connection_state} = $options{new_datas}->{$self->{instance} . '_connection_state'}; - $self->{result_values}->{power_state} = $options{new_datas}->{$self->{instance} . '_power_state'}; - return 0; -} - sub custom_usage_perfdata { my ($self, %options) = @_; @@ -157,7 +149,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'connection_state' }, { name => 'power_state' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold diff --git a/centreon-plugins/apps/vmware/connector/mode/servicehost.pm b/centreon-plugins/apps/vmware/connector/mode/servicehost.pm index 64a7559c8..56ec777ff 100644 --- a/centreon-plugins/apps/vmware/connector/mode/servicehost.pm +++ b/centreon-plugins/apps/vmware/connector/mode/servicehost.pm @@ -48,16 +48,6 @@ sub custom_service_output { return $msg; } -sub custom_service_calc { - my ($self, %options) = @_; - - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - $self->{result_values}->{policy} = $options{new_datas}->{$self->{instance} . '_policy'}; - $self->{result_values}->{running} = $options{new_datas}->{$self->{instance} . '_running'}; - $self->{result_values}->{key} = $options{new_datas}->{$self->{instance} . '_key'}; - return 0; -} - sub set_counters { my ($self, %options) = @_; @@ -84,7 +74,6 @@ sub set_counters { $self->{maps_counters}->{service} = [ { label => 'service-status', threshold => 0, set => { key_values => [ { name => 'display' }, { name => 'policy' }, { name => 'running' }, { name => 'key' } ], - closure_custom_calc => $self->can('custom_service_calc'), closure_custom_output => $self->can('custom_service_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/statusvm.pm b/centreon-plugins/apps/vmware/connector/mode/statusvm.pm index 5e48394fa..0f1b1f3ad 100644 --- a/centreon-plugins/apps/vmware/connector/mode/statusvm.pm +++ b/centreon-plugins/apps/vmware/connector/mode/statusvm.pm @@ -33,13 +33,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{connection_state} = $options{new_datas}->{$self->{instance} . '_connection_state'}; - return 0; -} - sub custom_overall_output { my ($self, %options) = @_; @@ -64,7 +57,6 @@ sub set_counters { $self->{maps_counters}->{vm} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'connection_state' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/apps/vmware/connector/mode/swapvm.pm b/centreon-plugins/apps/vmware/connector/mode/swapvm.pm index 84b007cf8..23680dd7f 100644 --- a/centreon-plugins/apps/vmware/connector/mode/swapvm.pm +++ b/centreon-plugins/apps/vmware/connector/mode/swapvm.pm @@ -33,14 +33,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{connection_state} = $options{new_datas}->{$self->{instance} . '_connection_state'}; - $self->{result_values}->{power_state} = $options{new_datas}->{$self->{instance} . '_power_state'}; - return 0; -} - sub set_counters { my ($self, %options) = @_; @@ -51,7 +43,6 @@ sub set_counters { $self->{maps_counters}->{vm} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'connection_state' }, { name => 'power_state' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/os/linux/local/mode/mountpoint.pm b/centreon-plugins/os/linux/local/mode/mountpoint.pm index 4edcd2886..b554db344 100644 --- a/centreon-plugins/os/linux/local/mode/mountpoint.pm +++ b/centreon-plugins/os/linux/local/mode/mountpoint.pm @@ -33,16 +33,6 @@ sub custom_status_output { return "options are '" . $self->{result_values}->{options} . "' [type: " . $self->{result_values}->{type} . "]"; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - $self->{result_values}->{type} = $options{new_datas}->{$self->{instance} . '_type'}; - $self->{result_values}->{options} = $options{new_datas}->{$self->{instance} . '_options'}; - - return 0; -} - sub prefix_output { my ($self, %options) = @_; @@ -59,12 +49,11 @@ sub set_counters { $self->{maps_counters}->{mountpoints} = [ { label => 'status', set => { key_values => [ { name => 'display' }, { name => 'options' }, { name => 'type' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, } - }, + } ]; } diff --git a/centreon-plugins/os/linux/local/mode/packeterrors.pm b/centreon-plugins/os/linux/local/mode/packeterrors.pm index ae36efe81..00a7f08e2 100644 --- a/centreon-plugins/os/linux/local/mode/packeterrors.pm +++ b/centreon-plugins/os/linux/local/mode/packeterrors.pm @@ -34,14 +34,6 @@ sub custom_status_output { return sprintf('status : %s', $self->{result_values}->{status}); } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub custom_packet_output { my ($self, %options) = @_; @@ -78,7 +70,6 @@ sub set_counters { $self->{maps_counters}->{interface} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'status' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/os/linux/local/mode/systemdscstatus.pm b/centreon-plugins/os/linux/local/mode/systemdscstatus.pm index ba0d5fae6..50921f6b7 100644 --- a/centreon-plugins/os/linux/local/mode/systemdscstatus.pm +++ b/centreon-plugins/os/linux/local/mode/systemdscstatus.pm @@ -40,17 +40,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{load} = $options{new_datas}->{$self->{instance} . '_load'}; - $self->{result_values}->{active} = $options{new_datas}->{$self->{instance} . '_active'}; - $self->{result_values}->{sub} = $options{new_datas}->{$self->{instance} . '_sub'}; - $self->{result_values}->{boot} = $options{new_datas}->{$self->{instance} . '_boot'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub set_counters { my ($self, %options) = @_; @@ -100,7 +89,6 @@ sub set_counters { $self->{maps_counters}->{sc} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'load' }, { name => 'active' }, { name => 'sub' }, { name => 'boot' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/os/linux/local/mode/traffic.pm b/centreon-plugins/os/linux/local/mode/traffic.pm index fa75d7eeb..5a103dd7f 100644 --- a/centreon-plugins/os/linux/local/mode/traffic.pm +++ b/centreon-plugins/os/linux/local/mode/traffic.pm @@ -34,14 +34,6 @@ sub custom_status_output { return sprintf('status : %s', $self->{result_values}->{status}); } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub custom_traffic_perfdata { my ($self, %options) = @_; @@ -115,7 +107,6 @@ sub set_counters { $self->{maps_counters}->{interface} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'status' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/hp/storeonce/restapi/mode/clusterusage.pm b/centreon-plugins/storage/hp/storeonce/restapi/mode/clusterusage.pm index 1e430b549..6a2aacfe6 100644 --- a/centreon-plugins/storage/hp/storeonce/restapi/mode/clusterusage.pm +++ b/centreon-plugins/storage/hp/storeonce/restapi/mode/clusterusage.pm @@ -33,14 +33,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{health} = $options{new_datas}->{$self->{instance} . '_health'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub custom_usage_perfdata { my ($self, %options) = @_; @@ -117,7 +109,6 @@ sub set_counters { $self->{maps_counters}->{cluster} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'health' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold diff --git a/centreon-plugins/storage/hp/storeonce/restapi/mode/fcsusage.pm b/centreon-plugins/storage/hp/storeonce/restapi/mode/fcsusage.pm index 95a44d7ec..52a04f41a 100644 --- a/centreon-plugins/storage/hp/storeonce/restapi/mode/fcsusage.pm +++ b/centreon-plugins/storage/hp/storeonce/restapi/mode/fcsusage.pm @@ -33,15 +33,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{health} = $options{new_datas}->{$self->{instance} . '_health'}; - $self->{result_values}->{is_online} = $options{new_datas}->{$self->{instance} . '_is_online'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub set_counters { my ($self, %options) = @_; @@ -52,7 +43,6 @@ sub set_counters { $self->{maps_counters}->{fcs} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'is_online' }, { name => 'health' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/hp/storeonce/restapi/mode/nasusage.pm b/centreon-plugins/storage/hp/storeonce/restapi/mode/nasusage.pm index 943336bf6..29e10195d 100644 --- a/centreon-plugins/storage/hp/storeonce/restapi/mode/nasusage.pm +++ b/centreon-plugins/storage/hp/storeonce/restapi/mode/nasusage.pm @@ -34,15 +34,6 @@ sub custom_nas_status_output { return $msg; } -sub custom_nas_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{health} = $options{new_datas}->{$self->{instance} . '_health'}; - $self->{result_values}->{replication_health} = $options{new_datas}->{$self->{instance} . '_replication_health'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub custom_share_status_output { my ($self, %options) = @_; @@ -50,14 +41,6 @@ sub custom_share_status_output { return $msg; } -sub custom_share_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{health} = $options{new_datas}->{$self->{instance} . '_health'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub set_counters { my ($self, %options) = @_; @@ -69,7 +52,6 @@ sub set_counters { $self->{maps_counters}->{nas} = [ { label => 'nas-status', threshold => 0, set => { key_values => [ { name => 'replication_health' }, { name => 'health' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_nas_status_calc'), closure_custom_output => $self->can('custom_nas_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, @@ -80,7 +62,6 @@ sub set_counters { $self->{maps_counters}->{share} = [ { label => 'share-status', threshold => 0, set => { key_values => [ { name => 'health' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_share_status_calc'), closure_custom_output => $self->can('custom_share_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/hp/storeonce/restapi/mode/servicesetusage.pm b/centreon-plugins/storage/hp/storeonce/restapi/mode/servicesetusage.pm index bafc14c03..805332e51 100644 --- a/centreon-plugins/storage/hp/storeonce/restapi/mode/servicesetusage.pm +++ b/centreon-plugins/storage/hp/storeonce/restapi/mode/servicesetusage.pm @@ -34,16 +34,6 @@ sub custom_status_output { return $msg; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{health} = $options{new_datas}->{$self->{instance} . '_health'}; - $self->{result_values}->{housekeeping_health} = $options{new_datas}->{$self->{instance} . '_housekeeping_health'}; - $self->{result_values}->{replication_health} = $options{new_datas}->{$self->{instance} . '_replication_health'}; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - return 0; -} - sub custom_usage_perfdata { my ($self, %options) = @_; @@ -120,7 +110,6 @@ sub set_counters { $self->{maps_counters}->{scs} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'health' }, { name => 'replication_health' }, { name => 'housekeeping_health' }, { name => 'display' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/quantum/dxi/ssh/mode/compaction.pm b/centreon-plugins/storage/quantum/dxi/ssh/mode/compaction.pm index 74d6fa07e..0eee28be1 100644 --- a/centreon-plugins/storage/quantum/dxi/ssh/mode/compaction.pm +++ b/centreon-plugins/storage/quantum/dxi/ssh/mode/compaction.pm @@ -32,13 +32,6 @@ sub custom_status_output { return 'Compaction status: ' . $self->{result_values}->{compaction_status}; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{compaction_status} = $options{new_datas}->{$self->{instance} . '_compaction_status'}; - return 0; -} - sub custom_volume_perfdata { my ($self, %options) = @_; @@ -86,7 +79,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'compaction_status' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/quantum/dxi/ssh/mode/health.pm b/centreon-plugins/storage/quantum/dxi/ssh/mode/health.pm index 7f63cab4a..1fc8afcfe 100644 --- a/centreon-plugins/storage/quantum/dxi/ssh/mode/health.pm +++ b/centreon-plugins/storage/quantum/dxi/ssh/mode/health.pm @@ -32,15 +32,6 @@ sub custom_status_output { return "status is '" . $self->{result_values}->{status} . "' [state = " . $self->{result_values}->{state} . "]"; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{state} = $options{new_datas}->{$self->{instance} . '_state'}; - $self->{result_values}->{name} = $options{new_datas}->{$self->{instance} . '_name'}; - return 0; -} - sub prefix_output { my ($self, %options) = @_; @@ -57,7 +48,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', set => { key_values => [ { name => 'status' }, { name => 'state' }, { name => 'name' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/quantum/dxi/ssh/mode/hostbusadapterstatus.pm b/centreon-plugins/storage/quantum/dxi/ssh/mode/hostbusadapterstatus.pm index e7b7b3861..2dc597611 100644 --- a/centreon-plugins/storage/quantum/dxi/ssh/mode/hostbusadapterstatus.pm +++ b/centreon-plugins/storage/quantum/dxi/ssh/mode/hostbusadapterstatus.pm @@ -32,14 +32,6 @@ sub custom_status_output { return "status is '" . $self->{result_values}->{status} . "'"; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{name} = $options{new_datas}->{$self->{instance} . '_name'}; - return 0; -} - sub prefix_output { my ($self, %options) = @_; @@ -56,7 +48,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', set => { key_values => [ { name => 'status' }, { name => 'name' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/quantum/dxi/ssh/mode/network.pm b/centreon-plugins/storage/quantum/dxi/ssh/mode/network.pm index 765a255ee..859c8af8e 100644 --- a/centreon-plugins/storage/quantum/dxi/ssh/mode/network.pm +++ b/centreon-plugins/storage/quantum/dxi/ssh/mode/network.pm @@ -32,15 +32,6 @@ sub custom_status_output { return "status is '" . $self->{result_values}->{status} . "' [value = " . $self->{result_values}->{value} . "]"; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{name} = $options{new_datas}->{$self->{instance} . '_name'}; - $self->{result_values}->{value} = $options{new_datas}->{$self->{instance} . '_value'}; - return 0; -} - sub prefix_output { my ($self, %options) = @_; @@ -57,7 +48,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', set => { key_values => [ { name => 'status' }, { name => 'name' }, { name => 'value' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/quantum/dxi/ssh/mode/reclamation.pm b/centreon-plugins/storage/quantum/dxi/ssh/mode/reclamation.pm index 28213b5a1..178d41df7 100644 --- a/centreon-plugins/storage/quantum/dxi/ssh/mode/reclamation.pm +++ b/centreon-plugins/storage/quantum/dxi/ssh/mode/reclamation.pm @@ -32,13 +32,6 @@ sub custom_status_output { return 'Reclamation status: ' . $self->{result_values}->{reclamation_status}; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{reclamation_status} = $options{new_datas}->{$self->{instance} . '_reclamation_status'}; - return 0; -} - sub custom_volume_perfdata { my ($self, %options) = @_; @@ -87,7 +80,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'reclamation_status' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/quantum/dxi/ssh/mode/storagearraystatus.pm b/centreon-plugins/storage/quantum/dxi/ssh/mode/storagearraystatus.pm index b205d5435..466e59d4e 100644 --- a/centreon-plugins/storage/quantum/dxi/ssh/mode/storagearraystatus.pm +++ b/centreon-plugins/storage/quantum/dxi/ssh/mode/storagearraystatus.pm @@ -32,14 +32,6 @@ sub custom_status_output { return "status is '" . $self->{result_values}->{status} . "'"; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{name} = $options{new_datas}->{$self->{instance} . '_name'}; - return 0; -} - sub prefix_output { my ($self, %options) = @_; @@ -56,7 +48,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', set => { key_values => [ { name => 'status' }, { name => 'name' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, diff --git a/centreon-plugins/storage/quantum/dxi/ssh/mode/systemstatus.pm b/centreon-plugins/storage/quantum/dxi/ssh/mode/systemstatus.pm index 94c35fc4f..fb819b115 100644 --- a/centreon-plugins/storage/quantum/dxi/ssh/mode/systemstatus.pm +++ b/centreon-plugins/storage/quantum/dxi/ssh/mode/systemstatus.pm @@ -32,16 +32,6 @@ sub custom_status_output { return "status is '" . $self->{result_values}->{status} . "' [type = " . $self->{result_values}->{type} . "] [value = " . $self->{result_values}->{value} . "]"; } -sub custom_status_calc { - my ($self, %options) = @_; - - $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; - $self->{result_values}->{name} = $options{new_datas}->{$self->{instance} . '_name'}; - $self->{result_values}->{type} = $options{new_datas}->{$self->{instance} . '_type'}; - $self->{result_values}->{value} = $options{new_datas}->{$self->{instance} . '_value'}; - return 0; -} - sub prefix_output { my ($self, %options) = @_; @@ -58,7 +48,6 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'status', set => { key_values => [ { name => 'status' }, { name => 'name' }, { name => 'type' }, { name => 'value' } ], - closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold,