public class IipEcospherePrometheusExporter
extends de.iip_ecosphere.platform.monitoring.MonitoringReceiver
| Modifier and Type | Class and Description |
|---|---|
private static class |
IipEcospherePrometheusExporter.MyPrometheusMeterRegistry
Exhibits creating a custom meter.
|
protected class |
IipEcospherePrometheusExporter.PrometheusExporter
Implements a specialized exporter for prometheus.
|
private static class |
IipEcospherePrometheusExporter.PrometheusMetricsServlet
The default metrics servlet.
|
static class |
IipEcospherePrometheusExporter.RegistryServlet
A simple metrics servlet for a given local, bridged metrics registry.
|
| Modifier and Type | Field and Description |
|---|---|
private org.apache.catalina.Context |
context |
static String |
DEFAULT_METRICS_ENDPOINT |
static String |
DEFAULT_METRICS_SERVLET_NAME |
private static io.micrometer.core.instrument.config.MeterFilter[] |
METER_FILTERS |
private Supplier<ConfigModifier> |
modifier |
private int |
port |
private org.apache.catalina.startup.Tomcat |
server |
private File |
webapps |
| Constructor and Description |
|---|
IipEcospherePrometheusExporter()
Creates a prometheus exporter.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
addServlet(String id,
javax.servlet.Servlet servlet)
Adds a servlet to the tomcat instance.
|
protected de.iip_ecosphere.platform.monitoring.MonitoringReceiver.Exporter |
createExporter(String id) |
private String |
getPath(String id)
Returns the servlet mapping path.
|
protected void |
notifyExporterAdded(de.iip_ecosphere.platform.monitoring.MonitoringReceiver.Exporter exporter) |
protected void |
notifyExporterRemoved(de.iip_ecosphere.platform.monitoring.MonitoringReceiver.Exporter exporter) |
protected void |
removeServlet(String id)
Removes the given servlet from the server container.
|
void |
setModifierSupplier(Supplier<ConfigModifier> modifier)
Defines the modifier supplier.
|
void |
start() |
void |
stop() |
private void |
writeScrapeConfig()
Changes the prometheus configuration for modified scrape setup.
|
public static final String DEFAULT_METRICS_SERVLET_NAME
public static final String DEFAULT_METRICS_ENDPOINT
private static final io.micrometer.core.instrument.config.MeterFilter[] METER_FILTERS
private org.apache.catalina.startup.Tomcat server
private org.apache.catalina.Context context
private Supplier<ConfigModifier> modifier
private int port
private File webapps
public IipEcospherePrometheusExporter()
setModifierSupplier(Supplier)public void setModifierSupplier(Supplier<ConfigModifier> modifier)
modifier - the modifier supplierpublic void start()
start in class de.iip_ecosphere.platform.monitoring.MonitoringReceiverpublic void stop()
stop in class de.iip_ecosphere.platform.monitoring.MonitoringReceiverprotected String addServlet(String id, javax.servlet.Servlet servlet)
id - the id of the servlet, also used for the pathservlet - the servlet instanceprivate String getPath(String id)
id - the servlet idprotected void removeServlet(String id)
id - the servlet idprotected de.iip_ecosphere.platform.monitoring.MonitoringReceiver.Exporter createExporter(String id)
createExporter in class de.iip_ecosphere.platform.monitoring.MonitoringReceiverprotected void notifyExporterAdded(de.iip_ecosphere.platform.monitoring.MonitoringReceiver.Exporter exporter)
notifyExporterAdded in class de.iip_ecosphere.platform.monitoring.MonitoringReceiverprotected void notifyExporterRemoved(de.iip_ecosphere.platform.monitoring.MonitoringReceiver.Exporter exporter)
notifyExporterRemoved in class de.iip_ecosphere.platform.monitoring.MonitoringReceiverprivate void writeScrapeConfig()
Copyright © 2022. All rights reserved.