Hi I'm new to nxlog.

Just wanted to test it and created config that reads from a file and writes to a file. The input file contains the string This is a test

My config is:

User    nxlog
Group   nxlog

<Input in>
    Module  im_file
    File    "/opt/nxlog/bin/testlog"

        if $raw_event =~ /(\w{4})(\s)(\w{2})(\s)(\w{1})(\s)(\w{4})/
                $f1 = $1;
                $f2 = $2;
                $f3 = $3;
                $f4 = $4;
                $f5 = $5;
                $f6 = $6;
                $f7 = $7;

<Output out>
   Module om_file
   File   "/opt/nxlog/bin/outest"

<Route r>
   Path in => out

I start nxlog with command nxlog -c myconf and it does not write to the file. What Am I missing?

AskedJanuary 21, 2022 - 2:38pm

Answer (1)