Package io.vertx.micrometer
Class VertxJmxMetricsOptions
- java.lang.Object
-
- io.vertx.micrometer.VertxJmxMetricsOptions
-
public class VertxJmxMetricsOptions extends Object
Options for Prometheus metrics backend.- Author:
- Joel Takvorian
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DOMAINDefault value for the domain = metrics.static booleanDEFAULT_ENABLEDDefault value for enabled = false.static intDEFAULT_STEPDefault value for metric collection interval (in seconds) = 10.
-
Constructor Summary
Constructors Constructor Description VertxJmxMetricsOptions()Default constructorVertxJmxMetricsOptions(JsonObject json)Create an instance from aJsonObjectVertxJmxMetricsOptions(VertxJmxMetricsOptions other)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDomain()Get the JMX domain under which metrics are publishedintgetStep()Get the step of push intervals, in secondsbooleanisEnabled()Will JMX reporting be enabled?VertxJmxMetricsOptionssetDomain(String domain)Set the JMX domain under which to publish metricsVertxJmxMetricsOptionssetEnabled(boolean enabled)Set true to enable Prometheus reportingVertxJmxMetricsOptionssetStep(int step)Push interval steps, in seconds.JsonObjecttoJson()io.micrometer.jmx.JmxConfigtoMicrometerConfig()Convert these options to a Micrometer'sJmxConfigobject
-
-
-
Field Detail
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
Default value for enabled = false.- See Also:
- Constant Field Values
-
DEFAULT_DOMAIN
public static final String DEFAULT_DOMAIN
Default value for the domain = metrics.- See Also:
- Constant Field Values
-
DEFAULT_STEP
public static final int DEFAULT_STEP
Default value for metric collection interval (in seconds) = 10.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VertxJmxMetricsOptions
public VertxJmxMetricsOptions()
Default constructor
-
VertxJmxMetricsOptions
public VertxJmxMetricsOptions(VertxJmxMetricsOptions other)
Copy constructor- Parameters:
other- The otherVertxJmxMetricsOptionsto copy when creating this
-
VertxJmxMetricsOptions
public VertxJmxMetricsOptions(JsonObject json)
Create an instance from aJsonObject- Parameters:
json- the JsonObject to create it from
-
-
Method Detail
-
toJson
public JsonObject toJson()
- Returns:
- a JSON representation of these options
-
isEnabled
public boolean isEnabled()
Will JMX reporting be enabled?- Returns:
- true if enabled, false if not.
-
setEnabled
public VertxJmxMetricsOptions setEnabled(boolean enabled)
Set true to enable Prometheus reporting
-
getDomain
public String getDomain()
Get the JMX domain under which metrics are published
-
setDomain
public VertxJmxMetricsOptions setDomain(String domain)
Set the JMX domain under which to publish metrics
-
getStep
public int getStep()
Get the step of push intervals, in seconds
-
setStep
public VertxJmxMetricsOptions setStep(int step)
Push interval steps, in seconds. Default is 10 seconds.
-
toMicrometerConfig
public io.micrometer.jmx.JmxConfig toMicrometerConfig()
Convert these options to a Micrometer'sJmxConfigobject
-
-