Export Hangfire statistics to Prometheus. This exporter currently supports the MongoDB and SQL Server databases.
Metric | Meaning |
---|---|
hangfire_up | Can hangfire database be reached |
hangfire_servers_total | Number of registered hangfire servers |
hangfire_deleted_jobs_total | Total number of deleted jobs |
enqueued_jobs_total | Current number of enqueued jobs |
failed_jobs_total | Total number of failed jobs |
fetched_jobs_total | Current number of fetched jobs |
processing_jobs_total | Current number of processing jobs |
queues_total | Number of queues |
recurring_jobs_total | Current number of recurring jobs |
scheduled_jobs_total | Current number of scheduled jobs |
succeeded_jobs_total | Total number of succeeded jobs |
listenaddress
: The address where the exporter will be listening to (defaults to :8888)metricspath
: The metrics path where the metrics will be available on (defaults to /metrics)mongoconnection
: The mongo connection where the exporter will get the metrics from (defaults to mongo://localhost:27017)mongodatabase
: The mongo database name where the hangfire data will be on (defaults to hangfire)sqlserverConnection
: The SQL Server connection where the exporter will get the metrics from (defaults to server=localhost;port=1433;Database=Hangfire.Sample;Trusted_Connection=False;User ID=SA;Password=yourStrong(!)Password;")
You can deploy this exporter using the samueltorres/hangfire-exporter Docker image.
For example:
docker pull samueltorres/hangfire-exporter
docker run -d -p 8888:8888 samueltorres/hangfire-exporter