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 StringDEFAULT_LIBRATO_API_URLstatic StringSETTING_TOKENstatic 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(Map<String,String> settings)voidwriteInvocationResult(String invocationName, Object value)voidwriteQueryResult(String metricName, String metricType, Object value)protected voidwriteQueryResult(String metricName, String metricType, Object value, 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
- See Also:
- Constant Field Values
-
SETTING_USERNAME
- See Also:
- Constant Field Values
-
SETTING_TOKEN
- See Also:
- Constant Field Values
-
-
Constructor Details
-
LibratoWriter
public LibratoWriter()
-
-
Method Details
-
postConstruct
- Specified by:
postConstructin interfaceOutputWriter- Overrides:
postConstructin classAbstractOutputWriter
-
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
-
writeQueryResult
protected void writeQueryResult(String metricName, String metricType, Object value, Writer out) throws IOException- Throws:
IOException
-
getExceptionCounter
public int getExceptionCounter()
-