Class: SidekiqMonitoring
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- SidekiqMonitoring
- Defined in:
- lib/sidekiq-monitoring.rb
Defined Under Namespace
Modules: StatusMixin Classes: Global, Queue, Worker
Constant Summary collapse
- VERSION =
"1.3.3"
- STATUS_LIST =
{ 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 }
- @@queue_size_thresholds =
{}
- @@latency_thresholds =
{}
- @@elapsed_thresholds =
{}
Class Method Summary collapse
-
.elapsed_thresholds=(elapsed_thresholds) ⇒ Object
NOTE: « elapsed_thresholds » are the thresholds about the elapsed time of a job in a queue (while processing).
-
.latency_thresholds=(latency_thresholds) ⇒ Object
NOTE: « latency_thresholds » are the thresholds about the latency, difference of time between job pushed/enqueued (field ‘enqueued_at’) and job pulled/processed by the queue.
-
.queue_size_thresholds=(queue_size_thresholds) ⇒ Object
Set your down thresholds configuration {‘default’ => [ 1_000, 2_000 ], ‘low’ => [ 10_000, 20_000 ] }.
Class Method Details
.elapsed_thresholds=(elapsed_thresholds) ⇒ Object
NOTE: « elapsed_thresholds » are the thresholds about the elapsed time of a job in a queue (while processing)
23 24 25 |
# File 'lib/sidekiq-monitoring.rb', line 23 def self.elapsed_thresholds=(elapsed_thresholds) @@elapsed_thresholds = elapsed_thresholds end |
.latency_thresholds=(latency_thresholds) ⇒ Object
NOTE: « latency_thresholds » are the thresholds about the latency, difference of time between job pushed/enqueued (field ‘enqueued_at’) and job pulled/processed by the queue
17 18 19 |
# File 'lib/sidekiq-monitoring.rb', line 17 def self.latency_thresholds=(latency_thresholds) @@latency_thresholds = latency_thresholds end |
.queue_size_thresholds=(queue_size_thresholds) ⇒ Object
Set your down thresholds configuration {‘default’ => [ 1_000, 2_000 ], ‘low’ => [ 10_000, 20_000 ] }
NOTE: « queue_size_thresholds » are the thresholds about the number of job in a queue
10 11 12 |
# File 'lib/sidekiq-monitoring.rb', line 10 def self.queue_size_thresholds=(queue_size_thresholds) @queue_size_thresholds = queue_size_thresholds end |