Package org.jmxtrans.agent
Class StatsDOutputWriter
java.lang.Object
org.jmxtrans.agent.AbstractOutputWriter
org.jmxtrans.agent.StatsDOutputWriter
- All Implemented Interfaces:
OutputWriter
public class StatsDOutputWriter extends AbstractOutputWriter implements OutputWriter
-
Field Summary
Fields Modifier and Type Field Description static StringSETTING_BUFFER_SIZEstatic StringSETTING_HOSTstatic StringSETTING_PORTstatic StringSETTING_ROOT_PREFIXstatic StringSETTINGS_STATSD_TYPEstatic StringSETTINGS_TAGSstatic StringSTATSD_DATADOGstatic StringSTATSD_SYSDIGFields inherited from class org.jmxtrans.agent.AbstractOutputWriter
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE -
Constructor Summary
Constructors Constructor Description StatsDOutputWriter() -
Method Summary
Modifier and Type Method Description protected booleandoSend(String stat)booleanflush()protected StringgetHostName()voidpostCollect()called after a serie of writes, typically at the end of a collection.voidpostConstruct(Map<String,String> settings)voidwriteInvocationResult(String invocationName, Object value)voidwriteQueryResult(String metricName, String metricType, Object value)Methods inherited from class org.jmxtrans.agent.AbstractOutputWriter
getDebugLevel, getInfoLevel, getTraceLevel, preCollect, preDestroyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jmxtrans.agent.OutputWriter
preCollect, preDestroy
-
Field Details
-
SETTING_HOST
- See Also:
- Constant Field Values
-
SETTING_PORT
- See Also:
- Constant Field Values
-
SETTING_ROOT_PREFIX
- See Also:
- Constant Field Values
-
SETTING_BUFFER_SIZE
- See Also:
- Constant Field Values
-
SETTINGS_STATSD_TYPE
- See Also:
- Constant Field Values
-
STATSD_DATADOG
- See Also:
- Constant Field Values
-
STATSD_SYSDIG
- See Also:
- Constant Field Values
-
SETTINGS_TAGS
- See Also:
- Constant Field Values
-
-
Constructor Details
-
StatsDOutputWriter
public StatsDOutputWriter()
-
-
Method Details
-
postConstruct
- Specified by:
postConstructin interfaceOutputWriter- Overrides:
postConstructin classAbstractOutputWriter
-
getHostName
-
postCollect
Description copied from interface:OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
- Specified by:
postCollectin interfaceOutputWriter- Overrides:
postCollectin classAbstractOutputWriter- Throws:
IOException
-
writeInvocationResult
- Specified by:
writeInvocationResultin interfaceOutputWriter- Specified by:
writeInvocationResultin classAbstractOutputWriter- Throws:
IOException
-
writeQueryResult
public void writeQueryResult(String metricName, String metricType, Object value) throws IOException- Specified by:
writeQueryResultin interfaceOutputWriter- Specified by:
writeQueryResultin classAbstractOutputWritermetricType- seeQuery.type- Throws:
IOException
-
doSend
-
flush
public boolean flush()
-