A Prometheus exporter for the poolcounter daemon.
After setting up your Go development environment, you can run go build
to create an executable. Alternatively you may use the provided Dockerfile to build a container image.
Configuration is done via environment variables. All settings are optional and have sane defaults:
EXPORTER_POOL_COUNTER_ADDRESS
- host:port of the poolcounter instance to gather metrics from. Default:localhost:7531
.EXPORTER_LISTEN_ADDRESS
- host:port the collector should listen on. Default:localhost:8000
.EXPORTER_LOGS_AS_JSON
- whether to format stdout logs as JSON or as human readable output. Default:false
.EXPORTER_COLLECTOR_TIMEOUT_SECONDS
- TCP timeout value used by the metrics collector, in seconds. Default: `5.EXPORTER_SERVER_TIMEOUT_SECONDS
- HTTP timeout values used by the server, in seconds. Default:3
.
Metrics are made available at the /prometheus
HTTP endpoint. They correspond to the internal metrics tracked by poolcounter.
poolcounter_total_processing_time_seconds
- total seconds spent by workers on performing poolcounter-protected taskspoolcounter_total_gained_time_seconds
- total seconds of processing time saved by the use of PoolCounter in secondspoolcounter_total_excl_wait_time_seconds
- total seconds spent by workers on waiting on exclusive lockspoolcounter_total_shared_wait_time_seconds
- total seconds spent by workers on waiting on shared lockspoolcounter_total_acquired
- total acquired locks countpoolcounter_total_releases
- total released locks countpoolcounter_connect_errors
- total number of client connection errorspoolcounter_lock_mismatch
- total number of mismatched lockspoolcounter_release_mismatch
- total number of receivedRELEASE
commands for which no lock was foundpoolcounter_processed_count
- total number of tasks processed
poolcounter_hashtable_entries
- number of entries in poolcounter hash tablepoolcounter_processing_workers
- number of workers busy performing poolcounter-protected taskspoolcounter_waiting_workers
- number of workers waiting in the queuepoolcounter_full_queues
- number of queues that are full of waiting workers
Logs are sent to standard output, either in human readable form or as JSON depending on the value of
the EXPORTER_LOGS_AS_JSON
environment variable.