I've got a couple of problems running nxlog 2.9 on windows

First, I'm trying to have my mark message include a couple of stats

I have:

<Input mark>
     Module     im_mark
     MarkInterval 1
     Mark "nxlog heartbeat"
     Exec convert_fields("AUTO", "utf-8");
     Exec $hostname = hostname();
Exec $longestline = get_var('maxsize');
Exec $logcount = get_var('logcount');
     Exec $Message = "@cee:" + to_json();
     Exec        to_syslog_bsd();
     Exec $raw_event = replace($raw_event, '\r\n', '\n');
     Exec set_var('logcount', 5 );
     Exec set_var('logcount', ( get_var('logcount') + 1 ) );
     Exec set_var('maxsize', size($raw_event));
</Input>


<Input internal>
     Module      im_internal
   Exec create_var('logcount');
   Exec create_var('maxsize');
     Exec convert_fields("AUTO", "utf-8");
     Exec $SourceName = "nxlog";
     Exec $hostname = hostname();
     Exec $Message = "@cee:" + to_json();
     Exec        to_syslog_bsd();
     Exec $raw_event = replace($raw_event, '\r\n', '\n');
     Exec set_var('logcount', get_var('logcount') +1 );
     Exec if size($raw_event) > get_var('maxsize') { set_var('maxsize', 
size($raw_eve$
</Input>

<Input eventlog>
     Module      im_msvistalog
     SavePos     True
     ReadFromLast True
     PollInterval 1
     Exec $SourceName = "ms-" + $Channel;
     Exec $hostname = hostname();
Exec $longestline = get_var('maxsize');
Exec $logcount = get_var('logcount');
     Exec $Message = "@cee:" + to_json();
     Exec        to_syslog_bsd();
     Exec $raw_event = replace($raw_event, '\r\n', '\n');
     Exec set_var('logcount', get_var('logcount') +1 );
     Exec if size($raw_event) > get_var('maxsize') { set_var('maxsize',
size($raw_event)); }
</Input>

my mark messages show logcount=6 on the mark messages. on the eventlog messages
they show null


Second, I want to eliminate the CR in the log line, but the replace() call
doesn't seem to have any effect (I tries the same thing but with $Message
instead of $raw_event, no difference)

Third, on outputs, doe the Exec lines take effect before the output or after?
all the examples I can find use the exec for writing or rotating a file. I'd 
like to move the message formatting from the inputs to the outputs so it's not 
continually repeated.

What am I doing wrong here?

David Lang

------------------------------------------------------------------------------
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to