Howdy, I'm currently using a template to output logs to a pipe for importing into a DB. Is it possible to isolate a portion of the $MSG macro using regexps? Such that it equates to: echo $MSG | sed 's/denied ip \(1.1.1.1\) -> \(2.2.2.2\)/\1 \2/' I'm trying to put the IPs in their own column in the table. Thanks, -- -Jeremy
On Wed, Oct 10, 2001 at 03:26:39PM -0500, Jeremy Shaffner wrote:
Howdy,
I'm currently using a template to output logs to a pipe for importing into a DB. Is it possible to isolate a portion of the $MSG macro using regexps? Such that it equates to:
echo $MSG | sed 's/denied ip \(1.1.1.1\) -> \(2.2.2.2\)/\1 \2/'
I'm trying to put the IPs in their own column in the table.
you might try to do it in the script reading the messages from the pipe. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
On Thu, Oct 11, 2001 at 09:40:57AM +0200, Balazs Scheidler wrote:
On Wed, Oct 10, 2001 at 03:26:39PM -0500, Jeremy Shaffner wrote:
I'm trying to put the IPs in their own column in the table.
you might try to do it in the script reading the messages from the pipe.
The template creates the INSERTs and I'm running psql < /tmp/pipe. Is that a no then? -- -Jeremy
participants (2)
-
Balazs Scheidler
-
Jeremy Shaffner