public class OpenTSDBMessageFormatter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_TAG_NAME |
| Constructor and Description |
|---|
OpenTSDBMessageFormatter(com.google.common.collect.ImmutableList<java.lang.String> typeNames,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> tags) |
OpenTSDBMessageFormatter(com.google.common.collect.ImmutableList<java.lang.String> typeNames,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> tags,
java.lang.String tagName,
java.lang.String metricNamingExpression,
boolean mergeTypeNamesTags,
boolean hostnameTag) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTypeNamesTags(java.lang.StringBuilder resultString,
Result result)
Add the tag(s) for typeNames.
|
java.lang.Iterable<java.lang.String> |
formatResults(java.lang.Iterable<Result> results,
Server server) |
protected void |
processOneMetric(java.util.List<java.lang.String> resultStrings,
Server server,
Result result,
java.lang.Object value,
java.lang.String addTagName,
java.lang.String addTagValue)
Process a single metric from the given JMX query result with the specified value.
|
protected java.lang.String |
sanitizeString(java.lang.String unSanitized)
VALID CHARACTERS:
METRIC, TAGNAME, AND TAG-VALUE:
[-_./a-zA-Z0-9]+
SANITIZATION:
- Discard Quotes.
|
public static final java.lang.String DEFAULT_TAG_NAME
public OpenTSDBMessageFormatter(@Nonnull
com.google.common.collect.ImmutableList<java.lang.String> typeNames,
@Nonnull
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> tags)
throws LifecycleException
LifecycleExceptionpublic OpenTSDBMessageFormatter(@Nonnull
com.google.common.collect.ImmutableList<java.lang.String> typeNames,
@Nonnull
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> tags,
@Nonnull
java.lang.String tagName,
@Nullable
java.lang.String metricNamingExpression,
boolean mergeTypeNamesTags,
boolean hostnameTag)
throws LifecycleException
LifecycleExceptionpublic java.lang.Iterable<java.lang.String> formatResults(java.lang.Iterable<Result> results, Server server)
protected void processOneMetric(java.util.List<java.lang.String> resultStrings,
Server server,
Result result,
java.lang.Object value,
java.lang.String addTagName,
java.lang.String addTagValue)
protected void addTypeNamesTags(java.lang.StringBuilder resultString,
Result result)
result - - the result of the JMX query.resultString - - current form of the metric string.protected java.lang.String sanitizeString(java.lang.String unSanitized)
Copyright © 2010-2018 JmxTrans team. All Rights Reserved.