iapetos.export

push!

(push! registry)

Push all metrics of the given registry.

push-registry!

(push-registry! registry {:keys [push-gateway job grouping-key]})

Directly push all metrics of the given registry to the given push gateway. This can be used if you don’t have control over registry creation, otherwise pushable-collector-registry and push! are recommended.

pushable-collector-registry

(pushable-collector-registry {:keys [job push-gateway grouping-key]})

Create a fresh iapetos collector registry whose metrics can be pushed to the specified gateway using push!.

text-format

(text-format registry)

Dump the given registry using the Prometheus text format (version 0.0.4).

with-push

macro

(with-push registry & body)

Use the given pushable-collector-registry to push metrics after the given block of code has run successfully.

with-push-gateway

macro

(with-push-gateway [binding options] & body)

Create a pushable-collector-registry, run the given block of code, then push all collected metrics.

(with-push-gateway [registry {:job "my-job", :push-gateway "0:8080"}]
  ...)

write-text-format!

(write-text-format! w registry)

Dump the given registry to the given writer using the Prometheus text format (version 0.0.4).