Class: Karafka::Web::Ui::Models::Status::Checks::LiveReporting

Inherits:
Base
  • Object
show all
Defined in:
lib/karafka/web/ui/models/status/checks/live_reporting.rb

Overview

Checks if there is at least one active Karafka server reporting to the Web UI.

If no processes are reporting, the Web UI won’t have any data to display. This is a critical check for ensuring the system is actually being monitored.

Instance Method Summary collapse

Methods inherited from Base

depends_on, halted_details, independent!, independent?, #initialize

Constructor Details

This class inherits a constructor from Karafka::Web::Ui::Models::Status::Checks::Base

Instance Method Details

#callStatus::Step

Executes the live reporting check.

Verifies that there is at least one process in the list.

Returns:

  • (Status::Step)

    success if processes exist, failure if empty



21
22
23
24
# File 'lib/karafka/web/ui/models/status/checks/live_reporting.rb', line 21

def call
  status = context.processes.empty? ? :failure : :success
  step(status)
end