Use Aidbox Metrics Server
This guide explains how to set up and use Aidbox Metrics Server
Setup and environment variable
DefineBOX_METRICS_PORT
environment variable with monitoring server port number.
Start metrics server
Aidbox exposes metrics on the endpoint <AIDBOX_BASE_URL>/<BOX_METRICS_PORT>
.
To check if the monitoring server works make the GET <AIDBOX_BASE_URL>:<BOX_METRICS_PORT>
request. The output should be a string "aidbox metrics".
Metrics server endpoints
There are three types of metrics Aidbox collects and exposes. All endpoints are available on a separate port, e.g. GET <AIDBOX_BASE_URL>:<BOX_METRICS_PORT>/metrics
.
The /metrics/hours
response can take some time since it collects much information from the database. Make sure your metrics scraper timeout is sufficient.
Prometheus example scrapers configuration
Collected metrics
HTTP
Postgres
Hikari (Postgres connection pool)
JVM
Disable PostgreSQL metrics
If you have a different pg exporter you can disable Aidbox PostgreSQL metrics for avoiding metrics duplication.
In this case, you should set BOX_METRICS_POSTGRES_ON
to false
value
Last updated