Package org.jmxtrans.embedded.output
Class StatsDWriter
java.lang.Object
org.jmxtrans.embedded.output.AbstractOutputWriter
org.jmxtrans.embedded.output.StatsDWriter
- All Implemented Interfaces:
OutputWriter
public class StatsDWriter extends AbstractOutputWriter implements OutputWriter
OutputWriter for [StatsD](https://github.com/etsy/statsd).
- Since:
- 1.0.15
- Author:
- Fabiano Vicente, Cyrille Le Clerc
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_NAME_PREFIXstatic StringSETTING_BUFFER_SIZEFields inherited from class org.jmxtrans.embedded.output.AbstractOutputWriter
logger, SETTING_HOST, SETTING_NAME_PREFIX, SETTING_PORT, SETTING_PROTOCOL, SETTING_PROXY_HOST, SETTING_PROXY_PORT, SETTING_SOCKET_FACTORY, SETTING_TLS_INSECURE, SETTING_TLS_KEY_STORE, SETTING_TLS_KEY_STORE_PASSWORD, SETTING_TLS_TRUST_STORE, SETTING_TLS_TRUST_STORE_PASSWORD, SETTING_TOKEN, SETTING_URL, SETTING_USE_TLS, SETTING_USERNAME -
Constructor Summary
Constructors Constructor Description StatsDWriter() -
Method Summary
Modifier and Type Method Description voidflush()protected chargetStatsdMetricType(QueryResult result)See StatsD Metric Types.protected voidnotifyDataTooBig(String stat, byte[] data)voidsetChannel(DatagramChannel channel)voidstart()No-op implementationvoidstop()No-op implementationStringtoString()voidwrite(Iterable<QueryResult> results)Write all the given QueryResult to the target system.Methods inherited from class org.jmxtrans.embedded.output.AbstractOutputWriter
equals, getBooleanSetting, getIntSetting, getIntSetting, getLongSetting, getSettings, getStrategy, getStringSetting, getStringSetting, hashCode, isEnabled, setEnabled, setSettings, setStrategyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jmxtrans.embedded.output.OutputWriter
getSettings, isEnabled, setEnabled, setSettings
-
Field Details
-
SETTING_BUFFER_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_NAME_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Details
-
StatsDWriter
public StatsDWriter()
-
-
Method Details
-
start
public void start()Description copied from class:AbstractOutputWriterNo-op implementation- Specified by:
startin interfaceOutputWriter- Overrides:
startin classAbstractOutputWriter
-
stop
Description copied from class:AbstractOutputWriterNo-op implementation- Specified by:
stopin interfaceOutputWriter- Overrides:
stopin classAbstractOutputWriter- Throws:
Exception
-
write
Description copied from interface:OutputWriterWrite all the given QueryResult to the target system.- Specified by:
writein interfaceOutputWriter- Specified by:
writein classAbstractOutputWriter
-
notifyDataTooBig
-
flush
public void flush() -
getStatsdMetricType
See StatsD Metric Types.- Parameters:
result-- Returns:
- StatsD metric type such as 'c', 'g' or 's'. Default to 'c' if not known, return the metric type itself if its length == 1
-
toString
- Overrides:
toStringin classAbstractOutputWriter
-
setChannel
-