goal
The goal is to allow execute some actions on some conditions on module parameters values.
for example, on heavy load problem, set a condition as ( load > 5) , and get the list of process using cpu (command : top)
configuration
key
(internal) name of the action rule, can not be changed.
param
the parameter name, as it appears on graphs in general
differences
For some modules, parameter's names are differents :
netstat
To display the difference between input and output, a _in (or _out) suffix is added to parameter name
disk
To display the difference between bloc and inode data, a _b (or _i) suffix is added to parameter name
partial data
On some others modules, action is not possible on some (or all) parameters. The problem comes from
aquisition processing, with implicit computing (rrd in DERIVE mode), or explicit computing :
firewall
Parameters from rules are in DERIVE mode, so are not available.
irq
All parameters are also in DERIVE mode.
network
All parameters are also in DERIVE mode.
- The in and out are not available.
- but error's parameters are scarse, and are very interesting, so are keeped. be careful, the value is not a flow value,
but, a cumulative value.
process
The pcreatem parameter is in DERIVE mode, so not available.
cpu
each parameter is available 2 times
- single (ex : user) : single processor parameter, scale between 0 and 100
- with _sum suffix (ex : user_sum) : sum of the parameter for all processors, scale between 0 and 100 * number_of_proc
operator
the operator to use for the test
value
the value to use (numerical)
action
for now, 5 actions are available :
mail
send a mail to root.
if the "arg" field is empty , the text will follow the syntax :
parameter = value ( condition)
for example : load1 = 1.07 ( > 1 )
else it will send the text in "arg" field
mailto
use the arg field as destination's email adress
top
get a "snapshot" of process with the command "top -n 1"
and send it by mail
run
allow to launch an external program, to be given as option (arg)
who
display the list of users connected on host
log
write to a file, given as option (arg).
arg
depends upon action (see below)
active
allow to activate/desactivate an action