[JaxPM] log checking script once again
Nate Campi
nate at campin.net
Fri Jun 16 17:44:37 CDT 2000
On the jacksonville-pm-list; Jax.PM'er Nate Campi <nate at campin.net> wrote -
I fixed it.
I just needed a check like this:
# if we already have this message in the hash, just append the
time it's reported
if ( ${ $hostname }{$message} ) {
# the value is the time with a leading comma
${ $hostname }{$message} .= ", $msg[2]";
} else {
# if this is the first time this message is reported,
# put the month and day at the beginning
${ $hostname }{$message} = "$month $day ";
${ $hostname }{$message} .= "$msg[2]";
}
This added the month and day into the message. I just never quite thought
of it in the right way until I looked at it again today.
Thanks, guys.
OBTW, Bill,
I eliminate the duplicates to shorten the output. Since I have the report
running on a central syslog host, we could potentilly have quite a few
host logging to it. Right now we have about 2 dozen logging to it, so
compacting the output is crucial.
Thanks again,
--
Nate
Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...
More information about the Jacksonville-pm
mailing list