Fix #1690
This commit is contained in:
parent
95dee17efa
commit
3c6580281a
|
@ -90,13 +90,13 @@ sub new {
|
|||
bless $self, $class;
|
||||
|
||||
$options{options}->add_options(arguments => {
|
||||
"query:s@" => { name => 'query' },
|
||||
"instance:s" => { name => 'instance' },
|
||||
"aggregation:s" => { name => 'aggregation', default => 'average' },
|
||||
"output:s" => { name => 'output' },
|
||||
"multiple-output:s" => { name => 'multiple_output' },
|
||||
"warning-status:s" => { name => 'warning_status', default => '' },
|
||||
"critical-status:s" => { name => 'critical_status', default => '' },
|
||||
'query:s@' => { name => 'query' },
|
||||
'instance:s' => { name => 'instance' },
|
||||
'aggregation:s' => { name => 'aggregation', default => 'average' },
|
||||
'output:s' => { name => 'output' },
|
||||
'multiple-output:s' => { name => 'multiple_output' },
|
||||
'warning-status:s' => { name => 'warning_status', default => '' },
|
||||
'critical-status:s' => { name => 'critical_status', default => '' },
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
@ -153,11 +153,11 @@ sub manage_selection {
|
|||
$value = $options{custom}->compute(aggregation => $self->{option_results}->{aggregation}, values => $result->{values}) if (defined($result->{values}));
|
||||
|
||||
$self->{queries_results}->{$result->{tags}->{$self->{option_results}->{instance}}}->{instance} = $result->{tags}->{$self->{option_results}->{instance}};
|
||||
$self->{queries_results}->{$result->{tags}->{$self->{option_results}->{instance}}}->{$result->{columns}[1]} = $value;
|
||||
$self->{queries_results}->{$result->{tags}->{$self->{option_results}->{instance}}}->{$result->{columns}[1]} = defined($value) ? $value : '';
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{queries_results}}) <= 0) {
|
||||
$self->{output}->add_option_msg(short_msg => "No queries found.");
|
||||
$self->{output}->add_option_msg(short_msg => 'No queries found.');
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue