[syslog-ng] Syslog-ng 3.0.7 fails to insert into microsoft sql server
Balazs Scheidler
bazsi at balabit.hu
Tue Jul 13 12:52:17 CEST 2010
On Mon, 2010-07-12 at 16:02 +0400, Khaleelah Peerbocus wrote:
> Dear All,
>
> Im currently configuring syslog-ng on SUSE Linux 10 SP2 to communicate
> with microsoft sql server 2005.
>
> I have installed freeTds 8.0.
>
> Tested TSQL ..works fine
> ISQL works fine.
>
> when testing with syslog-ng
>
>
>
> Conf file
>
>
>
> destination d_mssql {
>
> sql(type(mssql) host("ip address") port("1433")
>
> username("sa") password("password") database("syslogng")
>
> table("test1")
>
> columns("datetime varchar(16)","host varchar(32)" ,"program
> varchar(32)","pid varchar(8)","message varchar(4096)")
>
> values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSGONLY")
>
> indexes()
>
> );
>
> };
>
> log {
>
> source(src);
>
> destination(d_mssql);
>
>
> };
>
>
>
> I get the following error
>
>
>
> Note I created the table test1 manually in SQL server
>
> Code:
>
> Jul 12 09:57:06 syslogng syslog-ng[25034]: Error running SQL query;
> type='freetds', host='ip address', port='1433', user='sa',
> database='syslogng', error='', query='INSERT INTO test1 (datetime,
> host, program, pid, message) VALUES (\'Jul 12 08:59:46\', \'syslogng
> \', \'agetty\', \'25154\', \'/dev/xvc0: No such file or directory\')'
>
> Jul 12 09:57:36 syslogng syslog-ng[25034]: Error opening pipe,
> underlying file is not a FIFO, it should be used by file();
> filename='/dev/tty10'
>
> Jul 12 09:57:36 syslogng syslog-ng[25034]: Error opening file for
> writing; filename='/dev/tty10', error='Illegal seek (29)'
>
> Jul 12 09:59:06 syslogng syslog-ng[25034]: Error running SQL query;
> type='freetds', host='ip address', port='1433', user='sa',
> database='syslogng', error='', query='INSERT INTO test1 (datetime,
> host, program, pid, message) VALUES (\'Jul 12 08:59:46\', \'syslogng
> \', \'agetty\', \'25154\', \'/dev/xvc0: No such file or directory\')'
>
> Jul 12 09:59:06 syslogng syslog-ng[25034]: Error inserting message
> into database. It is tried to insert 3 times, but it's failed. Message
> is dropped;
>
>
>
> Grateful if someone can help me figure out the problem
hmm, does the syslog-ng user have the required permissions to insert
into the table?
strange that the error="" clause is empty in the log message. The other
error message is unrelated, /dev/tty10 should be opened with the file()
driver.
--
Bazsi
More information about the syslog-ng
mailing list