Package org.jmxtrans.agent
Class LibratoWriter
java.lang.Object
org.jmxtrans.agent.AbstractOutputWriter
org.jmxtrans.agent.LibratoWriter
- All Implemented Interfaces:
OutputWriter
public class LibratoWriter extends AbstractOutputWriter implements OutputWriter
OutputWriter for Librato.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_LIBRATO_API_URLstatic java.lang.StringSETTING_TOKENstatic java.lang.StringSETTING_USERNAMEFields inherited from class org.jmxtrans.agent.AbstractOutputWriter
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE -
Constructor Summary
Constructors Constructor Description LibratoWriter() -
Method Summary
Modifier and Type Method Description intgetExceptionCounter()voidpostCollect()called after a serie of writes, typically at the end of a collection.voidpostConstruct(java.util.Map<java.lang.String,java.lang.String> settings)voidwriteInvocationResult(java.lang.String invocationName, java.lang.Object value)voidwriteQueryResult(java.lang.String metricName, java.lang.String metricType, java.lang.Object value)protected voidwriteQueryResult(java.lang.String metricName, java.lang.String metricType, java.lang.Object value, java.io.Writer out)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
-
DEFAULT_LIBRATO_API_URL
public static final java.lang.String DEFAULT_LIBRATO_API_URL- See Also:
- Constant Field Values
-
SETTING_USERNAME
public static final java.lang.String SETTING_USERNAME- See Also:
- Constant Field Values
-
SETTING_TOKEN
public static final java.lang.String SETTING_TOKEN- See Also:
- Constant Field Values
-
-
Constructor Details
-
LibratoWriter
public LibratoWriter()
-
-
Method Details
-
postConstruct
public void postConstruct(java.util.Map<java.lang.String,java.lang.String> settings)- Specified by:
postConstructin interfaceOutputWriter- Overrides:
postConstructin classAbstractOutputWriter
-
postCollect
public void postCollect() throws java.io.IOExceptionDescription 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:
java.io.IOException
-
writeInvocationResult
public void writeInvocationResult(java.lang.String invocationName, java.lang.Object value) throws java.io.IOException- Specified by:
writeInvocationResultin interfaceOutputWriter- Specified by:
writeInvocationResultin classAbstractOutputWriter- Throws:
java.io.IOException
-
writeQueryResult
public void writeQueryResult(java.lang.String metricName, java.lang.String metricType, java.lang.Object value) throws java.io.IOException- Specified by:
writeQueryResultin interfaceOutputWriter- Specified by:
writeQueryResultin classAbstractOutputWritermetricType- seeQuery.type- Throws:
java.io.IOException
-
writeQueryResult
protected void writeQueryResult(java.lang.String metricName, java.lang.String metricType, java.lang.Object value, java.io.Writer out) throws java.io.IOException- Throws:
java.io.IOException
-
getExceptionCounter
public int getExceptionCounter()
-