It seems not to be correct:
in monitor, if do echo "doggy bag", i get the following in alarm stdin ($*) $* = "-s XXXXX -g YYYY -h 148.25.32.65 -t 110002124515 148.25.32.65"
the second "148.25.32.65" is from the mon.cf (alarm line arg)
So no trace of my custom string "doggy bag" from stdin (alarm)
Jim Trocki wrote:
On Tue, 18 Jan 2005, Alexandre Pashai wrote:
hello!
I need a result found in foo.monitor to be displayed in foo.alarm... How can i pass custom variables from monitor to alarm context ??
all of the data sent to stdout by a monitor is sent to the alert's stdin, so if you're writing a custom monitor and alert, you can decide however you'd like to encode those variables and values. e.g., make the monitor output lines which look like "VnameA=valueA", and use a regexp in the alert to look for /^V(nameA)\s*=\s*(.*)$/ on stdin to identify the variables.
_______________________________________________ mon mailing list [email protected] http://linux.kernel.org/mailman/listinfo/mon
