remove some status callback

This commit is contained in:
garnier-quentin 2020-05-13 14:38:32 +02:00
parent db74d39b76
commit 6086f35480
31 changed files with 32 additions and 287 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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) = @_;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,
}
},
}
];
}

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,