public class OpenTSDBWriter extends OpenTSDBGenericWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
OpenTSDBWriter.Builder |
DEFAULT_MERGE_TYPE_NAMES_TAGS, host, messageFormatter, portBINARY_PATH, BOOLEAN_AS_NUMBER, DEBUG, HOST, OUTPUT_FILE, PORT, TEMPLATE_FILE, TYPE_NAMES| Constructor and Description |
|---|
OpenTSDBWriter(com.google.common.collect.ImmutableList<String> typeNames,
boolean booleanAsNumber,
Boolean debugEnabled,
String host,
Integer port,
Map<String,String> tags,
String tagName,
Boolean mergeTypeNamesTags,
String metricNamingExpression,
Boolean addHostnameTag,
Map<String,Object> settings) |
| Modifier and Type | Method and Description |
|---|---|
static OpenTSDBWriter.Builder |
builder() |
protected boolean |
getAddHostnameTagDefault()
Add the hostname tag "host" with the name of the host by default since OpenTSDB otherwise does not have this
information.
|
void |
internalWrite(Server server,
Query query,
com.google.common.collect.ImmutableList<Result> results)
Write the results of the query.
|
protected void |
sendOutput(String metricLine)
Subcall responsibility: method to perform the actual output for the given metric line.
|
void |
setPool(org.apache.commons.pool.impl.GenericKeyedObjectPool<InetSocketAddress,Socket> pool) |
close, finishOutput, prepareSender, shutdownSender, start, startOutput, validateSetupcreate, doWrite, firstNonNull, getConcatedTypeNameValues, getSettings, getTypeNames, isDebugEnabled, toStringpublic OpenTSDBWriter(com.google.common.collect.ImmutableList<String> typeNames, boolean booleanAsNumber, Boolean debugEnabled, String host, Integer port, Map<String,String> tags, String tagName, Boolean mergeTypeNamesTags, String metricNamingExpression, Boolean addHostnameTag, Map<String,Object> settings) throws LifecycleException, UnknownHostException
protected boolean getAddHostnameTagDefault()
getAddHostnameTagDefault in class OpenTSDBGenericWriterprotected void sendOutput(String metricLine) throws IOException
OpenTSDBGenericWritersendOutput in class OpenTSDBGenericWritermetricLine - - the line containing the metric name, value, and tags for a single metric; excludes the
"put" keyword expected by OpenTSDB and the trailing newline character.IOExceptionpublic void internalWrite(Server server, Query query, com.google.common.collect.ImmutableList<Result> results) throws Exception
OpenTSDBGenericWriterinternalWrite in class OpenTSDBGenericWriterquery - - the query and its results.Exception@Inject public void setPool(org.apache.commons.pool.impl.GenericKeyedObjectPool<InetSocketAddress,Socket> pool)
public static OpenTSDBWriter.Builder builder()
Copyright © 2010-2017 JmxTrans team. All Rights Reserved.