From f575c72cf0aabdc56e9cbc599df7774db707b1f3 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 5 Jun 2018 14:29:48 +0100 Subject: [PATCH] Use hostname rather than ip when collecting mysql stats This comes through into the field metricset.host and some visualisations and dashboards use metricset.host to differentiate individual hosts. Change-Id: I855b151f38865978351a32f0b5e011b4834ccfa5 --- elk_metrics_6x/templates/metricbeat.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elk_metrics_6x/templates/metricbeat.yml.j2 b/elk_metrics_6x/templates/metricbeat.yml.j2 index 2055fe16..94f3ff52 100644 --- a/elk_metrics_6x/templates/metricbeat.yml.j2 +++ b/elk_metrics_6x/templates/metricbeat.yml.j2 @@ -351,7 +351,7 @@ metricbeat.modules: # # Host DSN should be defined as "user:pass@tcp(127.0.0.1:3306)/" # # The username and password can either be set in the DSN or using the username # # and password config options. Those specified in the DSN take precedence. - hosts: ["{{ galera_root_user }}:{{ galera_root_password }}@tcp(127.0.0.1:3306)/"] + hosts: ["{{ galera_root_user }}:{{ galera_root_password }}@tcp({{ ansible_hostname }}:3306)/"] # # # Username of hosts. Empty by default. username: {{ galera_root_user }}