public class InfluxDbReporterFactory
extends io.dropwizard.metrics.BaseReporterFactory
InfluxDbReporter instances.
Configuration Parameters:
| Name | Default | Description |
| protocol | http | The protocol (http or https) of the InfluxDb server to report to. |
| host | localhost | The hostname of the InfluxDb server to report to. |
| port | 8086 | The port of the InfluxDb server to report to. |
| prefix | None | The prefix for Metric key names (measurement) to report to InfluxDb. |
| tags | None | tags for all metrics reported to InfluxDb. |
| fields | timers = p50, p99, m1_rate meters = m1_rate |
fields by metric type to reported to InfluxDb. |
| database | None | The database that metrics will be reported to InfluxDb. |
| precision | 1m | The precision of timestamps. Does not take into account the quantity, so for example `5m` will be minute precision |
| connectTimeout | 1500 | The connect timeout in milliseconds for connecting to InfluxDb. |
| readTimeout | 1500 | The read timeout in milliseconds for reading from InfluxDb. |
| auth | None | An auth string of format username:password to authenticate with when reporting to InfluxDb. |
| groupGauges | None | A boolean to signal whether to group gauges when reporting to InfluxDb. |
| measurementMappings | None | A map for measurement mappings to be added, overridden or removed from the defaultMeasurementMappings. |
| defaultMeasurementMappings |
health = .*\.health(\..*)? auth = .*\.auth\..* dao = *\.(jdbi|dao)\..* resources = *\.resources?\..* datasources = io\.dropwizard\.db\.ManagedPooledDataSource.* clients = org\.apache\.http\.client\.HttpClient.* client_connections = org\.apache\.http\.conn\.HttpClientConnectionManager.* connections = org\.eclipse\.jetty\.server\.HttpConnectionFactory.* thread_pools = org\.eclipse\.jetty\.util\.thread\.QueuedThreadPool.* logs = ch\.qos\.logback\.core\.Appender.* http_server = io\.dropwizard\.jetty\.MutableServletContextHandler.* raw_sql = org\.skife\.jdbi\.v2\.DBI\.raw-sql jvm = ^jvm$ jvm_attribute = jvm\.attribute.*? jvm_buffers = jvm\.buffers\..* jvm_classloader = jvm\.classloader.* jvm_gc = jvm\.gc\..* jvm_memory = jvm\.memory\..* jvm_threads = jvm\.threads.* event_handlers = .*Handler.* |
A map with default measurement mappings. |
| excludes | defaultExcludes | A set of pre-calculated metrics like usage and percentage, and unchanging JVM metrics to exclude by default |
| Constructor and Description |
|---|
InfluxDbReporterFactory() |
| Modifier and Type | Method and Description |
|---|---|
com.codahale.metrics.ScheduledReporter |
build(com.codahale.metrics.MetricRegistry registry) |
protected InfluxDbReporter.Builder |
builder(com.codahale.metrics.MetricRegistry registry) |
protected Map<String,String> |
buildMeasurementMappings() |
String |
getAuth() |
int |
getConnectTimeout() |
String |
getDatabase() |
Map<String,String> |
getDefaultMeasurementMappings() |
com.google.common.collect.ImmutableSet<String> |
getExcludes() |
com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>> |
getFields() |
boolean |
getGroupGauges() |
String |
getHost() |
Map<String,String> |
getMeasurementMappings() |
int |
getPort() |
io.dropwizard.util.Duration |
getPrecision() |
String |
getPrefix() |
String |
getProtocol() |
int |
getReadTimeout() |
SenderType |
getSenderType() |
boolean |
isMeasurementMappingRegularExpressions() |
void |
setAuth(String auth) |
void |
setConnectTimeout(int connectTimeout) |
void |
setDatabase(String database) |
void |
setDefaultMeasurementMappings(com.google.common.collect.ImmutableMap<String,String> defaultMeasurementMappings) |
void |
setExcludes(com.google.common.collect.ImmutableSet<String> excludes) |
void |
setFields(com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>> fields) |
void |
setGroupGauges(boolean groupGauges) |
void |
setHost(String host) |
void |
setMeasurementMappings(com.google.common.collect.ImmutableMap<String,String> measurementMappings) |
void |
setPort(int port) |
void |
setPrecision(io.dropwizard.util.Duration precision) |
void |
setPrefix(String prefix) |
void |
setProtocol(String protocol) |
void |
setReadTimeout(int readTimeout) |
void |
setSenderType(SenderType senderType) |
void |
setTags(Map<String,String> tags) |
public String getProtocol()
public void setProtocol(String protocol)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public String getPrefix()
public void setPrefix(String prefix)
public com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>> getFields()
public void setFields(com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>> fields)
public String getDatabase()
public void setDatabase(String database)
public String getAuth()
public void setAuth(String auth)
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public int getReadTimeout()
public void setReadTimeout(int readTimeout)
public boolean getGroupGauges()
public void setGroupGauges(boolean groupGauges)
public io.dropwizard.util.Duration getPrecision()
public void setPrecision(io.dropwizard.util.Duration precision)
public void setMeasurementMappings(com.google.common.collect.ImmutableMap<String,String> measurementMappings)
public com.google.common.collect.ImmutableSet<String> getExcludes()
getExcludes in class io.dropwizard.metrics.BaseReporterFactorypublic void setExcludes(com.google.common.collect.ImmutableSet<String> excludes)
setExcludes in class io.dropwizard.metrics.BaseReporterFactorypublic void setDefaultMeasurementMappings(com.google.common.collect.ImmutableMap<String,String> defaultMeasurementMappings)
public void setSenderType(SenderType senderType)
public SenderType getSenderType()
public com.codahale.metrics.ScheduledReporter build(com.codahale.metrics.MetricRegistry registry)
@ValidationMethod(message="measurementMappings must be regular expressions") public boolean isMeasurementMappingRegularExpressions()
protected InfluxDbReporter.Builder builder(com.codahale.metrics.MetricRegistry registry)
Copyright © 2016 iZettle AB. All rights reserved.