mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
added routing_format=full to default toXContent params
This commit is contained in:
parent
608d295086
commit
41f03b6461
1 changed files with 7 additions and 7 deletions
|
@ -76,7 +76,7 @@ public class ESExporter extends AbstractLifecycleComponent<ESExporter> implement
|
|||
timeout = (int) settings.getAsTime("timeout", new TimeValue(6000)).seconds();
|
||||
|
||||
xContentParams = new ToXContent.MapParams(
|
||||
ImmutableMap.of("load_average_format", "hash"));
|
||||
ImmutableMap.of("load_average_format", "hash", "routing_format", "full"));
|
||||
|
||||
|
||||
logger.info("ESExporter initialized. Targets: {}, index prefix [{}], index time format [{}]", hosts, indexPrefix, indexTimeFormat);
|
||||
|
@ -112,15 +112,15 @@ public class ESExporter extends AbstractLifecycleComponent<ESExporter> implement
|
|||
;
|
||||
}
|
||||
|
||||
logger.debug("Exporting {}", type);
|
||||
logger.debug("exporting {}", type);
|
||||
HttpURLConnection conn = openConnection("POST", "/_bulk", XContentType.SMILE.restContentType());
|
||||
if (conn == null) {
|
||||
logger.error("Could not connect to any configured elasticsearch instances: [{}]", hosts);
|
||||
logger.error("could not connect to any configured elasticsearch instances: [{}]", hosts);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
OutputStream os = conn.getOutputStream();
|
||||
// TODO: find a way to disable builder's substream flushing.
|
||||
// TODO: find a way to disable builder's substream flushing or something neat solution
|
||||
for (ToXContent xContent : xContentArray) {
|
||||
XContentBuilder builder = XContentFactory.smileBuilder(os);
|
||||
builder.startObject().startObject("index")
|
||||
|
@ -148,7 +148,7 @@ public class ESExporter extends AbstractLifecycleComponent<ESExporter> implement
|
|||
|
||||
|
||||
} catch (IOException e) {
|
||||
logger.error("Error connecting to target", e);
|
||||
logger.error("error sending data", e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ public class ESExporter extends AbstractLifecycleComponent<ESExporter> implement
|
|||
|
||||
return conn;
|
||||
} catch (IOException e) {
|
||||
logger.error("error connecting to [{}]: {}", host, e);
|
||||
logger.error("error connecting to [{}]", e, host);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ public class ESExporter extends AbstractLifecycleComponent<ESExporter> implement
|
|||
}
|
||||
checkedForIndexTemplate = true;
|
||||
} catch (IOException e) {
|
||||
logger.error("Error when checking/adding metrics template to elasticsearch", e);
|
||||
logger.error("error when checking/adding template to elasticsearch", e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue