HbMonitor

org.eso.ias.monitor.HbMonitor
See theHbMonitor companion object
class HbMonitor(val hbConsumer: HbKafkaConsumer, val pluginIds: Set[String], val converterIds: Set[String], val clientIds: Set[String], val sinkIds: Set[String], val supervisorIds: Set[String], val coreToolIds: Set[String], val threshold: Long, val pluginsAlarmPriority: Alarm, val convertersAlarmPriority: Alarm, val clientsAlarmPriority: Alarm, val sinksAlarmPriority: Alarm, val supervisorsAlarmPriority: Alarm, val coreToolAlarmPriority: Alarm) extends HbListener, Runnable

Monitors the HBs of

  • plugins
  • converters
  • clients
  • sink connectors (Kafka connectors does not publish HBs)
  • supervisor

HbMonitor gets the HBs using a HB consumer and checks the time when they have been produced and received against the passed threshold to generate alarms.

A different alarm is generated depending on the type of the missing HB: the IDs of the missing HBs are passed ass properties

When a HB is received, an entry is updated in the relative map. A thread runs periodically to check if all the HBs have been received and, if any of them is missing, sets an alarm. The entry in the map is a boolean used as a watch dog: the thread periodically resets the watch dog and checks if some of the boolean have not been set.

Notification of alarms is done indirectly by setting the state of the alarm in the MonitorAlarm.

TODO: at the present, the copnverters do not publish a fullRunnibngId but their plain ID this needs to be changed when #145 will be fixed

Value parameters

clientIds

The IDs of the clients whose IDs must be monitored

clientsAlarmPriority

the priority of the alarm for faulty clients

converterIds

The IDs of the converters whose IDs must be monitored

convertersAlarmPriority

the priority of the alarm for faulty converters

coreToolIds

The IDs of the IAS core tools whose IDs must be monitored

hbConsumer

The consumer of HBs

pluginIds

The IDs of the plugins whose IDs must be monitored

pluginsAlarmPriority

the priority of the alarm for faulty plugins

sinkIds

The IDs of the sink connectors whose IDs must be monitored Kafka sink connectors does not publish HBs and must be monitored elsewhere; however the IAs has sink conenctors like the email sender that publishes HBs

sinksAlarmPriority

the priority of the alarm for faulty sink connectors

supervisorIds

The IDs of the supervisors whose IDs must be monitored

supervisorsAlarmPriority

the priority of the alarm for faulty supervisors

threshold

An alarm is emitted if the HB has not been received before the threshold elapses (in seconds)

Attributes

Companion
object
Graph
Supertypes
trait Runnable
trait HbListener
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def hbReceived(hbMsg: HbMsg): Unit

An heartbeat has been consumed from the HB topic

An heartbeat has been consumed from the HB topic

Value parameters

hbMsg

The HB consumed from the HB topic

Attributes

Definition Classes
override def run(): Unit

The thread that periodically checks for missing HBs

The thread that periodically checks for missing HBs

Attributes

Definition Classes
Runnable
def shutdown(): Unit
def start(): Unit

Concrete fields

val clientIds: Set[String]
val converterIds: Set[String]
val coreToolIds: Set[String]
val pluginIds: Set[String]
val sinkIds: Set[String]
val sinksAlarmPriority: Alarm
val supervisorIds: Set[String]
val threshold: Long