Find the answer to your Linux question:
Results 1 to 3 of 3
Hi everybody, somebody knows how to put samba's log files in a database? Before i used full_audit to store useful information but i' would like to store this log in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    4

    Exclamation put samba's log in a database


    Hi everybody, somebody knows how to put samba's log files 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[17802]: test |192.168.0.54 |test |connect |ok |test

    Aug 20 14:22:47 DIARY smbd[17802]:test |192.168.0.54| test |disconnect | ok |test

  2. #2
    Just Joined!
    Join Date
    Aug 2008
    Posts
    5

    a bit complicated solution

    Quote Originally Posted by izlude View Post
    Hi everybody, somebody knows how to put samba's log files 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[17802]: test |192.168.0.54 |test |connect |ok |test

    Aug 20 14:22:47 DIARY smbd[17802]:test |192.168.0.54| test |disconnect | ok |test

    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.

  3. #3
    Just Joined!
    Join Date
    Aug 2012
    Posts
    4
    Quote Originally Posted by mirceamic View Post
    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.
    Thank's it was very usefull

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •