public class ESStatisticsPublisher extends Object implements XStatisticsPublisher
XStatisticsPublisher.CustomMetricsField, XStatisticsPublisher.CustomMetricsFieldType
Constructor and Description |
---|
ESStatisticsPublisher(ESStatisticsServer esStatisticsServer) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
generateRecords(ConcurrentLinkedQueue<MetricsTemplate> completedMetricsTemplates)
Generate metrics records for the provided metrics templates and publishes them to the external collector.
|
void |
init(String confDir,
String nodeName,
String spaceName) |
void |
publish(Map<String,Object> contentMap)
Publishes a map of contents to the external metrics collector.
|
<T> void |
publish(T content,
Class<T> clz)
Publishes an object containing the metrics to the external metrics collector.
|
void |
setActiveIndexAliasName(String activeIndexAliasName) |
void |
setBackOffExponentialRetryAttempts(int backOffExponentialRetryAttempts) |
void |
setBackOffExponentialTimeInMillis(int backOffExponentialTimeInMillis) |
void |
setBulkActions(int bulkActions) |
void |
setBulkSizeInMB(int bulkSizeInMB) |
void |
setConcurrentRequests(int concurrentRequests) |
void |
setCustomFields(Map<String,String> customFields)
Defines the custom fields to be added for the published records.
|
void |
setDeleteInactiveIndicesAtDestroy(boolean deleteInactiveIndicesAtDestroy) |
void |
setDeleteInactiveIndicesAtInit(boolean deleteInactiveIndicesAtInit) |
void |
setDeleteOldestIndexAfterRollOver(boolean deleteOldestIndexAfterRollOver) |
void |
setEsHealthTimeoutMillis(int esHealthTimeoutMillis) |
void |
setFlushIntervalInSeconds(int flushIntervalInSeconds) |
void |
setInactiveIndexAliasName(String inactiveIndexAliasName) |
void |
setInactiveSettingFile(String inactiveSettingFile) |
void |
setIndexMappingType(String indexMappingType) |
void |
setIndexRollOverEnabled(boolean indexRollOverEnabled) |
void |
setIndexTemplateName(String indexTemplateName) |
void |
setInitialIndexName(String initialIndexName) |
void |
setMaxAgeInMinutes(long maxAgeInMinutes) |
void |
setMaxDocs(long maxDocs) |
void |
setOptimized(boolean optimized) |
void |
setRollOverTimePeriodInMinutes(long rollOverTimePeriodInMinutes) |
void |
setTemplateFile(String templateFile) |
public ESStatisticsPublisher(ESStatisticsServer esStatisticsServer)
public void init(String confDir, String nodeName, String spaceName)
init
in interface XStatisticsPublisher
public void destroy()
destroy
in interface XStatisticsPublisher
public void publish(Map<String,Object> contentMap)
publish
in interface XStatisticsPublisher
contentMap
- key-value pairs of metrics recordspublic <T> void publish(T content, Class<T> clz)
XStatisticsPublisher
publish
in interface XStatisticsPublisher
T
- type of the published objectcontent
- object containing the metricsclz
- class of the published objectpublic void setBulkActions(int bulkActions)
public void setBulkSizeInMB(int bulkSizeInMB)
public void setFlushIntervalInSeconds(int flushIntervalInSeconds)
public void setConcurrentRequests(int concurrentRequests)
public void setBackOffExponentialTimeInMillis(int backOffExponentialTimeInMillis)
public void setBackOffExponentialRetryAttempts(int backOffExponentialRetryAttempts)
public void setEsHealthTimeoutMillis(int esHealthTimeoutMillis)
public void setOptimized(boolean optimized)
public void setInitialIndexName(String initialIndexName)
public void setIndexMappingType(String indexMappingType)
public void setIndexTemplateName(String indexTemplateName)
public void setActiveIndexAliasName(String activeIndexAliasName)
public void setInactiveIndexAliasName(String inactiveIndexAliasName)
public void setMaxDocs(long maxDocs)
public void setMaxAgeInMinutes(long maxAgeInMinutes)
public void setRollOverTimePeriodInMinutes(long rollOverTimePeriodInMinutes)
public void setIndexRollOverEnabled(boolean indexRollOverEnabled)
public void setTemplateFile(String templateFile)
public void setInactiveSettingFile(String inactiveSettingFile)
public void setDeleteOldestIndexAfterRollOver(boolean deleteOldestIndexAfterRollOver)
public void setDeleteInactiveIndicesAtInit(boolean deleteInactiveIndicesAtInit)
public void setDeleteInactiveIndicesAtDestroy(boolean deleteInactiveIndicesAtDestroy)
public void setCustomFields(Map<String,String> customFields)
XStatisticsPublisher
These field values should be defined according to the following format.
Value type | Format |
---|---|
A constant | CONSTANT_VALUE |
An environment variable | env:ENV_VAR_NAME |
A system property | sys:SYS_PROP_KEY |
setCustomFields
in interface XStatisticsPublisher
customFields
- custom fields as key-value pairspublic void generateRecords(ConcurrentLinkedQueue<MetricsTemplate> completedMetricsTemplates)
XStatisticsPublisher
generateRecords
in interface XStatisticsPublisher
completedMetricsTemplates
- the completed MetricsTemplate
sCopyright © 2016–2019 AdroitLogic. All rights reserved.