Results 1 to 7 of 7
Thread: Logging - Text File to Syslog
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
01-29-2008 #1
Logging - Text File to Syslog
Code:tail -f /path/to/logfile | logger
Code:logger -f /path/to/logfile
I think that if this process is restarted, and the logfile is always quite large, that it will read at least some of it again and duplicate that information into syslog which I'd like to avoid.
Is there a better way, some program perhaps that will remember it's position in the logfile and if crashed/restarted will pick up again from that exact point without missing anything or reinserting the same log information again, possibly also handling log truncation or rotation? Does logger -f have an intelligence on this?The Human Equation:
value(geeks) > value(mundanes)
-
01-29-2008 #2
-
01-29-2008 #3
this is Oracle 9i, I don't believe it has a syslog feature in this version from what I'm told.
I also want to know how to do this in a nice way because it's a cool thing to do in general should I need it in some other situation for some other program.
Does anyone know of a program like tail -f but with a memory for where it was in the file and handle log switching/truncation?The Human Equation:
value(geeks) > value(mundanes)
-
02-10-2008 #4
- Join Date
- Jun 2007
- Posts
- 6
I will implement a text file input for rsyslog (syslogd supporting MySQL and TCP :: rsyslog ) this month (already begun to do so). If you are still interested, I would love to discuss feature set and of course I am also looking for testers.
Rainer
-
02-10-2008 #5
syslog-ng already has this so I'm not sure it's worth re-inventing the wheel.
The only reason I'm not using syslog-ng in this instance is that is a package-cripplied rpm rhel system that I cannot easily upgrade and is in heavy production so I'd rather not mess with it.
So in this instance, I am really stuck with a text file that I need a way of intelligently tailing...The Human Equation:
value(geeks) > value(mundanes)
-
02-11-2008 #6
- Join Date
- Jun 2007
- Posts
- 6
Yeah, I know it has this feature, but rsyslog shall provide it, too, so that it is a complete package. Its especially important as rsyslog now has a lot of features syslog-ng does not offer, at least not in the open source edition.
I see... that's a restraint...
Well, you could still use rsyslog for that. The v3 branch has very modular inputs and outputs. So once the file reader is ready, you could create an instance of rsyslog that does only run the file reader (and output to syslog) and run that alongside syslog-ng. Sounds a bit usual, but could be a good option for that use case...
HTH
Rainer
-
02-20-2008 #7
- Join Date
- Jun 2007
- Posts
- 6
Rsyslog now supports text file to syslog conversion via the imfile plugin. Documentation is available on the site:
Text File Input Monitor :: syslogd supporting MySQL and TCP :: rsyslog
I would appreciate any deployment reports, including feature enhancement requests.
Rainer