Skip to content

Commit

Permalink
[FLINK-14831][metrics][docs] Generate InfluxDB config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Jan 18, 2020
1 parent 6825dbd commit eeee9b9
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 9 deletions.
66 changes: 66 additions & 0 deletions docs/_includes/generated/influxdb_reporter_configuration.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<table class="table table-bordered">
<thead>
<tr>
<th class="text-left" style="width: 20%">Key</th>
<th class="text-left" style="width: 15%">Default</th>
<th class="text-left" style="width: 10%">Type</th>
<th class="text-left" style="width: 55%">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><h5>connectTimeout</h5></td>
<td style="word-wrap: break-word;">10000</td>
<td>Integer</td>
<td>(optional) the InfluxDB connect timeout for metrics</td>
</tr>
<tr>
<td><h5>consistency</h5></td>
<td style="word-wrap: break-word;">ONE</td>
<td><p>Enum</p>Possible values: [ALL, ANY, ONE, QUORUM]</td>
<td>(optional) the InfluxDB consistency level for metrics</td>
</tr>
<tr>
<td><h5>db</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>the InfluxDB database to store metrics</td>
</tr>
<tr>
<td><h5>host</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>the InfluxDB server host</td>
</tr>
<tr>
<td><h5>password</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>(optional) InfluxDB username's password used for authentication</td>
</tr>
<tr>
<td><h5>port</h5></td>
<td style="word-wrap: break-word;">8086</td>
<td>Integer</td>
<td>the InfluxDB server port</td>
</tr>
<tr>
<td><h5>retentionPolicy</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>(optional) the InfluxDB retention policy for metrics</td>
</tr>
<tr>
<td><h5>username</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
<td>(optional) InfluxDB username used for authentication</td>
</tr>
<tr>
<td><h5>writeTimeout</h5></td>
<td style="word-wrap: break-word;">10000</td>
<td>Integer</td>
<td>(optional) the InfluxDB write timeout for metrics</td>
</tr>
</tbody>
</table>
10 changes: 1 addition & 9 deletions docs/monitoring/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,15 +655,7 @@ of your Flink distribution.

Parameters:

- `host` - the InfluxDB server host
- `port` - (optional) the InfluxDB server port, defaults to `8086`
- `db` - the InfluxDB database to store metrics
- `username` - (optional) InfluxDB username used for authentication
- `password` - (optional) InfluxDB username's password used for authentication
- `retentionPolicy` - (optional) InfluxDB retention policy, defaults to retention policy defined on the server for the db
- `consistency` - (optional) InfluxDB consistency level for metrics. Possible values: [ALL, ANY, ONE, QUORUM], default is ONE
- `connectTimeout` - (optional) the InfluxDB client connect timeout in milliseconds, default is 10000 ms
- `writeTimeout` - (optional) the InfluxDB client write timeout in milliseconds, default is 10000 ms
{% include generated/influxdb_reporter_configuration.html %}

Example configuration:

Expand Down
5 changes: 5 additions & 0 deletions flink-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ under the License.
<artifactId>flink-metrics-prometheus_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-metrics-influxdb_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<!-- necessary for loading the web-submission extension -->
<groupId>org.apache.flink</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class ConfigOptionsDocGenerator {
new OptionsClassLocation("flink-mesos", "org.apache.flink.mesos.configuration"),
new OptionsClassLocation("flink-mesos", "org.apache.flink.mesos.runtime.clusterframework"),
new OptionsClassLocation("flink-metrics/flink-metrics-prometheus", "org.apache.flink.metrics.prometheus"),
new OptionsClassLocation("flink-metrics/flink-metrics-influxdb", "org.apache.flink.metrics.influxdb"),
new OptionsClassLocation("flink-state-backends/flink-statebackend-rocksdb", "org.apache.flink.contrib.streaming.state"),
new OptionsClassLocation("flink-table/flink-table-api-java", "org.apache.flink.table.api.config"),
new OptionsClassLocation("flink-python", "org.apache.flink.python"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.apache.flink.metrics.influxdb;

import org.apache.flink.annotation.docs.Documentation;
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.ConfigOptions;
import org.apache.flink.metrics.MetricConfig;
Expand All @@ -27,6 +28,7 @@
/**
* Config options for {@link InfluxdbReporter}.
*/
@Documentation.SuffixOption
public class InfluxdbReporterOptions {

public static final ConfigOption<String> HOST = ConfigOptions
Expand Down

0 comments on commit eeee9b9

Please sign in to comment.