Logsurfer problem when ' and " characters in log
From: Bo Jacobsen (bjc@image.dk)Date: 12/18/01
- Next message: Bo Jacobsen: "Logsurfer - Problem when ' and " characters in log"
- Previous message: Ian Jones: "Re: modify ipchains rules via web interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Bo Jacobsen" <bjc@image.dk> Date: Tue, 18 Dec 2001 18:33:47 +0100
Hi, I'm trying to make logsurfer execute a the program when
a condition in logsurfer.conf is met.
Everything works OK but when the quoting characters ' and " is
present in the log file logsurfer looks into, problems starts when $0 is
expanded. As the /var/log/messages contains a lot of these
quoting characters it is a big problem for logsurfer.
The problem is that a command like the following:
'a match' - - - 0 exec "/bin/echo $0"
only works as long as there is no " characters in the matched line.
'a match' - - - 0 exec "/bin/echo '$0' "
still have the problem with the single quote character.
I have tried to pipe the $0 to a local script (where te could delete the
characters), but logsurfer just goes into a indefinite loop when the
following
is executed:
'a match' - - - 0 pipe "/root/testscript"
Is there any way to make logsurfer expand the $0 without the
quoting characters or some thing like that, just something that makes it
possible to work with.
I'm really stuck so any help is appreciated.
Thanks in advance
Bo Jacobsen bjc@image.dk
- Next message: Bo Jacobsen: "Logsurfer - Problem when ' and " characters in log"
- Previous message: Ian Jones: "Re: modify ipchains rules via web interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]