https://github.com/apache/geronimo-metrics
Apache Geronimo Metrics
https://github.com/apache/geronimo-metrics
geronimo http java javaee network-server web-framework
Last synced: 12 months ago
JSON representation
Apache Geronimo Metrics
- Host: GitHub
- URL: https://github.com/apache/geronimo-metrics
- Owner: apache
- Created: 2018-06-10T15:34:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T10:25:27.000Z (about 1 year ago)
- Last Synced: 2025-04-03T04:16:55.893Z (12 months ago)
- Topics: geronimo, http, java, javaee, network-server, web-framework
- Language: Java
- Homepage: https://geronimo.apache.org/
- Size: 194 KB
- Stars: 1
- Watchers: 16
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Geronimo Microprofile Metrics Implementation
== Artifact
[source,xml]
----
org.apache.geronimo
geronimo-metrics
${metrics.version}
----
== Renaming Prometheus keys
Prometheus exporter can rename metrics keys providing
a properties file in the classpath as resource `META-INF/geronimo-metrics/prometheus-mapping.properties`
or using system properties (with the prefix `geronimo.metrics.prometheus.mapping.`).
The key is the metric key (with the registry type as prefix) and the value the replacement key:
[source]
----
base\:my_metric = app:metric
----
TIP: since it is a properties format the `:` must be escaped.
The specific key `geronimo.metrics.filter.prefix` can take
a list (comma separated values) of metrics prefixes to filter (whitelist)
exported metrics.
== Controlling the metrics endpoints exposure
To activate the metrics endpoints you have to set the system property `geronimo.metrics.jaxrs.activated` to true
or configure either a role or host supported for the endpoint.
The role validation will use the JAX-RS `SecurityContext`.
It relies on the system property `geronimo.metrics.jaxrs.acceptedRoles` and it takes a comma separated list of roles.
At least one must match to let the request pass, if none is set this validation is ignored.
Note that a request without a principal will lead to a HTTP 401 whereas a request with a principal but not the right role will issue a HTTP 403.
The host validation will use the JAX-RS `UriInfo#getRequestUri`.
It relies on the system property `geronimo.metrics.jaxrs.acceptedHosts` and it takes a comma separated list of roles.
At least one must match to let the request pass, if none is set this validation is ignored.
The `` value is an alias for `127.x.y.z` or `1::x` IP or `localhost`.
Configuration example:
[source]
----
-Dgeronimo.metrics.jaxrs.acceptedRoles=ops \
-Dgeronimo.metrics.jaxrs.acceptedHosts=my.remote.host
----
IMPORTANT: the default is `geronimo.metrics.jaxrs.acceptedHosts=` but you can disable the endpoints using `geronimo.metrics.jaxrs.activated=false`.
=== Security
IMPORTANT: default will allow all local calls, this means that if you are behind a proxy which does not propagate the request URI properly
your `/metrics` endpoints will be public.