Metrics
Activate
Xbusd exposes prometheus metrics to the wanted host:port by adding the following options to the configuration file:
metrics.http-host
The tcp host on which the metrics are served (
--metrics-http-host
on the cli)metrics.http-port
The tcp port on which the metrics are served (
--metrics-http-port
on the cli)
Global metrics
The global metrics are bus-related and should be collected only once per bus no matter how many xbusd instances share the load.
These metrics are served only if the “metrics” service is started (which is the default).
They can be served on a separated url (/metrics/global
) is needed, typically
when several xbusd servers share the load, by enabling the setting
metrics.merge-global
(--metrics-merge-global
on the cli).
Optimizing delay
Added in version 3.2.6.
Some metrics are costly to retrieve and xbusd anticipates the metrics access so it replies quickly.
To get accurate process counts in the metrics, it is recommended to let xbusd know the typical delay between two queries, by settings the following setting:
metrics.delay-hint
Approximate delay between two queries by prometheus (
--metrics-delay-hint
on the cli). Default is: “15s”.Possible units are: “h”, “m” or “s”.
It should never be smaller than the actual prometheus delay between checks. A larger value will only lower the refresh rate of the information, which can be interesting to lower the load on the database.