Package org.opends.server.protocols.http
Class PrometheusEndpoint
java.lang.Object
org.opends.server.api.HttpEndpoint<PrometheusEndpointCfg>
org.opends.server.protocols.http.PrometheusEndpoint
Represents an HTTP endpoint exposing OpenDJ metrics using
Prometheus text format.
-
Field Summary
Fields inherited from class org.opends.server.api.HttpEndpoint
configuration, serverContext, USE_DEFAULT_BUFFER_FACTORY
-
Constructor Summary
ConstructorDescriptionPrometheusEndpoint
(PrometheusEndpointCfg configuration, ServerContext serverContext) Creates a newPrometheusEndpoint
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isConfigurationValid
(List<LocalizableMessage> unacceptableReasons) Check that the configuration of thisHttpEndpoint
is valid.org.forgerock.http.HttpApplication
Create a new HttpApplication.
-
Constructor Details
-
PrometheusEndpoint
Creates a newPrometheusEndpoint
.- Parameters:
configuration
- The configuration to use.serverContext
- TheServerContext
which will be used for retrieving the server's metrics.
-
-
Method Details
-
newHttpApplication
public org.forgerock.http.HttpApplication newHttpApplication()Description copied from class:HttpEndpoint
Create a new HttpApplication.- Specified by:
newHttpApplication
in classHttpEndpoint<PrometheusEndpointCfg>
- Returns:
- an
HttpApplication
configured and ready to be started.
-
isConfigurationValid
Description copied from class:HttpEndpoint
Check that the configuration of thisHttpEndpoint
is valid. This default implementation try to instantiate and start the underlyingHttpApplication
.- Overrides:
isConfigurationValid
in classHttpEndpoint<PrometheusEndpointCfg>
- Parameters:
unacceptableReasons
- A list that can be used to hold messages about why the configuration is not acceptable.- Returns:
- true if the configuration is valid.
-