add option in mode to force new perfdata
This commit is contained in:
parent
dec0e1b191
commit
af8afec1b9
|
@ -33,6 +33,8 @@ sub new {
|
||||||
|
|
||||||
%{$self->{option_results}} = ();
|
%{$self->{option_results}} = ();
|
||||||
$self->{output} = $options{output};
|
$self->{output} = $options{output};
|
||||||
|
$self->{output}->use_new_perfdata(value => 1)
|
||||||
|
if (defined($options{force_new_perfdata}) && $options{force_new_perfdata} == 1);
|
||||||
$self->{mode} = $options{mode};
|
$self->{mode} = $options{mode};
|
||||||
$self->{version} = undef;
|
$self->{version} = undef;
|
||||||
|
|
||||||
|
|
|
@ -815,8 +815,10 @@ sub is_debug {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub use_new_perfdata {
|
sub use_new_perfdata {
|
||||||
my ($self) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
$self->{option_results}->{use_new_perfdata} = $options{value}
|
||||||
|
if (defined($options{value}));
|
||||||
if (defined($self->{option_results}->{use_new_perfdata})) {
|
if (defined($self->{option_results}->{use_new_perfdata})) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue