mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
add cluster name in output
This commit is contained in:
parent
34c7d0af4a
commit
eff71aa530
@ -100,13 +100,13 @@ sub run {
|
|||||||
my $exit;
|
my $exit;
|
||||||
if ($webcontent->{status} eq 'green') {
|
if ($webcontent->{status} eq 'green') {
|
||||||
$self->{output}->output_add(severity => 'OK',
|
$self->{output}->output_add(severity => 'OK',
|
||||||
short_msg => sprintf("All shard are allocated"));
|
short_msg => sprintf("Cluster %s : All shard are allocated", $webcontent->{cluster_name}));
|
||||||
} elsif ($webcontent->{status} eq 'yellow') {
|
} elsif ($webcontent->{status} eq 'yellow') {
|
||||||
$self->{output}->output_add(severity => 'WARNING',
|
$self->{output}->output_add(severity => 'WARNING',
|
||||||
short_msg => sprintf("Primary shards are allocated but replicas not"));
|
short_msg => sprintf("Cluster %s : Primary shards are allocated but replicas not", $webcontent->{cluster_name}));
|
||||||
} elsif ($webcontent->{status} eq 'red') {
|
} elsif ($webcontent->{status} eq 'red') {
|
||||||
$self->{output}->output_add(severity => 'CRITICAL',
|
$self->{output}->output_add(severity => 'CRITICAL',
|
||||||
short_msg => sprintf("Some or all primary shards aren't ready"));
|
short_msg => sprintf("Cluster %s : Some or all primary shards aren't ready", $webcontent->{cluster_name}));
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => 'primary_shard',
|
$self->{output}->perfdata_add(label => 'primary_shard',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user