Manage igwn-alerts for DQR
Project description
DQRAlert
DQRAlert listens for igwn-alert messages from GraceDB and launches an external processing command (such as the DQR task manager) when an appropriate gravitational-wave candidate alert is received.
Overview
When GraceDB issues a superevent alert, DQRAlert:
- Receives the alert payload via the IGWN Kafka/hop-client infrastructure
- Filters it by alert type and false-alarm rate (FAR)
- Writes the event JSON to a configured output directory
- Optionally saves all received alerts (including filtered ones) to a separate archive directory
- Launches a user-supplied shell command to process the accepted event
Installation
pip install dqralert
Quick Start
1. Set up SCIMMA / hop credentials
hop auth add
# follow the prompts to enter your SCIMMA username and password
Verify the connection:
igwn-alert topics
2. Create a configuration file
[alerts]
# Kafka topic(s) to subscribe to (space-separated)
topics = mdc_superevent
# GraceDB server group: gracedb (production), gracedb-playground, gracedb-test
group = gracedb-playground
# Alert types to process (space-separated); omit or set to 'any' for all
type = new
# False-alarm rate threshold [Hz] — alerts with FAR above this are ignored
max_far = 1.57e-5
# Directory to write the accepted event JSON payload
json_dir = /path/to/json
# Command to run for each accepted alert
# Variables: ${json} = path to the JSON file, ${graceid} = GraceDB S-event ID
run = /path/to/my-processing-script.sh ${json} ${graceid}
# Maximum runtime [seconds] for the processing command
timeout = 1800
# Optional: save ALL received alerts (including filtered ones) here
# saveall_dir = /path/to/archive
3. Run the listener
dqralert -v -c /path/to/dqr-alert.ini -l /path/to/dqralert.log
Command-Line Reference
usage: dqralert [-h] [-v] [-V] [-q] [-u USER] [-c CONFIG] [-l LOG_FILE] [-f] [--memstat MEMSTAT]
Accept an igwn-alert, call dqr-create-dag
options:
-h, --help show this help message and exit
-v, --verbose increase verbose output (repeat for more detail)
-V, --version show program's version number and exit
-q, --quiet show only fatal errors
-u USER, --user USER igwn-alert username
-c CONFIG, --config CONFIG
path to configuration file
-l LOG_FILE, --log-file LOG_FILE
save log messages to this file
-f, --full-payload store the full alert payload (default: store only the
'object' field, compatible with a GraceDB query)
--memstat MEMSTAT record memory statistics to this file
dqralert-latency
A utility to compute processing latencies from saved event JSON files:
dqralert-latency event1.json event2.json ...
Prints a CSV table with the GraceDB ID, event time, superevent creation time, and the time the JSON file was written.
Configuration Reference
| Key | Default | Description |
|---|---|---|
topics |
(required) | Space-separated list of Kafka topics to subscribe to |
group |
gracedb |
GraceDB server group (gracedb, gracedb-playground, gracedb-test) |
type |
any |
Space-separated alert types to process (e.g. new signoff_created); any processes all |
max_far |
1 |
Maximum false-alarm rate [Hz]; alerts above this threshold are ignored |
json_dir |
(required) | Directory to write accepted event JSON payloads |
run |
(none) | Shell command to execute for each accepted alert |
timeout |
600 |
Maximum runtime [seconds] for the processing command |
saveall_dir |
(none) | Directory to archive all received alerts (including filtered ones) |
save_list |
any |
Alert types to save in saveall_dir; any saves all |
save_ignore |
(none) | Alert types to exclude from saveall_dir (e.g. log) |
refresh_alert_counters |
(disabled) | Print alert rate statistics every N seconds |
License
DQRAlert is distributed under the GNU General Public License v3 or later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dqralert-0.5.0.tar.gz.
File metadata
- Download URL: dqralert-0.5.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dd7eeacdb710d6023205700e462c583631d9286faef4c1dfebbc5553faa9fa7
|
|
| MD5 |
f8971912663ac02d0c4de8cd3422bdd0
|
|
| BLAKE2b-256 |
1fecd53f31277a2219666dd050e158ce447d11f2ef8eaaf4b51c8516036d033b
|
File details
Details for the file dqralert-0.5.0-py3-none-any.whl.
File metadata
- Download URL: dqralert-0.5.0-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb7a53e48fd6fa97f5cdeb2675ac043ada53772b75a505ea6cf94bf9eee651a0
|
|
| MD5 |
358ea825aabbede1253624ef26b3a139
|
|
| BLAKE2b-256 |
fbb327947a6fe519a690b04dffb4ca6219924ccf3a251756708a2daa3255aa1b
|