1
votes

I am trying to config Syslog-ng 3.2.5 on Centos 6.6 with destination to MsSql. Local destination is fine.

I have installed all necessary packets.

Here is my config:

destination d_mssql{
 sql(
    type(mssql)
    host("XX.XX.XX.XX")
    port("1433")
    username("username")
    password("password")
    database("database")
    table("msgs_${R_YEAR}${R_MONTH}${R_DAY}")
    columns("datetime varchar(16)", "host varchar(32)", "program varchar(32)", "pid varchar(8)", "message varchar(4096)")
    values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSGONLY")
    indexes("datetime", "host", "program", "pid")
 );

I got this

No such DBI driver; type='freetds'

Can anyone help me? Or suggest me any syslog server to write logs in mssql

1

1 Answers

0
votes

it's possible that your syslog-ng version was compiled without sql support, or the required libraries are missing.

Check the output of syslog-ng -v to see if SQL support is enabled or not.

You can also try newer packages (3.2 is rather old), see https://czanik.blogs.balabit.com/2014/12/installing-syslog-ng-ose-3-6-1-on-rhel6-and-centos6/

Regards, Robert