fix issues with OK state and change output

This commit is contained in:
Shini31 2015-07-17 12:11:11 +02:00
parent a1467cf77c
commit 74b8102732
1 changed files with 6 additions and 4 deletions

View File

@ -62,7 +62,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
$self->{version} = '1.1';
$options{options}->add_options(arguments =>
{
"hostname:s" => { name => 'hostname' },
@ -166,10 +166,12 @@ sub run {
}
}
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("One or some indices are in %s state", $map_states_indices{$exit}));
if ($exit ne 'OK') {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Some indices are in wrong state"));
}
$self->{output}->display(force_long_output => 1);
$self->{output}->display();
$self->{output}->exit();
}