trait AlarmAdminService extends SeverityService with MetadataService with HealthService with StatusService
An AlarmAdminService interface to update and query alarms. All operations are non-blocking.
- Alphabetic
- By Inheritance
- AlarmAdminService
- StatusService
- HealthService
- MetadataService
- SeverityService
- AlarmService
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def acknowledge(alarmKey: AlarmKey): Future[Done]
Sets acknowledgement status to acknowledged
Sets acknowledgement status to acknowledged
- alarmKey
represents a unique alarm in alarm store
- returns
a future which completes alarm is acknowledged successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- StatusService
- abstract def getAggregatedHealth(key: Key): Future[AlarmHealth]
Gets the aggregated health which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system
Gets the aggregated health which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system
- key
represents an alarm, component, subsystem or system
- returns
a future which completes with aggregated health or fails with csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException
- Definition Classes
- HealthService
- abstract def getAggregatedSeverity(key: Key): Future[FullAlarmSeverity]
Gets the aggregated severity which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system
Gets the aggregated severity which is calculated based on the worst severity amongst all active alarms for the given alarm/component/subsystem/system
- key
represents an alarm, component, subsystem or system
- returns
a future which completes with aggregated severity or fails with csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException
- Definition Classes
- SeverityService
- abstract def getCurrentSeverity(alarmKey: AlarmKey): Future[FullAlarmSeverity]
Fetches the severity of the given alarm from the alarm store
Fetches the severity of the given alarm from the alarm store
- alarmKey
represents a unique alarm in alarm store
- returns
a future which completes with the alarm severity or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- SeverityService
- abstract def getMetadata(key: Key): Future[List[AlarmMetadata]]
Fetches the metadata of all alarms which belong to the given component/subsystem/system
Fetches the metadata of all alarms which belong to the given component/subsystem/system
- key
represents component, subsystem or system
- returns
a future which completes with the list of metadata for the given key or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- MetadataService
- abstract def getMetadata(alarmKey: AlarmKey): Future[AlarmMetadata]
Fetches the metadata for the given alarm
Fetches the metadata for the given alarm
- alarmKey
represents a unique alarm in alarm store
- returns
a future which completes with metadata or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- MetadataService
- abstract def getStatus(alarmKey: AlarmKey): Future[AlarmStatus]
Fetches the status for the given alarm
Fetches the status for the given alarm
- alarmKey
represents a unique alarm in alarm store
- returns
a future which completes with status or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- StatusService
- abstract def initAlarms(inputConfig: Config, reset: Boolean = false): Future[Done]
Loads data for all alarms in alarm store i.e.
Loads data for all alarms in alarm store i.e. metadata of alarms for e.g. subsystem, component, name, etc. and status of alarms for e.g. acknowledgement status, latch status, etc.
- inputConfig
represents the data for all alarms to be loaded in alarm store
- reset
the alarm store before loading the data
- returns
a future which completes when data is loaded successfully in alarm store or fails with csw.alarm.api.exceptions.ConfigParseException
- Definition Classes
- MetadataService
- Note
severity of the alarm is not loaded in store and is by default inferred as Disconnected until component starts updating severity
- See also
csw.alarm.models.AlarmMetadata, csw.alarm.models.AlarmStatus
- abstract def latchToDisconnected(alarmKey: AlarmKey, currentSeverity: FullAlarmSeverity): Future[Done]
Latches the severity to Disconnected.
Latches the severity to Disconnected. Also updates the time to current time if alarm was not already latched to disconnected. Also, updates the acknowledgement status if required.
- alarmKey
Key of the alarm which needs to be latched to Disconnected status
- currentSeverity
current heartbeat severity of the alarm
- Definition Classes
- StatusService
- Note
This method is expected to be called from alarm server when it receives removed event for any alarm
- abstract def reset(alarmKey: AlarmKey): Future[Done]
Sets the latched severity to current severity and acknowledgement status to acknowledged for the given alarm
Sets the latched severity to current severity and acknowledgement status to acknowledged for the given alarm
- alarmKey
represents a unique alarm in alarm store
- returns
a future which completes when alarm is reset successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- StatusService
- abstract def setSeverity(key: AlarmKey, severity: AlarmSeverity): Future[Done]
Sets the severity of an alarm.
Sets the severity of an alarm. It also internally updates the latch severity and acknowledgement status. The severity is set in alarm store with a specific TTL (time to live). After the time passes for TTL, the severity will be automatically inferred as
Disconnected
.- key
represents a unique alarm in alarm store e.g nfiraos.trombone.tromboneaxislowlimitalarm
- severity
represents the severity to be set for the alarm e.g. Okay, Warning, Major, Critical, etc
- returns
a CompletableFuture which completes when the severity is successfully set in alarm store or fails with csw.alarm.api.exceptions.InvalidSeverityException or csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- AlarmService
- Note
By default all alarms are loaded in alarm store as
Disconnected
. Once the component is up and working, it will be it's responsibility to update all it's alarms with appropriate severity and keep refreshing it.
- abstract def shelve(alarmKey: AlarmKey): Future[Done]
Sets the shelve status of the given alarm to shelved
Sets the shelve status of the given alarm to shelved
- alarmKey
represents a unique alarm in alarm store
- returns
a future which completes when alarm is shelved successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- StatusService
- Note
alarms that are shelved will automatically be unshelved at a specific time (currently configured at 8 AM local time) if not done explicitly. This time is configurable e.g csw-alarm.shelve-timeout = h:m:s a . Also, shelved alarms are considered in aggregation of the severity and health.
- abstract def subscribeAggregatedHealthActorRef(key: Key, actorRef: ActorRef[AlarmHealth]): AlarmSubscription
Calculates the aggregated health for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes
Calculates the aggregated health for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes
- key
represents an alarm, component, subsystem or system
- actorRef
receives the latest worst health
- returns
alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException
- Definition Classes
- HealthService
- Note
aggregated health is worst amongst all active alarms for given key
- abstract def subscribeAggregatedHealthCallback(key: Key, callback: (AlarmHealth) => Unit): AlarmSubscription
Calculates the aggregated health for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes
Calculates the aggregated health for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes
- key
represents an alarm, component, subsystem or system
- callback
executed with the latest worst health
- returns
alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException
- Definition Classes
- HealthService
- Note
Callbacks are not thread-safe on the JVM. If you need to do side effects/mutations, prefer using subscribeAggregatedHealthActorRef API.
,aggregated health is worst amongst all active alarms for given key
- abstract def subscribeAggregatedSeverityActorRef(key: Key, actorRef: ActorRef[FullAlarmSeverity]): AlarmSubscription
Calculates the aggregated severity for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes
Calculates the aggregated severity for the given alarm/component/subsystem/system and sends to the give actor each time the aggregation changes
- key
represents an alarm, component, subsystem or system
- actorRef
receives the latest worst severity
- returns
alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException
- Definition Classes
- SeverityService
- Note
aggregated severity is worst amongst all active alarms for given key
- abstract def subscribeAggregatedSeverityCallback(key: Key, callback: (FullAlarmSeverity) => Unit): AlarmSubscription
Calculates the aggregated severity for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes
Calculates the aggregated severity for the given alarm/component/subsystem/system and executes the callback each time the aggregation changes
- key
represents an alarm, component, subsystem or system
- callback
executed with the latest worst severity
- returns
alarm subscription which can be used to unsubscribe or check if subscription is ready to be consumed. The method can also throw csw.alarm.api.exceptions.KeyNotFoundException or csw.alarm.api.exceptions.InactiveAlarmException
- Definition Classes
- SeverityService
- Note
Callbacks are not thread-safe on the JVM. If you need to do side effects/mutations, prefer using subscribeAggregatedSeverityActorRef API.
,aggregated severity is worst amongst all active alarms for given key
- abstract def unshelve(alarmKey: AlarmKey): Future[Done]
Sets the shelve status of the given alarm to unshelved
Sets the shelve status of the given alarm to unshelved
- alarmKey
represents a unique alarm in alarm store
- returns
a future which completes when the alarm is unshelved successfully or fails with csw.alarm.api.exceptions.KeyNotFoundException
- Definition Classes
- StatusService
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])