I have a server (any server, could be a RADIUS, a DNS or a MTA) that
logs to a file in /var/logs/log-file. Is there a way to take the raw
data sent to the log file and INSERT it into a table? Can this be
done on the fly, meaning, the data isn't stored in the flat text file
at all, but rather the service sends the data to the log file and
instead of being written to the file, it's sent to a table.
If the data is already sent to the logfile and there's no way you can tamper
the application/service itself, then I guess you're stuck with that file?
Then you have to check the file every now and then and do INSERTs of the
data.
If, however, you can mess with the code for the service, you could use the C
API to do the INSERTs instead of writing it to a log file.
Does this sound like a job for Perl/DBI/DBD?
Jep. Or PHP. It can be installed for command-line use too, you know...
Good luck,
Eivind
sql, query
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php