Metrics Exposer 1.3.0 Readme
Metrics Exposer provides an endpoint to query metrics for Axual resources.
Configuration
Metrics Exposer offer some level of configuration. For example, you can
enable or disable SSL. It’s also possible to provide
multiple Prometheus configurations,
setting or not one as the default
.
Server SSL
Metrics Exposer can expose its endpoint under HTTPS protocol, and in that case, it will need the server certificate.
When server.ssl.enabled=true
, you have to pass a Keystore to build the
SSL context used by Metrics Exposer.
This server keystore can be passed with server.ssl
properties
Parameter | Description | Example |
---|---|---|
|
Server HTTP(s) port |
9080 |
|
Whether to enable SSL support |
true |
|
Enabled SSL protocols |
TLSv1.2 |
|
Path to the key store that holds the SSL certificate |
${HOME}/axual_local_data/security/metrics-exposer/metrics-exposer.server.keystore.jks |
|
Type of the key store |
JKS |
|
The alias under which the key is stored in the keystore. |
demo https services |
|
Password used to access the key in the key store |
notsecret |
|
Password used to access the key store |
notsecret |
Axual Security
Metrics Exposer connects to Prometheus to retrieve metrics, to allow
connecting to an https
URL we need to provide a truststore that holds
all certificates Metrics Exposer is allowed to trust
This truststore can be passed with axual.security
properties
Parameter | Description | Example |
---|---|---|
|
Path to the trust store that holds the trusted CA certificate |
${HOME}/axual_local_data/security/metrics-exposer/metrics-exposer.client.truststore.jks |
|
Password used to access the trust store |
notsecret |
Configuring Metrics Exposer
Metrics Exposer allows the user to configure the prometheusUrls
, and
the labelBlackList
via configuration.
You can specify the prometheus url for a tenant name by passing a configuration map like the following:
metrics-exposer:
prometheus-urls:
default: http://localhost:9090
# <tenant-name>: <prometheus-url>
By default, Metrics Exposer retrieves all labels returned by Prometheus in its response. If you want to filter labels out of Metrics Exposer’s response, you can do so by configuring the following:
metrics-exposer:
label-black-list:
- 'container'
- 'endpoint'
- 'instance'
Labels that are defined in the configuration will be filtered in the Metrics Exposer’s response.