/oban-exporter

Exporting Oban work Metrics as Prometheus Metrics.

Primary LanguageElixirMIT LicenseMIT

Oban Exporter logo

Exporting Oban work Metrics as Prometheus Metrics.

Build and Test Image build and push

⚙️ Requirement ENV

env default value
DATABASE_URL X
PGPOOL_SIZE "10"
PORT "8080"
POLL_RATE 5000
SECRET_KEY_BASE optional
DEBUG_LOG false

  • DATABASE_URL : The URL specifying the database connection for use with the Elixir library Oban. This URL typically includes details such as the database type, username, password, host, and port.

  • PGPOOL_SIZE : The size of the PostgreSQL connection pool.

  • PORT : The port number on which the application should listen.

  • POLL_RATE : poll rate refers to the frequency or interval at which a system or application collects metric data, typically used in monitoring systems. It represents how often metrics are sampled to track the state and performance of the system. The poll rate determines the balance between real-time monitoring and resource utilization.

  • SECRET_KEY_BASE : 64 characters long, The Secret Key Base is a crucial secret key used in web applications like the Phoenix framework to enhance security and encrypt sensitive information such as session data. It must be securely stored, as its exposure could pose a serious threat to the application's security.

  • DEBUG_LOG : Enable logs needed for debugging. If you want to see logs from cloud services or other services you use, enable them

docker run -it -p 8080:8080 --e DATABASE_URL=${USER_DATABASE_URL} ./.env oban-exporter

Features

After running the image, you can access ${OBAN_EXPORTER_ENDPOINT}/metrics to see the metrics of the Oban job.

Example Image)

image