[syslog-ng]"last message repeated NN times"?
Asif Iqbal
syslog-ng@lists.balabit.hu
Sat, 10 Jan 2004 18:20:38 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ed Ravin wrote:
> If I read that correctly, it removes messages that are unwanted,
> including the "last message repeated" from syslogd. I'm talking
> about having syslog-ng recognize that a stream of messages are
> duplicates, and issuing a friendlier version of "last message repeated"
> so that the duplicates are (mostly) suppressed.
>
> I suppose if syslog-ng had a variable for the last message string, then
> something like this could be done in a filter?
>
I guess the you can try something like this
filter f_repeat { match("last message repeated "); };
destination d_repeat { program("/usr/local/bin/check-repeat.pl"); };
check-repeat.pl compares only the filtered messages (each line at a
time) with for example /var/adm/messages file. Then it will append the line to the
/var/adm/messages file only if that line does not exist.
- --
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
There's no place like 127.0.0.1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (SunOS)
iD8DBQFAAIjFUAgaF+Ymk8URAgZ7AKC529/IGYp9dj8HbQZZt1DldyVV4wCfTiAC
r6e9KlI2mBRdg6KjTvGahyU=
=NPYr
-----END PGP SIGNATURE-----