I want to send all logs from Database [Table creation, row insertion, data deletion, data selection etc.. ] to Logstash using NXLog, I have read the following blogs,
But which seams to be not working for me. Any help will be highly appreciable.
My nxlog config file :
<Input sql-logs>
Module im_dbi
SavePos TRUE
Driver mysql
Option dbname MySample
</Input>
<Output sql-out>
Module om_tcp
Host 192.168.1.14
Port 5222
</Output>
In logstash config file,
tcp {
port => 5222
type => "sqllogs"
}
Then I have created new table, inserted many records, but no logs visible in kibana.
You should first debug whether the sql-logs input actually works. I don't think it does. Check nxlog.log There is an SQL directive which specifies the select statement:
Note that an id column must be present in the result set.