On Fri, 18 Jun 2004, Tim Klein wrote: > watch Traps > service testtrap > MY_KEYWORD=Hello
this syntax will set the environment variable MY_KEYWORD to "Hello" for monitors and alerts in that service. > $kwd = $session->get("Traps", "testtrap", "MY_KEYWORD"); > > I expect the value of $kwd to be "Hello", but instead it's > always the empty string (not undefined, as would be expected > if the get() command failed for some reason). the function of "get" is to retrieve settings which were parsed by the config file, and also "internal" variables kept by mon while it is running, such as the time until the next monitor invocation, alert counts, etc. technically the "get" command will retrieve any scalar value stored in %{$watch->{$group}->{$service}}. the environment vars are stored there, but it's stored as a hash, not a scalar. maybe the right thing to do here would be to add another command called "getenv" or something which will return the list of env variables defined for a service. _______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon