Size: 3912
Comment:
|
← Revision 84 as of 2025-07-22 15:29:54 ⇥
Size: 5469
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
* [[https://git.ligo.org/lscsoft/lvalert/-/tree/master|LValert]] is The LIGO-Virgo Alert System (LVAlert) * a prototype notification service built on the xmpp (jabber) protocol and the pubsub extension. * It provides a basic notification tool which allows multiple producers and consumers of notifications. |
* LIGO-Virgo Alert System (LVAlert) [[https://git.ligo.org/lscsoft/igwn-alert|igwn-alert(old repo)]] [[https://git.ligo.org/computing/igwn-alert/client|igwn-alert(git)]] * The International Gravitational Wave Network Alert System (igwn-alert) is a notification service built on the Apache Kafka protocol and the pubsub extension. * It is a higher-level modification of SCIMMA's hop-client to streamline receiving and responding to alerts from GraceDB. * This package replaces the legacy LIGO LVAlert XMPP-based alert system. * The API are compatible with Python 3 * Retirement of existing LVAlert service targeted for ~April 2022. * In O4, we will use igwn-alert. |
Line 7: | Line 11: |
* We can't install lvalert by [[https://computing.docs.ligo.org/conda/environments/igwn-py37/|igwn]] on conda environment. (see [[https://git.ligo.org/lscsoft/lvalert/-/issues/19|lvalert_admin broken on both conda igwn-py2 and igwn-py37 environments]]) * because lvalert depends on legacy package (`pyxmpp`) * To install lvalert on python2, |
* The latest version is 0.7.0 (2025/07/22) |
Line 11: | Line 13: |
sudo apt install python-ligo-lvalert | conda install igwn-alert==0.7.0 |
Line 14: | Line 16: |
== Setting in advance == * see [[https://gracedb.ligo.org/documentation/responding_to_lvalert.html|this document]] |
|
Line 18: | Line 17: |
* visit [[https://lvalert-test.cgca.uwm.edu]] and activate your account. | * help {{{ % igwn-alert -h usage: igwn-alert [-h] [--no-auth] [-g GROUP] [-c CONSUMER_GROUP] [-j] [-l {critical,error,warning,info,debug}] [-n NETRC] [-p PORT] [-r] [-s SERVER] [-t LISTEN_RETRIES] [-u USERNAME] [-w RETRY_WAIT] [-V] {listen,subscriptions,topics,unsubscribe,send} ... |
Line 20: | Line 24: |
* prepare `$HOME/.netrc` * albert.einstein should be your KAGRA account. * `PASSWORD` should be the password you set at Account Activation site. |
positional arguments: {listen,subscriptions,topics,unsubscribe,send} sub-command help listen Listen for igwn-alert messages and print them to stdout. subscriptions List your subscriptions topics List available pubsub topics unsubscribe Unsubscribe from one or more topics send publish contents of a file to a pubsub topic options: -h, --help show this help message and exit --no-auth If set, disable authentication. -g GROUP, --group GROUP GraceDB group name (e.g., gracedb, gracedb-playground) -c CONSUMER_GROUP, --consumer-group CONSUMER_GROUP Consumer group ID to use for consuming messages across sessions -j, --jsonpp Output pretty print json -l {critical,error,warning,info,debug}, --log {critical,error,warning,info,debug} Log level -n NETRC, --netrc NETRC netrc file (default: read from NETRC environment variable or ~/.netrc) -p PORT, --port PORT igwn-alert server port -r, --retry-on-fatal reconnect listener on fatal exceptions -s SERVER, --server SERVER igwn-alert server hostname -t LISTEN_RETRIES, --listen_retries LISTEN_RETRIES fatal reconnect retry attempts -u USERNAME, --username USERNAME User name (default: look up in auth.toml or .netrc) -w RETRY_WAIT, --retry_wait RETRY_WAIT fatal reconnect retry attempts -V, --version show program's version number and exit }}} == Setting in advance on web == * The authentification between the client and the server is managed by SciMMA. * The first step is to make a SCiMMa account by visiting [[https://my.hop.scimma.org/|https://my.hop.scimma.org/]]. * At this time, access to igwn-alert is limited to LIGO, Virgo, or KAGRA members. * After log-in [[https://my.hop.scimma.org/|https://my.hop.scimma.org/]], by clicking {{{Hopskotch}}} and {{{Create new credentials}}}, the password for your account will be shown just once. == Adding Authentication in local == * Run the {{{hop}}} command and enter the username and the password. * Empty Hostname is fine. {{{ hop auth add }}} * Once you entered, the authentification credential is stored in {{{~/.config/hop/auth.toml}}} . * Note that in the authentification credential is connected to conda environment. You can see the environment name in {{{~/.config/hop/auth.toml}}}. * If you make new conda environment, you should run {{{ hop auth add --force }}} == Usage in local == * Initially, no topic (you can consider channel) is registered to your account. * From [[https://my.hop.scimma.org/|https://my.hop.scimma.org/]], please add channel (they call `Add permission`). * This doesn't show anything. |
Line 25: | Line 88: |
$ echo 'machine lvalert.cgca.uwm.edu login albert.einstein password PASSWORD' >> ~/.netrc $ echo 'machine lvalert-playground.cgca.uwm.edu login albert.einstein password PASSWORD' >> ~/.netrc $ echo 'machine lvalert-test.cgca.uwm.edu login albert.einstein password PASSWORD' >> ~/.netrc $ chmod 0600 ~/.netrc |
% igwn-alert topics Topics for group gracedb associated with the current credential: |
Line 31: | Line 92: |
== Usage of lvalert_admin == | == Receive alert from MDC (Mock Data Challenge) analysis == * Follow [[https://o4-dqr.docs.ligo.org/o4-dqr-configuration/#setting-up-igwn-alert-to-test-taskmanager|instruction by Joe]]. |
Line 33: | Line 95: |
* get a list of existing nodes | * If you set up properly, check the topics which you are subscribing. |
Line 35: | Line 97: |
$ lvalert_admin -s lvalert-playground.cgca.uwm.edu --get-nodes | % igwn-alert --group gracedb-playground topics Topics for group gracedb-playground associated with the current credential: mdc_superevent cbc_pycbc |
Line 38: | Line 104: |
* create a test node | * Launch the igwn-alert |
Line 40: | Line 106: |
$ lvalert_admin -s lvalert-playground.cgca.uwm.edu --create --node test_k1det Creating node test_k1det Successfully completed operation |
% igwn-alert --g gracedb-playground listen |
Line 45: | Line 109: |
* subscribe a node {{{ $ lvalert_admin -s lvalert-playground.cgca.uwm.edu --subscribe --node test_k1det Successfully subscribed to node test_k1det }}} |
* To see the MDC alert on gracedb (2022/02/09), visit [[https://gracedb-playground.ligo.org/latest/?query=mdc&query_type=S|gracedb-playground]] (Require log-in). |
Line 51: | Line 111: |
* remove a note {{{ $ lvalert_admin -s lvalert-playground.cgca.uwm.edu --delete --node test_k1det }}} |
== Links == |
Line 56: | Line 113: |
* check current subscriptions {{{ $ lvalert_admin -s lvalert-playground.cgca.uwm.edu --subscriptions }}} |
* [[https://git.ligo.org/lscsoft/igwn-alert|git repo, igwn-alert]] * [[https://lscsoft.docs.ligo.org/igwn-alert/|igwn-alert, documentation outlining API]] * [[https://lscsoft.docs.ligo.org/igwn-alert/guide.html|igwn-alert, user guide for how to get started]] |
Line 61: | Line 117: |
* unsubscribe * This works only a node which you created. {{{ $ lvalert_admin --username hirotaka.yuzurihara -s lvalert-playground.cgca.uwm.edu --node "tagoshi-testnode" }}} == Usage of lvalert_listen and lvalert_send == * launch the lvalert_listern * this should run in the background {{{ % lvalert_listen -s lvalert-playground.cgca.uwm.edu -c my_listen.ini -r listener1 & }}} * prepare the dummy alert * the real alert will be sent as JSON format. (But, I don't know the actual keys.) {{{ $ cat test1.txt {"uid": "G12345", "alert_type": "new", "far": 1e-8, "gps_time": 1301640384} $ cat test2.txt {"uid": "G12345", "alert_type": "new", "far": 1e-8} }}} * prepare configuration file * when we got the alert, the following shell script will run. (Note that this shell script can't use option.) * you can see the details of shell script at `/users/yuzu/work/lvalert` in the Kamioka workstation. {{{ $ cat my_listen.ini [test_k1det] executable = ./run_test_k1det.sh }}} * send the test alert * Although test1.txt has gps_time, test2.txt has no gps_time. {{{ $ lvalert_send --username hirotaka.yuzurihara -s lvalert-playground.cgca.uwm.edu -n test_k1det --file test1.txt $ lvalert_send --username hirotaka.yuzurihara -s lvalert-playground.cgca.uwm.edu -n test_k1det --file test2.txt }}} == Related links == |
* [[KAGRA/Subgroups/DET/LVAlert_python2 |LVAlert instruction for python2 (out of date)]] |
Line 111: | Line 121: |
* [[https://git.ligo.org/lscsoft/lvalert| git repository(lvalert)]] * [[https://gwdoc.icrr.u-tokyo.ac.jp/cgi-bin/private/DocDB/ShowDocument?docid=11522|Tagoshi-san's note]] * [[https://lscsoft.docs.ligo.org/lvalert/index.html|document of lvalert (not completed)]] * |
* [[https://git.ligo.org/emfollow/userguide|LIGO/Virgo Public Alerts User Guide (not igwn-alert)]] |
Introduction
LIGO-Virgo Alert System (LVAlert) igwn-alert(old repo) igwn-alert(git)
- The International Gravitational Wave Network Alert System (igwn-alert) is a notification service built on the Apache Kafka protocol and the pubsub extension.
- It is a higher-level modification of SCIMMA's hop-client to streamline receiving and responding to alerts from GraceDB.
- This package replaces the legacy LIGO LVAlert XMPP-based alert system.
- The API are compatible with Python 3
- Retirement of existing LVAlert service targeted for ~April 2022.
- In O4, we will use igwn-alert.
Install
- The latest version is 0.7.0 (2025/07/22)
conda install igwn-alert==0.7.0
- help
% igwn-alert -h usage: igwn-alert [-h] [--no-auth] [-g GROUP] [-c CONSUMER_GROUP] [-j] [-l {critical,error,warning,info,debug}] [-n NETRC] [-p PORT] [-r] [-s SERVER] [-t LISTEN_RETRIES] [-u USERNAME] [-w RETRY_WAIT] [-V] {listen,subscriptions,topics,unsubscribe,send} ... positional arguments: {listen,subscriptions,topics,unsubscribe,send} sub-command help listen Listen for igwn-alert messages and print them to stdout. subscriptions List your subscriptions topics List available pubsub topics unsubscribe Unsubscribe from one or more topics send publish contents of a file to a pubsub topic options: -h, --help show this help message and exit --no-auth If set, disable authentication. -g GROUP, --group GROUP GraceDB group name (e.g., gracedb, gracedb-playground) -c CONSUMER_GROUP, --consumer-group CONSUMER_GROUP Consumer group ID to use for consuming messages across sessions -j, --jsonpp Output pretty print json -l {critical,error,warning,info,debug}, --log {critical,error,warning,info,debug} Log level -n NETRC, --netrc NETRC netrc file (default: read from NETRC environment variable or ~/.netrc) -p PORT, --port PORT igwn-alert server port -r, --retry-on-fatal reconnect listener on fatal exceptions -s SERVER, --server SERVER igwn-alert server hostname -t LISTEN_RETRIES, --listen_retries LISTEN_RETRIES fatal reconnect retry attempts -u USERNAME, --username USERNAME User name (default: look up in auth.toml or .netrc) -w RETRY_WAIT, --retry_wait RETRY_WAIT fatal reconnect retry attempts -V, --version show program's version number and exit
Setting in advance on web
- The authentification between the client and the server is managed by SciMMA.
The first step is to make a SCiMMa account by visiting https://my.hop.scimma.org/.
- At this time, access to igwn-alert is limited to LIGO, Virgo, or KAGRA members.
After log-in https://my.hop.scimma.org/, by clicking Hopskotch and Create new credentials, the password for your account will be shown just once.
Adding Authentication in local
Run the hop command and enter the username and the password.
- Empty Hostname is fine.
hop auth add
Once you entered, the authentification credential is stored in ~/.config/hop/auth.toml .
Note that in the authentification credential is connected to conda environment. You can see the environment name in ~/.config/hop/auth.toml.
- If you make new conda environment, you should run
hop auth add --force
- If you make new conda environment, you should run
Usage in local
- Initially, no topic (you can consider channel) is registered to your account.
From https://my.hop.scimma.org/, please add channel (they call Add permission).
- This doesn't show anything.
% igwn-alert topics Topics for group gracedb associated with the current credential:
Receive alert from MDC (Mock Data Challenge) analysis
Follow instruction by Joe.
- If you set up properly, check the topics which you are subscribing.
% igwn-alert --group gracedb-playground topics Topics for group gracedb-playground associated with the current credential: mdc_superevent cbc_pycbc
- Launch the igwn-alert
% igwn-alert --g gracedb-playground listen
To see the MDC alert on gracedb (2022/02/09), visit gracedb-playground (Require log-in).