From: Chris <chris@services-4u.net>
To: gentoo-security@lists.gentoo.org
Subject: [gentoo-security] prelude-lml and log_prefix_regex
Date: Sat, 15 Oct 2005 10:10:18 +0200 [thread overview]
Message-ID: <4350B96A.5000506@services-4u.net> (raw)
In-Reply-To: <vvyTMOUo.1129231060.9485930.lcj@poczta.klonex.com.pl>
Hello listmembers,
i'm setting up a prelude/snort system and so far everything works quite
well, but i have absolutely no clue about regular expressions.
i tried to get it for a few hours now, but damn, this is really hard
stuff... :(
all i need is an expression for setting up the prelude-lml variable:
"log_prefix_regex" with my syslog-ng entries, but i don't get it, so i
thought i might ask if someone with the needed knowledge could help me out.
my logentries look like this:
2005-10-15T10:01:20+0100 <auth.info> balmoral su(pam_unix)[741]:
session opened for user root by (uid=1000)
using this syslog-ng entry:
template("$ISODATE <$FACILITY.$PRIORITY> $HOST $MSG\n")
and prelude-lml want's to use this expression to extract the data:
time-format = "%Y-%m-%dT%H:%M:%S"
prefix-regex = "^(?P<timestamp>.{15}) (?P<hostname>\S+)
(?:(?P<process>\S+?)(?:\[(?P<pid>[0-9]+)\])?: )?"
all i get using this regex is the following error:
could not match log_prefix_regex against log entry:
2005-10-15T10:01:20+0100 <auth.info> balmoral su(pam_unix)[741]: session
opened for user root by (uid=1000)
the time-format was the only thing i could change accordingly and using
date "+%Y-%m-%dT%H:%M:%S" produces the used log-date.
so, if someone could create a working regular expression for me (or
gimme some other help), as slowly my brain begins to smoke while i'm
totally stuck, i would appreciate it very much.
greetings, chris
>
>
--
gentoo-security@gentoo.org mailing list
next prev parent reply other threads:[~2005-10-15 8:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-13 12:44 [gentoo-security] hosts.{allow,deny} vs. iptables Giles Coochey
2005-10-13 19:17 ` Łukasz C. Jokiel
2005-10-15 8:10 ` Chris [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-15 9:33 [gentoo-security] prelude-lml and log_prefix_regex Sheran Gunasekera
2005-10-15 9:45 ` Chris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4350B96A.5000506@services-4u.net \
--to=chris@services-4u.net \
--cc=gentoo-security@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox