Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
Not that it memorizes, but syslog-ng starts the program once and expects it to
hang around, waiting for input.

In perl (although the syslog-ng example below from Federico handles some of
this already with the filter and template,

#!perl
# define your $pattern of interest
while( <> ) {
if ( /$pattern/ ) {
# extract values
# Do something with your values
# Like "rancid-run -r device_name"
}
}

Note, I've seen it's useful to batch up sysconfig traps or syslog messages
before firing off data collection for every event because you may have humans
logging in manually entering config mode, exiting, re-entering or some other
sort of nonsense :)
--
Daniel Medina
Loading...