Class ConfigModifier
java.lang.Object
de.iip_ecosphere.platform.monitoring.prometheus.ConfigModifier
Allows modifying a prometheus configuration. Call
end() when modifications are complete.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a scrape endpoint. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Consumer<ConfigModifier> private List<ConfigModifier.ScrapeEndpoint> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty modifier.ConfigModifier(List<ConfigModifier.ScrapeEndpoint> endpoints, Consumer<ConfigModifier> endAction) Creates a modifier with default endpoints. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a scrape endpoint.voidend()Call when configuration change setup is done.Returns all scrape endpoints.
-
Field Details
-
scrapes
-
endAction
-
-
Constructor Details
-
ConfigModifier
public ConfigModifier()Creates an empty modifier. -
ConfigModifier
public ConfigModifier(List<ConfigModifier.ScrapeEndpoint> endpoints, Consumer<ConfigModifier> endAction) Creates a modifier with default endpoints.- Parameters:
endpoints- the endpointsendAction- the action to be called inend(), may be null for none
-
-
Method Details
-
addScrapeEndpoint
Adds a scrape endpoint.- Parameters:
entry- the endpoint to scrape
-
scrapeEndpoints
Returns all scrape endpoints.- Returns:
- the endpoints
-
end
public void end()Call when configuration change setup is done.
-