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