public class ElasticReporterConfig extends Object
| Constructor and Description |
|---|
ElasticReporterConfig() |
| Modifier and Type | Method and Description |
|---|---|
ElasticReporterConfig |
addTag(String key,
String value)
Add a name value pair to include in each metric entry.
|
String |
getIndexPrefix()
Return the index name prefix (defaults to "metric-").
|
String |
getIndexType()
Return the index type (defaults to "metric").
|
String |
getNameField()
Return the name of the field that holds the metric name (defaults to "name").
|
Map<String,String> |
getTags()
Return all the tags.
|
String |
getTemplateName()
Return the name of the elastic template (defaults to "metric-1").
|
String |
getTimestampField()
Return the name of the timestamp field (defaults to "ts").
|
String |
getTypeField()
Return the name of the metric type field (defaults to "type").
|
String |
getUrl()
Return the base url for the ElasticSearch instance.
|
ElasticReporterConfig |
setIndexPrefix(String indexPrefix)
Set the index name prefix (defaults to "metric-").
|
ElasticReporterConfig |
setIndexType(String indexType)
Set the index type.
|
ElasticReporterConfig |
setNameField(String nameField)
Set the name of the field that holds the metric name.
|
ElasticReporterConfig |
setTags(Map<String,String> tags) |
void |
setTemplateName(String templateName)
Set the name of the Elastic template.
|
ElasticReporterConfig |
setTimestampField(String timestampField)
Set the name of the timestamp field.
|
ElasticReporterConfig |
setTypeField(String typeField)
Set the name of the metric type field (defaults to "type").
|
ElasticReporterConfig |
setUrl(String url)
Set the base url for the ElasticSearch instance.
|
public ElasticReporterConfig()
public ElasticReporterConfig setUrl(String url)
public String getIndexType()
public ElasticReporterConfig setIndexType(String indexType)
public String getIndexPrefix()
public ElasticReporterConfig setIndexPrefix(String indexPrefix)
public ElasticReporterConfig addTag(String key, String value)
public ElasticReporterConfig setTags(Map<String,String> tags)
public String getTimestampField()
public ElasticReporterConfig setTimestampField(String timestampField)
public String getTypeField()
public ElasticReporterConfig setTypeField(String typeField)
public String getNameField()
public ElasticReporterConfig setNameField(String nameField)
public String getTemplateName()
public void setTemplateName(String templateName)
Set this to null means the template will not be checked and set on startup.
When changing this value you may want to add a template as a resource under the elastic-template path such that it is checked and set if it does not exist in ElasticSearch.
Copyright © 2016. All rights reserved.