diff --git a/checks.d/elastic.py b/checks.d/elastic.py index e9f3225a50..7bb8d3baa4 100644 --- a/checks.d/elastic.py +++ b/checks.d/elastic.py @@ -410,7 +410,6 @@ def check(self, instance): # retreive the cluster name from the data, and append it to the # master tag list. config.tags.append("cluster_name:{}".format(stats_data['cluster_name'])) - config.service_check_tags.append("cluster_name:{}".format(stats_data['cluster_name'])) self._process_stats_data(nodes_url, stats_data, stats_metrics, config) # Load clusterwise data diff --git a/tests/checks/integration/test_elastic.py b/tests/checks/integration/test_elastic.py index a31818d362..19ed7af515 100644 --- a/tests/checks/integration/test_elastic.py +++ b/tests/checks/integration/test_elastic.py @@ -411,7 +411,7 @@ def test_check(self): self.assertMetric( m_name, tags=m_tags, count=1, hostname=hostname) - good_sc_tags = ['host:localhost', 'port:{0}'.format(port)] + cluster_tag + good_sc_tags = ['host:localhost', 'port:{0}'.format(port)] bad_sc_tags = ['host:localhost', 'port:{0}'.format(bad_port)] self.assertServiceCheckOK('elasticsearch.can_connect',