Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-security
Navigation:
Lists: gentoo-security: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-security@g.o
From: Chris <chris@...>
Subject: prelude-lml and log_prefix_regex
Date: Sat, 15 Oct 2005 10:10:18 +0200
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@g.o mailing list


References:
RE: hosts.{allow,deny} vs. iptables.
-- Ɓukasz C. Jokiel
Navigation:
Lists: gentoo-security: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
RE: hosts.{allow,deny} vs. iptables.
Next by thread:
[no subject]
Previous by date:
RE: hosts.{allow,deny} vs. iptables.
Next by date:
prelude-lml and log_prefix_regex


Updated Jun 17, 2009

Summary: Archive of the gentoo-security mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.