In message <[EMAIL PROTECTED]>,
david at lang.hm writes:

>On Sat, 12 Apr 2008, Tejas Patel wrote:
>> logs to one file on a nfs mounted drive. I'm using the same single config 
>> file on all 10 hosts. Therefore, I'll need to obtain the hostname and log
>> filename and write them to the single sec output log.
>>
>> I'd like my output format to be like this:
>> <hostname>:<log_filename> | <message>
>>
>> I've figured out how to get the log_filename and the message and write
>> that. I'm not able to figure out how to obtain the current hostname.
>
>there may be a cleaner way to do it, but if all else fails you can setup 
>an action to take place on startup to do something like
>
>eval %o ($hostname=`hostname`)
>
>and then use $hostname in your other statements.

To do it on startup/restart use:

# Set variables on SEC startup or soft restarts. These variables can be used
# in actions and contexts. They are not usable in patterns.
#   %H - local hostname
type = single
desc = set variables and things on startup or restart of sec (core)
ptype = regexp
pattern = SEC_(STARTUP|RESTART|SOFTRESTART)
context = [ SEC_INTERNAL_EVENT ]
action = eval %Hostname ($foo=`/bin/hostname`; chomp($foo); return $foo);

and invoke sec with --intevents.

--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to