Closed YLombardi closed 8 years ago
I found a solution.
In my configuration I add :
HashMap<String, Object> additionnalFields = new HashMap<>();
additionnalFields.put("host", InetAddress.getLocalHost().getHostName());
ElasticsearchReporter.additionalFields(additionnalFields);
Hi.
I plan to use ElasticsearchReporter on multiple servers. Is it possible to add a field "host" in the json to know which server send which metrics ?
Currently it send this :
I want to add "host": serverName in the "_source" part of the json.