Results 1 to 3 of 3
Thread: put samba's log in a database
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Aug 2012
put samba's log in a database
Before i used full_audit to store useful information but i' would like to store this log in a database.
I tried to use syslog-ng, but i saw only this kind of log:
>Aug 20 10:50:20 DIARY kernel: [13536.250267] init: smbd main process >(10840) killed by TERM signal
i'd like to see this kind of log:
Aug 20 14:22:46 DIARY smbd: test |192.168.0.54 |test |connect |ok |test
Aug 20 14:22:47 DIARY smbd:test |192.168.0.54| test |disconnect | ok |test
- Join Date
- Aug 2008
a bit complicated solution
First of all I don't consider myself as a linux expert, I've never used the tools you mentioned.
I also want to take some log files, put them in a database, then create all sort of reports with the data.
The log files have a strict format (close to csv), which can be transformed into a sql file that can be loaded into a database. All this can be made with a bash script (I prefer php) with the help of cron.
Basically that's it.
As I said, I'm not an expert so there might be a tool for formatting a log file into the format you like but I doubt there is a tool for automatically inserting the log data into a database.
I hope this helps.