Hi,

If you only want to prefix with the hostname, you can just rewrite
$raw_event as suggested by James and Maxim:
Exec  $raw_event = hostname() + ' ' + $raw_event;

On the other by looking at your conf I have a feeling that you actually
want proper syslog output as udp/514 and xm_syslog seem to indicate this.
The syslog format has the hostname in each line. If that's the case, all
you need to is to add to_syslog_bsd() to your output:
 <Output out>
     Module      om_udp
     Host        log.somelocation.com
     Port        514
     Exec        to_syslog_bsd();
 </Output>
Otherwise your xm_syslog module is not being used.

Regards,
Botond

On Fri, 1 Nov 2013 21:01:16 +0000
Ron Santini <ron.sant...@j2.com> wrote:

> Hello,
> 
> Sorry if this is a duplicate/easy request but I'm unable to locate the 
> solution...
> 
> 
> I have nxlog collecting data from multiple log files (each slightly different 
> in format) on several servers and would like to prefix the hostname to each 
> line in order to identify the source.
> 
> My conf:
> <Extension syslog>
>     Module      xm_syslog
> </Extension>
> 
> <Input messages>
>     Module      im_file
>     File     'c:\Send\\*.log'
> </Input>
> 
> <Output out>
>     Module      om_udp
>     Host        log.somelocation.com
>     Port        514
> </Output>
> 
> <Route 1>
>     Path        messages => out
> </Route>
> 
> 
> Thank you,
> 
> Ron S.
> 
> Cloud Services for Business www.j2.com
> j2 | eFax | eVoice | FuseMail | Campaigner | KeepItSafe | Onebox
> 
> 
> This email, its contents and attachments contain information from j2 Global, 
> Inc. and/or its affiliates which may be privileged, confidential or otherwise 
> protected from disclosure. The information is intended to be for the 
> addressee(s) only. If you are not an addressee, any disclosure, copy, 
> distribution, or use of the contents of this message is prohibited. If you 
> have received this email in error please notify the sender by reply e-mail 
> and delete the original message and any copies. (c) 2013 j2 Global, Inc. All 
> rights reserved. eFax, eVoice, Campaigner, FuseMail, KeepItSafe, and Onebox 
> are registered trademarks of j2 Global, Inc. and its affiliates.
> 

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to