[syslog-ng]re-inserting syslog messages for testing

Ed Ravin syslog-ng@lists.balabit.hu
Tue, 18 Jan 2005 11:29:07 -0500


On Mon, Jan 17, 2005 at 05:08:55PM -0800, Nate Campi wrote:
> On Fri, Nov 12, 2004 at 08:54:21PM -0500, Ed Ravin wrote:
> > I've written a perl script that takes as input a file with syslog
> > messages in it, and re-sends them into syslog on the current host.
> > I use this for test environments, especially when I'm testing things
> > with logsurfer and have a known logfile that should generate certain
> > results when parsed by logsurfer.
> > 
> > Are there any other tools that do this?  If not, I'll release mine
> > after cleaning it up a bit, but there's no point in adding more cruft
> > to the world if Someone Else has done a better job.
> 
> The standard logger tool takes a file argument, if your tool adds extra
> functionality please share it. I'm going to radically revamp all my
> syslog stuff on my site soon and any extra tools to list will be good.

My tool does two things logger doesn't - (1) it trims off the existing
timestamps from the input before logging it, and more interestingly, (2)
can parse those timestamps and replay the log messages at the same rate
that they were originally logged.  Or you can tell it to "time warp"
and play the messages back 2x 3x, 1/5x as fast, etc.  This is why it's
good for testing logsurfer files, since you can test whether your
timeouts work.

I have to spruce it up slightly (get rid of the XXX comments :-) before
I release it, will do so Real Soon.

	-- Ed