llama dev log lvalert

Extract LVAlert message JSON from lvalert_listen log files. Reads the log file contents from STDIN and writes the JSON packets to STDOUT as a pretty-printed JSON list of message objects. Errors are logged to STDERR. Keeps reading from STDIN, so in principle you can do something like tail -f lvalert_listen.log to keep track of new messages in real-time (while also logging them).

usage: llama dev log lvalert [-h] [-s SCRIPT]

Named Arguments

-s, --script
A script that should be used as an LVAlert handler for all well-defined LVALerts found in the log read in from STDIN. The LVAlert Node will be passed as the first command line argument to this script; the FAR (False Alarm Rate) will be passed as the second argument. The LVAlert JSON payload will be passed to this script through STDIN. If this argument is provided, then nothing will be printed to STDOUT, and instead, the script defined in this argument will be invoked once in the described manner for each parsed LVAlert. Only one instance of the script runs at a time. STDOUT and STDERR from the invoked scripts will be forwarded to STDOUT and STDERR for this calling script.