
public class ElasticsearchMonitoringExporterClientImpl extends Object implements ElasticsearchMonitoringExporterClient
| Modifier and Type | Field and Description |
|---|---|
protected org.elasticsearch.client.RestClientBuilder |
builder |
protected co.elastic.clients.elasticsearch.ElasticsearchClient |
client |
protected String |
index |
protected co.elastic.clients.transport.ElasticsearchTransport |
transport |
| Constructor and Description |
|---|
ElasticsearchMonitoringExporterClientImpl(String username,
String pwd,
String token,
String apiKey,
String prefix,
String index,
boolean compression,
org.apache.http.HttpHost... httpHosts)
Note that only one among (username/pwd, token, apikey) is allowed and
will be taken into account.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
createClient() |
boolean |
post(com.fasterxml.jackson.databind.node.ObjectNode monitoredTransfers,
org.joda.time.DateTime start,
org.joda.time.DateTime stop,
String serverId)
Will use a "bulk" request to upsert data into ElasticSearch
|
protected final String index
protected final org.elasticsearch.client.RestClientBuilder builder
protected co.elastic.clients.transport.ElasticsearchTransport transport
protected co.elastic.clients.elasticsearch.ElasticsearchClient client
public ElasticsearchMonitoringExporterClientImpl(String username, String pwd, String token, String apiKey, String prefix, String index, boolean compression, org.apache.http.HttpHost... httpHosts)
username - username to connect to Elasticsearch if any (Basic
authentication) (nullable)pwd - password to connect to Elasticsearch if any (Basic
authentication) (nullable)token - access token (Bearer Token authorization
by Header) (nullable)apiKey - API Key (Base64 of 'apiId:apiKey') (ApiKey authorization
by Header) (nullable)prefix - as '/prefix' or null if noneindex - as 'waarpr66monitor' as the index name within
Elasticsearch, including extra dynamic informationcompression - True to compress REST exchanges between the client
and the Elasticsearch serverhttpHosts - array of HttpHostprotected void createClient()
public final boolean post(com.fasterxml.jackson.databind.node.ObjectNode monitoredTransfers,
org.joda.time.DateTime start,
org.joda.time.DateTime stop,
String serverId)
ElasticsearchMonitoringExporterClientpost in interface ElasticsearchMonitoringExporterClientmonitoredTransfers - the Json objet to push as POSTstart - the DateTime for the 'from' intervalstop - the DateTime for the 'to' intervalserverId - the serverId that is sending this monitoring informationpublic final void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2009–2022 Waarp. All rights reserved.