All Projects → Strech → Sidekiq Prometheus Exporter

Strech / Sidekiq Prometheus Exporter

Licence: mit
All the basic metrics of Sidekiq with pluggable contribs prepared for Prometheus

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Sidekiq Prometheus Exporter

Bigbluebutton Exporter
Prometheus exporter for BigBlueButton
Stars: ✭ 117 (-9.3%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Unifiedmetrics
Fully-featured metrics collection agent for Minecraft servers. Supports Prometheus and InfluxDB. Dashboard included out-of-box.
Stars: ✭ 29 (-77.52%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Snmp exporter
SNMP Exporter for Prometheus
Stars: ✭ 705 (+446.51%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Tomcat exporter
A Prometheus exporter for Apache Tomcat
Stars: ✭ 99 (-23.26%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Citrix Adc Metrics Exporter
Export metrics from Citrix ADC (NetScaler) to Prometheus
Stars: ✭ 67 (-48.06%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Haproxy exporter
Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption
Stars: ✭ 465 (+260.47%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Json Exporter
Prometheus exporter which fetches JSON from a URL and exports one of the values as gauge metrics
Stars: ✭ 26 (-79.84%)
Mutual labels:  metrics, prometheus, prometheus-exporter
s3 exporter
Exports Prometheus metrics about S3 buckets and objects
Stars: ✭ 65 (-49.61%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Promcord
📊 Analyze your entire discord guild in grafana using prometheus. Message, User, Game and Voice statistics...
Stars: ✭ 39 (-69.77%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Kafka exporter
Kafka exporter for Prometheus
Stars: ✭ 996 (+672.09%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Consul exporter
Exporter for Consul metrics
Stars: ✭ 323 (+150.39%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Memcached exporter
Exports metrics from memcached servers for consumption by Prometheus.
Stars: ✭ 109 (-15.5%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Kube State Metrics
Add-on agent to generate and expose cluster-level metrics.
Stars: ✭ 3,433 (+2561.24%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Statsd exporter
StatsD to Prometheus metrics exporter
Stars: ✭ 608 (+371.32%)
Mutual labels:  metrics, prometheus, prometheus-exporter
resoto
Resoto - Find leaky resources, manage quota limits, detect drift, and clean up!
Stars: ✭ 562 (+335.66%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Postgresql exporter
A Prometheus exporter for some postgresql metrics
Stars: ✭ 26 (-79.84%)
Mutual labels:  metrics, prometheus, prometheus-exporter
github exporter
Prometheus exporter for GitHub
Stars: ✭ 21 (-83.72%)
Mutual labels:  metrics, prometheus, prometheus-exporter
aws-ec2-sg-exporter
A dockerized Prometheus exporter that compares desired/wanted IPv4/IPv6 CIDR against currently applied inbound CIDR rules in your security group(s).
Stars: ✭ 23 (-82.17%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Iperf3 exporter
Simple server that probes iPerf3 endpoints and exports results via HTTP for Prometheus consumption
Stars: ✭ 30 (-76.74%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Systemd exporter
Exporter for systemd unit metrics
Stars: ✭ 82 (-36.43%)
Mutual labels:  metrics, prometheus, prometheus-exporter

CI status Maintainability

Sidekiq Prometheus Exporter

— Hey! Sidekiq dashboard stats looks like a Prometheus metrics!?

— Indeed ... 🤔

Grafana dashboard example

Open dashboard example file (grafana 7), then open https://<your grafana-url>/dashboard/import and paste the content of the file.


If you like the project and want to support me on my sleepless nights, you can

Support via PayPal ko-fi

Available metrics

(starting Sidekiq v3.3.1)

Standard

Name Type Description
sidekiq_processed_jobs_total counter The total number of processed jobs
sidekiq_failed_jobs_total counter The total number of failed jobs
sidekiq_workers gauge The number of workers across all the processes
sidekiq_processes gauge The number of processes
sidekiq_busy_workers gauge The number of workers performing the job
sidekiq_enqueued_jobs gauge The number of enqueued jobs
sidekiq_scheduled_jobs gauge The number of jobs scheduled for a future execution
sidekiq_retry_jobs gauge The number of jobs scheduled for the next try
sidekiq_dead_jobs gauge The number of jobs being dead
sidekiq_queue_latency_seconds gauge The number of seconds between oldest job being pushed to the queue and current time (labels: name)
sidekiq_queue_max_processing_time_seconds gauge The number of seconds between oldest job of the queue being executed and current time (labels: name)
sidekiq_queue_enqueued_jobs gauge The number of enqueued jobs in the queue (labels: name)
Click to expand for all available contribs

Scheduler

Name Type Description
sidekiq_scheduler_jobs gauge The number of recurring jobs
sidekiq_scheduler_enabled_jobs gauge The number of enabled recurring jobs
sidekiq_scheduler_time_since_last_run_minutes gauge The number of minutes since the last recurring job was executed and current time (labels: name)

Cron

Name Type Description
sidekiq_cron_jobs gauge The number of cron jobs

Installation

Add this line to your application's Gemfile:

gem 'sidekiq-prometheus-exporter', '~> 0.1'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sidekiq-prometheus-exporter -v '~> 0.1'

Rack application

For a fresh new application to expose metrics create config.ru file with next code inside

require 'sidekiq'
require 'sidekiq/prometheus/exporter'

Sidekiq.configure_client do |config|
  config.redis = {url: 'redis://<your-redis-host>:6379/0'}
end

run Sidekiq::Prometheus::Exporter.to_app

Use your favorite server to start it up, like this

$ bundle exec rackup -p9292 -o0.0.0.0

and then curl https://0.0.0.0:9292/metrics

Rails application

When you have rails application, it's possible to mount exporter as a rack application in your routes.rb

Rails.application.routes.draw do
  # ... omitted ...

  # For more information please check here
  # https://api.rubyonrails.org/v5.1/classes/ActionDispatch/Routing/Mapper/Base.html#method-i-mount
  require 'sidekiq/prometheus/exporter'
  mount Sidekiq::Prometheus::Exporter => '/metrics'
end

Use rails server from bin folder to start it up, like this

$ ./bin/rails s -p 9292 -b 0.0.0.0

and then curl https://0.0.0.0:9292/metrics

Sidekiq Web (extream)

If you are ok with metrics being exposed via Sidekiq web dashboard because you have it inside your private network or only Prometheus scraper will have access to a machine/port/etc, then add a few lines into your web config.ru

require 'sidekiq/web'
require 'sidekiq/prometheus/exporter'

Sidekiq::Web.register(Sidekiq::Prometheus::Exporter)

and then curl https://<your-sidekiq-web-uri>/metrics

Docker

If we are talking about isolation you can run already prepared official rack application in the Docker container by using the public image (check out this README for more)

$ docker run -it --rm \
             -p 9292:9292 \
             -e REDIS_URL=redis://<your-redis-host>:6379/0 \
             strech/sidekiq-prometheus-exporter

and then curl https://0.0.0.0:9292/metrics

Helm

And finally the cloud solution (who don't these days). Easy to install, easy to use. A fully-functioning Helm-package based on official Docker image, comes with lots of configuration options

$ helm repo add strech https://strech.github.io/sidekiq-prometheus-exporter
"strech" has been added to your repositories

$ helm install strech/sidekiq-prometheus-exporter --name sidekiq-metrics

to curl your metrics, please follow the post-installation guide

Tips&Tricks

If you want to see at the exporter startup time a banner about which exporters are enabled add this call to your config.ru (but after exporter configure statement)

require 'sidekiq/prometheus/exporter'

puts Sidekiq::Prometheus::Exporter.banner

💢 if you don't see your banner try to output into STDERR instead of STDOUT

Sidekiq Contribs

By default we try to detect as many as possible sidekiq contribs and add their metrics to the output. But you can change this behaviour by configuring exporters setting

require 'sidekiq/prometheus/exporter'

# Keep the default auto-detect behaviour
Sidekiq::Prometheus::Exporter.configure do |config|
  config.exporters = :auto_detect
end

# Keep only standard (by default) and cron metrics
Sidekiq::Prometheus::Exporter.configure do |config|
  config.exporters = %i(cron)
end

💡 if you did't find the contrib you would like to see, don't hesitate to open an issue and describe what do you think we should export.

Contributing

Bug reports and pull requests to support earlier versions of Sidekiq are welcome on GitHub at https://github.com/Strech/sidekiq-prometheus-exporter/issues.

If you are missing your favourite Sidekiq contrib and want to contribute, please make sure that you are following naming conventions from Prometheus.

License

Please see LICENSE for licensing details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].