diff --git a/src/main/java/org/jmxtrans/embedded/EmbeddedJmxTrans.java b/src/main/java/org/jmxtrans/embedded/EmbeddedJmxTrans.java index d10b7fec..3204fe86 100644 --- a/src/main/java/org/jmxtrans/embedded/EmbeddedJmxTrans.java +++ b/src/main/java/org/jmxtrans/embedded/EmbeddedJmxTrans.java @@ -43,29 +43,29 @@ import java.util.concurrent.atomic.AtomicBoolean; /** - *

+ * * JMX Queries - *

+ * * If the JMX query returns several mbeans (thanks to '*' or '?' wildcards), * then the configured attributes are collected on all the returned mbeans. - *

- *

+ * + * * Output Writers - *

+ * * {@linkplain OutputWriter}s can be defined at the query level or globally at the {@link EmbeddedJmxTrans} level. * The {@linkplain OutputWriter}s that are effective for a {@linkplain Query} are accessible * via {@link Query#getEffectiveOutputWriters()} - *

- *

+ * + * * Collected Metrics / Query Results - *

+ * * Default behavior is to store the query results at the query level (see {@linkplain Query#queryResults}) to resolve the * effective {@linkplain OutputWriter}s at result export time ({@linkplain org.jmxtrans.embedded.Query#getEffectiveOutputWriters()}). - *
+ * * The drawback is to limit the benefits of batching result * to a backend (see {@link org.jmxtrans.embedded.Query#exportCollectedMetrics()}) and the size limit of the results list to prevent * {@linkplain OutOfMemoryError} in case of export slowness. - *

+ * * An optimization would be, if only one {@linkplain OutputWriter} is defined in the whole {@linkplain EmbeddedJmxTrans}, to * replace all the query-local result queues by one global result-queue. * diff --git a/src/main/java/org/jmxtrans/embedded/Query.java b/src/main/java/org/jmxtrans/embedded/Query.java index b42bf4e4..a63f0f75 100644 --- a/src/main/java/org/jmxtrans/embedded/Query.java +++ b/src/main/java/org/jmxtrans/embedded/Query.java @@ -182,7 +182,7 @@ public void collectMetrics() { /** * Export the collected metrics to the {@linkplain OutputWriter}s associated with this {@linkplain Query} * (see {@link #getEffectiveOutputWriters()}). - *

+ * * Metrics are batched according to {@link EmbeddedJmxTrans#getExportBatchSize()} * * @return the number of exported {@linkplain QueryResult} diff --git a/src/main/java/org/jmxtrans/embedded/QueryAttribute.java b/src/main/java/org/jmxtrans/embedded/QueryAttribute.java index 55f5319e..a7378676 100644 --- a/src/main/java/org/jmxtrans/embedded/QueryAttribute.java +++ b/src/main/java/org/jmxtrans/embedded/QueryAttribute.java @@ -35,7 +35,7 @@ /** * Describe a JMX MBean attribute to collect and hold the attribute collection logic. - *

+ * * Collected values are sent to a {@linkplain java.util.concurrent.BlockingQueue} * for later export to the target monitoring systems * (see {@link #collectMetrics(javax.management.ObjectName, Object, long, java.util.Queue)}). @@ -57,7 +57,7 @@ public class QueryAttribute { private String name; /** * Used to build the name of the {@link QueryResult} that will be exported. - *

+ * * null if not defined in the configuration. The {@link #name} is then used to build to {@linkplain QueryResult} * * @see org.jmxtrans.embedded.QueryResult#getName() diff --git a/src/main/java/org/jmxtrans/embedded/ResultNameStrategy.java b/src/main/java/org/jmxtrans/embedded/ResultNameStrategy.java index 17995046..65f4b59d 100644 --- a/src/main/java/org/jmxtrans/embedded/ResultNameStrategy.java +++ b/src/main/java/org/jmxtrans/embedded/ResultNameStrategy.java @@ -35,14 +35,14 @@ /** * Build a {@linkplain QueryResult#name} from a collected metric ({@linkplain QueryAttribute}, {@linkplain Query}). - *

+ * * Build name must be escaped to be compatible with all {@linkplain org.jmxtrans.embedded.output.OutputWriter}. * The approach is to escape non alpha-numeric chars. - *

+ * * Expressions support '#' based keywords (e.g. #hostname#) and with '%' based variables mapped to objectname properties. - *

- * Supported '#' based 'functions': + * * + * * * * @@ -259,8 +259,8 @@ protected String resolveExpression(String expression, ObjectName exactObjectName } /** - * Transforms an {@linkplain ObjectName} into a plain {@linkplain String} only composed of (a->Z, A-Z, '_'). - *

+ * Transforms an {@linkplain ObjectName} into a plain {@linkplain String} only composed of (a-z, A-Z, '_'). + * * '_' is the escape char for not compliant chars. */ protected String escapeObjectName(ObjectName objectName) { @@ -283,7 +283,7 @@ protected String escapeObjectName(ObjectName objectName) { } /** - * Escape all non a->z,A->Z, 0->9 and '-' with a '_'. + * Escape all non a-z,A-Z, 0-9 and '-' with a '_'. * * @param str the string to escape * @param result the {@linkplain StringBuilder} in which the escaped string is appended @@ -293,9 +293,9 @@ private void appendEscapedNonAlphaNumericChars(String str, StringBuilder result) } /** - * Escape all non a->z,A->Z, 0->9 and '-' with a '_'. - *

- * '.' is escaped with a '_' if {@code escapeDot} is true. + * Escape all non a-z,A-Z, 0-9 and '-' with a '_'. + * + * '.' is escaped with a '_' if {@code escapeDot} is {$code true}. * * @param str the string to escape * @param escapeDot indicates whether '.' should be escaped into '_' or not. diff --git a/src/main/java/org/jmxtrans/embedded/output/AbstractOutputWriter.java b/src/main/java/org/jmxtrans/embedded/output/AbstractOutputWriter.java index 1f456c4a..9969ba66 100644 --- a/src/main/java/org/jmxtrans/embedded/output/AbstractOutputWriter.java +++ b/src/main/java/org/jmxtrans/embedded/output/AbstractOutputWriter.java @@ -71,7 +71,7 @@ public void stop() throws Exception { /** * Convert value of this setting to a Java int. - *

+ * * If the setting is not found or is not an int, an exception is thrown. * * @param name name of the setting / property @@ -89,7 +89,7 @@ protected int getIntSetting(String name) throws IllegalArgumentException { /** * Convert value of this setting to a Java int. - *

+ * * If the property is not found, the defaultValue is returned. If the property is not an int, an exception is thrown. * * @param name name of the property @@ -113,7 +113,7 @@ protected int getIntSetting(String name, int defaultValue) throws IllegalArgumen /** * Convert value of this setting to a Java long. - *

+ * * If the property is not found, the defaultValue is returned. If the property is not a long, an exception is thrown. * * @param name name of the property @@ -137,7 +137,7 @@ protected long getLongSetting(String name, long defaultValue) throws IllegalArgu /** * Convert value of this setting to a Java boolean (via {@link Boolean#parseBoolean(String)}). - *

+ * * If the property is not found, the defaultValue is returned. * * @param name name of the property @@ -157,7 +157,7 @@ protected boolean getBooleanSetting(String name, boolean defaultValue) { /** * Convert value of this setting to a Java int. - *

+ * * If the setting is not found, an exception is thrown. * * @param name name of the property @@ -173,7 +173,7 @@ protected String getStringSetting(String name) throws IllegalArgumentException { /** * Return the value of the given property. - *

+ * * If the property is not found, the defaultValue is returned. * * @param name name of the property diff --git a/src/main/java/org/jmxtrans/embedded/output/ConsoleWriter.java b/src/main/java/org/jmxtrans/embedded/output/ConsoleWriter.java index a7b59fbd..b699c1bc 100644 --- a/src/main/java/org/jmxtrans/embedded/output/ConsoleWriter.java +++ b/src/main/java/org/jmxtrans/embedded/output/ConsoleWriter.java @@ -29,12 +29,12 @@ /** * Output results to stdout. - *

+ * * Settings: *

- *

+ * * Output: Graphite's * Carbon Plan Text protocol *

diff --git a/src/main/java/org/jmxtrans/embedded/output/CopperEggWriter.java b/src/main/java/org/jmxtrans/embedded/output/CopperEggWriter.java
index 212247f8..35db2c3a 100644
--- a/src/main/java/org/jmxtrans/embedded/output/CopperEggWriter.java
+++ b/src/main/java/org/jmxtrans/embedded/output/CopperEggWriter.java
@@ -75,20 +75,20 @@
 import java.lang.management.ManagementFactory;
 
 /**
- * CopperEgg Metrics implementation of the {@linkplain org.jmxtrans.embedded.output.OutputWriter}.
- * 

- * This implementation uses v2 of the CopperEgg API - *

+ * CopperEgg Metrics implementation of the {@linkplain org.jmxtrans.embedded.output.OutputWriter}. + * + * This implementation uses v2 of the CopperEgg API + * * Settings: *

* LibratoWriter.java author: * @author Cyrille Le Clerc @@ -161,7 +161,7 @@ public class CopperEggWriter extends AbstractOutputWriter implements OutputWrite private String source; /** - * Load settings

+ * Load settings */ @Override public void start() { diff --git a/src/main/java/org/jmxtrans/embedded/output/CsvWriter.java b/src/main/java/org/jmxtrans/embedded/output/CsvWriter.java index 6c5a58ad..aeabc7b9 100644 --- a/src/main/java/org/jmxtrans/embedded/output/CsvWriter.java +++ b/src/main/java/org/jmxtrans/embedded/output/CsvWriter.java @@ -18,12 +18,12 @@ * output writer configuration because this aggregates all of the different * attributes returned by the query into a single line in a csv file, using the * {@link org.jmxtrans.embedded.QueryResult#getName()} as the value of the - * header.

+ * header. * * The query can contain multiple MBeans by pattern matched ObjectName - *

+ * * Example query configuration: - *

+ * 

  *  "queries": [
  *  {
  *     "outputWriters": [
@@ -48,7 +48,7 @@
  *      ]
  *  }
  *]
- * 
+ *
* * See embedded-jmxtrans configuration for more details. * diff --git a/src/main/java/org/jmxtrans/embedded/output/GraphiteHttpWriter.java b/src/main/java/org/jmxtrans/embedded/output/GraphiteHttpWriter.java index 9e52760b..92eeb2fd 100644 --- a/src/main/java/org/jmxtrans/embedded/output/GraphiteHttpWriter.java +++ b/src/main/java/org/jmxtrans/embedded/output/GraphiteHttpWriter.java @@ -40,12 +40,13 @@ /** * Graphite implementation of the {@linkplain OutputWriter}. - *

+ * * This implementation uses * Carbon Plan Text protocol over HTTP. + * * Read this thread in order to implement a HTTP * listener in front of Carbon backend. - *

+ * * Settings: *

Supported '#' based 'functions'
FunctionDescription