im_odbc ConnectionString question

Tags:

#1 ghostcat

Hello,

I am attempting to use the im_odbc module to gather table data from mssql into nagios log server.

conf snippet

<Input in>

Module im_odbc
ConnectionString DSN=mysql://USERNAME:PASSWORD@IPADDRESS:PORT;database=DATABASENAME;
SQL Select RecordNumber as id, DateOccured as EventTime, data as Message from logtable WHERE RecordNumber > ?
SavePos TRUE
</Input>

 

<Output out>
Module om_tcp
Host IPADDRESS
Port 1337
OutputType Binary
</Output>

 

<Route 1>
Path in => out
</Route>

Error

ERROR im_odbc couldn't connect to the database, IM010:1:0:[Microsoft][ODBC Driver Manager] Data source name too long

 

Please Help!

Thanks 

GC.

#2 adm Nxlog ✓
#1 ghostcat
Hello, I am attempting to use the im_odbc module to gather table data from mssql into nagios log server. conf snippet <Input in> Module im_odbc ConnectionString DSN=mysql://USERNAME:PASSWORD@IPADDRESS:PORT;database=DATABASENAME; SQL Select RecordNumber as id, DateOccured as EventTime, data as Message from logtable WHERE RecordNumber > ? SavePos TRUE </Input>   <Output out> Module om_tcp Host IPADDRESS Port 1337 OutputType Binary </Output>   <Route 1> Path in => out </Route> Error ERROR im_odbc couldn't connect to the database, IM010:1:0:[Microsoft][ODBC Driver Manager] Data source name too long   Please Help! Thanks  GC.

The DSN has mysql in it, typo perhaps?

There is an odbc configuration tool called odbcad32.exe in windows that allows testing DSNs. Make sure to set up your DSN with that first.