From 415bffb5116b40989d28ab00eab3e8932f5b5cc8 Mon Sep 17 00:00:00 2001 From: Mathieu Cinquin Date: Tue, 14 Apr 2015 18:23:07 +0200 Subject: [PATCH] Refs #6339 - add cluster name in output --- apps/elasticsearch/mode/cluster.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/elasticsearch/mode/cluster.pm b/apps/elasticsearch/mode/cluster.pm index da43e7027..3806836bb 100644 --- a/apps/elasticsearch/mode/cluster.pm +++ b/apps/elasticsearch/mode/cluster.pm @@ -100,13 +100,13 @@ sub run { my $exit; if ($webcontent->{status} eq 'green') { $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') { $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') { $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',