Skip to content

An alarm system built on Kafka that supports pluggable sources

License

Notifications You must be signed in to change notification settings

JeffersonLab/jaws

Repository files navigation

JLab Alarm Warning System (JAWS)

"Don't get bit!"

An alarm system built on Kafka that supports pluggable alarm sources. This project integrates all the services that make up JAWS via Docker Compose. JAWS attempts to comply with ANSI/ISA 18.2-2016 where appropriate.



Overview

The JAWS alarm system is composed primarily of two subsystems: registrations and notifications.

The inventory of all possible alarms (the master alarm database) is stored in Kafka as alarm instances, and these instances are organized into classes so that some properties are provided by their assigned alarm class. The alarm instances are maintained on the alarm-instances topic. Alarm classes define group-shared properties such as corrective action and rationale and are persisted on the alarm-classes topic. The JAWS effective processor joins classes to instances to form effective alarm registrations on the effective-registrations topic.

Activations indicate an alarm is annunciating (active), and timely operator action is required. Alarms are triggered active by producing messages on the alarm-activations topic. An alarm can be overridden to either suppress or incite the active state by placing a message on the alarm-overrides topic. The effective notification state considering both activations and overrides is calculated by JAWS from activations and overrides and made available on the effective-notifications topic.

Both effective registrations and effective notifications are combined by the JAWS effective processor on the effective-alarms topic.

Apps

  • jaws-effective-processor: Process classes and overrides and provide effective state on the effective-registrations, effective-notifications, and effective-alarms topics
  • jaws-admin-gui: GUI for managing alarm registrations
  • jaws-operator-gui: GUI for monitoring alarms and managing overrides

APIs

  • jaws-libj: Java API library for JAWS
  • jaws-libp: Python API library for JAWS including Kafka topic and Registry schema setup

Data

Extensions

Quick Start with Compose

  1. Grab project
git clone https://github.com/JeffersonLab/jaws
cd jaws
  1. Launch Compose
docker compose up
  1. Monitor active alarms
docker exec -it cli list_activations --monitor
  1. Trip an alarm
docker exec cli set_activation alarm1

Note: The docker-compose services require significant system resources - tested with 4 CPUs and 4GB memory.

See: More Usage Examples

Install

The core JAWS application consists of a set of containerized microservices which can be launched with a container orchestration tool such as Docker Compose. The following microservices are internal to JAWS:

  • Kafka
  • Schema Registry
  • Effective Processor
  • CLI Admin Console

Optionally, the following extra containerized services are available:

  • Web Admin Console
  • JAWS EPICS Services

There are external services required to be available for the Web Admin Console and EPICS Services that can be optionally containerized as well, but at JLab we use separately managed shared instances. You can launch a fully containerized version of JAWS which includes containerized external dependencies in the web admin project and epics2kafka project. These external services include:

  • Keycloak
  • Oracle RDMS
  • EPICS IOCs

The core JAWS system supports import and export of data from files. The optional Web Admin Console adds support for loading and saving from an Oracle database.

Release

Bump the version number in the jaws-version.env file and commit and push to GitHub (using Semantic Versioning). The release GitHub Action should run automatically to tag the source and create release notes summarizing any pull requests. Edit the release notes to add any missing details.

There is no code in this repo, only configuration. The primary versioned artifact of this project is a service-versions.env file that accompanies a set of Docker Compose files which answer the question of which version of each microservice to use together.

Note: You can fetch a specific tagged version by replacing main with a semver tag in the URLs above.

Deploy

At JLab this app is found at ace.jlab.org/jaws and internally at acctest.acc.jlab.org/jaws. However, those servers are proxies for jaws.acc.jlab.org and jawstest.acc.jlab.org respectively. A deploy script is provided on each server to automate wget and deploy. Example:

/opt/jaws/deploy.sh v1.2.3

See: JLab internal docs

See Also