Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,57 @@ public class ConfigOptions {
+ "the CoordinatorServer) it is advisable to use a port range "
+ "like 9250-9260.");

// ------------------------------------------------------------------------
// ConfigOptions for prometheus push gateway reporter
// ------------------------------------------------------------------------
public static final ConfigOption<String> METRICS_REPORTER_PROMETHEUS_PUSHGATEWAY_HOST_URL =
key("metrics.reporter.prometheus-pushgateway.hostUrl")
.stringType()
.noDefaultValue()
.withDescription("The URL of the Prometheus PushGateway to push metrics to.");

public static final ConfigOption<String> METRICS_REPORTER_PROMETHEUS_PUSHGATEWAY_JOB_NAME =
key("metrics.reporter.prometheus-pushgateway.jobName")
.stringType()
.noDefaultValue()
.withDescription(
"The job name under which to push metrics to Prometheus PushGateway.");

public static final ConfigOption<Boolean>
METRICS_REPORTER_PROMETHEUS_PUSHGATEWAY_RANDOM_JOB_NAME_SUFFIX =
key("metrics.reporter.prometheus-pushgateway.randomJobNameSuffix")
.booleanType()
.defaultValue(false)
.withDescription(
"Whether to append a random suffix to the job name. "
+ "This is useful when multiple instances of the reporter "
+ "are running on the same host.");

public static final ConfigOption<Boolean>
METRICS_REPORTER_PROMETHEUS_PUSHGATEWAY_DELETE_ON_SHUTDOWN =
key("metrics.reporter.prometheus-pushgateway.deleteOnShutdown")
.booleanType()
.defaultValue(false)
.withDescription(
"Whether to delete metrics from PushGateway on shutdown.");

public static final ConfigOption<Boolean>
METRICS_REPORTER_PROMETHEUS_PUSHGATEWAY_FILTER_LABEL_VALUE_CHARACTERS =
key("metrics.reporter.prometheus-pushgateway.filterLabelValueCharacters")
.booleanType()
.defaultValue(true)
.withDescription(
"Whether to filter characters in label values to conform to the "
+ "Prometheus character set ([a-zA-Z0-9:_]).");

public static final ConfigOption<String> METRICS_REPORTER_PROMETHEUS_PUSHGATEWAY_GROUPING_KEY =
key("metrics.reporter.prometheus-pushgateway.groupingKey")
.stringType()
.noDefaultValue()
.withDescription(
"The grouping key to use when pushing metrics to Prometheus PushGateway. "
+ "The format should be k1=v1;k2=v2.");

// ------------------------------------------------------------------------
// ConfigOptions for jmx reporter
// ------------------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions fluss-metrics/fluss-metrics-prometheus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
<version>${prometheus.version}</version>
</dependency>

<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_pushgateway</artifactId>
<version>${prometheus.version}</version>
</dependency>

<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_hotspot</artifactId>
<version>${prometheus.version}</version>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>org.apache.fluss</groupId>
Expand Down
Loading
Loading