Liking cljdoc? Tell your friends :D

lb.metrics.collector

Collects and formats metrics in Prometheus text format.

Gathers data from various sources:

  • Connection tracking (active connections, bytes, packets)
  • Health checking (backend health status, latency)
  • DNS resolution (resolution status)
  • Stats aggregator (totals)
Collects and formats metrics in Prometheus text format.

Gathers data from various sources:
- Connection tracking (active connections, bytes, packets)
- Health checking (backend health status, latency)
- DNS resolution (resolution status)
- Stats aggregator (totals)
raw docstring

clear-sources!clj

(clear-sources!)

Clear all registered data sources.

Clear all registered data sources.
sourceraw docstring

collect-allclj

(collect-all)

Collect all metrics and format as Prometheus text exposition format.

Returns a string suitable for returning from /metrics endpoint.

Collect all metrics and format as Prometheus text exposition format.

Returns a string suitable for returning from /metrics endpoint.
sourceraw docstring

record-health-latency!clj

(record-health-latency! proxy-name target-id latency-sec)

Record a health check latency observation.

proxy-name: name of the proxy target-id: target identifier (e.g., "10.0.0.1:8080") latency-sec: latency in seconds

Record a health check latency observation.

proxy-name: name of the proxy
target-id: target identifier (e.g., "10.0.0.1:8080")
latency-sec: latency in seconds
sourceraw docstring

register-sources!clj

(register-sources! sources)

Register data source functions for metric collection.

sources is a map with optional keys: :conntrack-fn - (fn [] connections) returns seq of Connection records :health-fn - (fn [] health-status) returns health status for all proxies :stats-fn - (fn [] stats) returns aggregated stats map :dns-fn - (fn [] dns-status) returns DNS status for all proxies :proxies-fn - (fn [] proxies) returns list of proxy configurations

Register data source functions for metric collection.

sources is a map with optional keys:
  :conntrack-fn - (fn [] connections) returns seq of Connection records
  :health-fn    - (fn [] health-status) returns health status for all proxies
  :stats-fn     - (fn [] stats) returns aggregated stats map
  :dns-fn       - (fn [] dns-status) returns DNS status for all proxies
  :proxies-fn   - (fn [] proxies) returns list of proxy configurations
sourceraw docstring

reset-histograms!clj

(reset-histograms!)

Reset all histogram data.

Reset all histogram data.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close