dmlua - passes received observations to Lua function
dmlua --help
dmlua --version
dmlua --node id --script file [--procedure name] [--name name] [--logger name] [--debug] [--verbose]
dmlua --config file [--name name]
The dmlua program runs a custom Lua script to process observations received
from POSIX message queue. Each observation is passed as a Lua table to the
Lua function of the name given in option procedure
. The function name
process
is assumed by default. The function must return the (modified)
observation table on exit.
The observation returned from the Lua function will be forwarded to the next specified receiver or discarded if no receivers are left.
The Lua script file will be executed after loading. Any code outside of the Lua function will be evaluated once to allow an (optional) initialisation of the script.
- --config, -c file
-
File path to the optional configuration file.
- --debug, -D
-
Forward logs messages of level
LL_DEBUG
via IPC (if logger is set). - --help, -h
-
Output available command-line arguments and quit.
- --logger, -l name
-
Name of logger. If set, sends logs to dmlogger(1) process of given name.
- --name, -n name
-
Name of program instance and configuration (default is
dmlua
). - --node, -N id
-
Node id.
- --procedure, -p name
-
Lua function name (default is
process
). - --script, -s file
-
Path to Lua script file.
- --verbose, -V
-
Print log messages to stderr.
- --version, -v
-
Output version information and quit.
Wait for an observation on POSIX message queue /dmlua
, pass it as Lua table
observ
to function process(observ)
in script.lua
, then forward the result
to the next receiver:
$ dmlua --name dmlua --node dummy-node --script script.lua
Project web site: https://www.dabamos.de/