Having issues with mysql
I'm trying to get nxlog to read from a mysql table and output any changes from the last table read to a text file in csv tab delineated format. Right now all it's doing is injecting multiple carriage returns into the text file with no text. Am I heading in the right direction or have I totally borked the config? I'm working with the following config:
<Extension csv>
        Module xm_csv
        Fields $facility, $severity, $hostname, $timestamp, $application, $message
        FieldTypes string, string, string, string, string, string
        Delimiter \t
</Extension>
<Input dbiin>
    Module im_dbi
        SavePos TRUE
        Driver mysql
        Option host localhost
        Option username USERNAME
        Option dbname DBNAME
        Option password PASSWORD
        SQL SELECT facility, severity, hostname, timestamp, application, message FROM table
</Input>
<Output out>
       Module om_file
       File "/var/log/test.txt"
</Output>
<Route 1>
Path dbiin => out
</Route>
I'm trying to get nxlog to read from a mysql table and output any changes from the last table read to a text file in csv tab delineated format. Right now all it's doing is injecting multiple carriage returns into the text file with no text. Am I heading in the right direction or have I totally borked the config? I'm working with the following config:
<Extension csv>
        Module xm_csv
        Fields $facility, $severity, $hostname, $timestamp, $application, $message
        FieldTypes string, string, string, string, string, string
        Delimiter \t
</Extension>
<Input dbiin>
    Module im_dbi
        SavePos TRUE
        Driver mysql
        Option host localhost
        Option username USERNAME
        Option dbname DBNAME
        Option password PASSWORD
        SQL SELECT facility, severity, hostname, timestamp, application, message FROM table
</Input>
<Output out>
       Module om_file
       File "/var/log/test.txt"
</Output>
<Route 1>
Path dbiin => out
</Route>
Looks like you forgot to call the csv conversion. The following should do that:
<Output out>
       Module om_file
       File "/var/log/test.txt"
       Exec csv->to_csv();
</Output>
                                    
                    
                