lib/sidekiq/prometheus/exporter/templates/standard.erb in sidekiq-prometheus-exporter-0.1.15 vs lib/sidekiq/prometheus/exporter/templates/standard.erb in sidekiq-prometheus-exporter-0.1.16
- old
+ new
@@ -6,11 +6,11 @@
# TYPE sidekiq_failed_jobs_total counter
sidekiq_failed_jobs_total <%= format('%d', @overview_stats.failed) %>
# HELP sidekiq_workers The number of workers across all the processes.
# TYPE sidekiq_workers gauge
-sidekiq_workers <%= format('%d', @total_workers) %>
+sidekiq_workers <%= format('%d', @workers_stats.total_workers) %>
# HELP sidekiq_processes The number of processes.
# TYPE sidekiq_processes gauge
sidekiq_processes <%= format('%d', @overview_stats.processes_size) %>
@@ -43,6 +43,18 @@
<% @queues_stats.each do |queue| %>sidekiq_queue_enqueued_jobs{name="<%= queue.name %>"} <%= format('%d', queue.size) %>
<% end %>
# HELP sidekiq_queue_max_processing_time_seconds The number of seconds between oldest job of the queue being executed and current time.
# TYPE sidekiq_queue_max_processing_time_seconds gauge
<% @max_processing_times.each do |queue, max_processing_time| %>sidekiq_queue_max_processing_time_seconds{name="<%= queue %>"} <%= format('%i', max_processing_time) %>
+<% end %>
+# HELP sidekiq_queue_workers The number of workers serving the queue.
+# TYPE sidekiq_queue_workers gauge
+<% @workers_stats.by_queue.each do |queue, stats| %>sidekiq_queue_workers{name="<%= queue %>"} <%= format('%i', stats.total_workers) %>
+<% end %>
+# HELP sidekiq_queue_processes The number of processes serving the queue.
+# TYPE sidekiq_queue_processes gauge
+<% @workers_stats.by_queue.each do |queue, stats| %>sidekiq_queue_processes{name="<%= queue %>"} <%= format('%i', stats.processes) %>
+<% end %>
+# HELP sidekiq_queue_busy_workers The number of workers performing the job for the queue.
+# TYPE sidekiq_queue_busy_workers gauge
+<% @workers_stats.by_queue.each do |queue, stats| %>sidekiq_queue_busy_workers{name="<%= queue %>"} <%= format('%i', stats.busy_workers) %>
<% end %>