enh(azure/management): force perfdata even if only one backupitem (#3397)
This commit is contained in:
parent
19de10b19f
commit
34697b1655
|
@ -61,7 +61,7 @@ sub set_counters {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
{ name => 'global', type => 0, cb_prefix_output => 'prefix_global_output', cb_init => 'skip_global' },
|
||||
{ name => 'global', type => 0, cb_prefix_output => 'prefix_global_output' },
|
||||
{ name => 'items', type => 1, cb_prefix_output => 'prefix_item_output', message_multiple => 'All items are ok' }
|
||||
];
|
||||
|
||||
|
@ -96,12 +96,6 @@ sub set_counters {
|
|||
];
|
||||
}
|
||||
|
||||
sub skip_global {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
scalar(keys %{$self->{items}}) == 1 ? return(1) : return(0);
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
|
@ -161,7 +155,7 @@ sub manage_selection {
|
|||
};
|
||||
|
||||
$self->{global}->{ lc($item->{properties}->{lastBackupStatus}) }++
|
||||
if (defined($item->{properties}->{lastBackupStatus}) && defined($self->{global}->{ lc($item->{properties}->{lastBackupStatus}) }));
|
||||
if (defined($item->{properties}->{lastBackupStatus}) && defined($self->{global}->{ lc($item->{properties}->{lastBackupStatus}) }));
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{items}}) <= 0) {
|
||||
|
|
Loading…
Reference in New Issue