[syslog-ng] How to avoid logging unneccesary messages

Khaleelah Peerbocus systems2 at maccs.mu
Fri Jul 16 12:45:41 CEST 2010


Got the solution thx


-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu
[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Khaleelah Peerbocus
Sent: Friday, July 16, 2010 1:34 PM
To: 'Syslog-ng users' and developers' mailing list'
Subject: [syslog-ng] How to avoid logging unneccesary messages

Hello

I would like to avoid logging messages such as

Id \"x0\" respawning too fast: disabled for 5 minutes

/dev/xvc0: No such file or directory

How do i go abt it.

Thanks

-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu
[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Khaleelah Peerbocus
Sent: Friday, July 16, 2010 12:23 PM
To: 'Syslog-ng users' and developers' mailing list'
Subject: [syslog-ng] Success in inserting into MS SQL

HI GUYS

MY PROB IS SOLVED.

I was viewing the pipe file at the same time thats why it was not inserting.

Thx Bazsi for the tip on the template format.

Regards

-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu
[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Khaleelah Peerbocus
Sent: Friday, July 16, 2010 10:29 AM
To: 'Syslog-ng users' and developers' mailing list'
Subject: [syslog-ng] Inserting into sql server when reading from F

Hello Bazsi

U were right , the template itself had line breaking. So i fixed that part.
I no longer get the syntax error.

But now with the script im using to read the pipe, seems it is not inserting
any records, i get the following on screen

+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

And it stays there...

Script is as follows

if [ -e /tmp/mssql.syslog-ng.pipe ]; then
       while [ -e /tmp/mssql.syslog-ng.pipe ]
                do
                      isql -v MSTEST "sa" "pwd" </tmp/mssql.syslog-ng.pipe
                done
else
        mkfifo /tmp/mssql.syslog-ng.pipe fi



pipe displays the following when i do a cat

INSERT INTO logs(datetime,host,program,pid,message)VALUES('Jul 16
10:25:48','syslogng','agetty','2959','/dev/xvc0: No such file or
directory'); INSERT INTO logs(datetime,host,program,pid,message)VALUES('Jul
16
10:25:58','syslogng','agetty','2960','/dev/xvc0: No such file or
directory'); INSERT INTO logs(datetime,host,program,pid,message)VALUES('Jul
16
10:26:08','syslogng','agetty','2961','/dev/xvc0: No such file or
directory'); INSERT INTO logs(datetime,host,program,pid,message)VALUES('Jul
16 10:26:18','syslogng','init','','Id \"x0\" respawning too fast: disabled
for
5 minutes');


-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu
[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Khaleelah Peerbocus
Sent: Wednesday, July 14, 2010 9:41 AM
To: 'Syslog-ng users' and developers' mailing list'
Subject: Re: [syslog-ng] Pipe() in syslog-ng ---- HELP

Attached is syslog-ng.conf and the script I run.

I don't know if anyone else has ever faced the same prob..

Any suggestion .. should I use another db?

-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu
[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Balazs Scheidler
Sent: Tuesday, July 13, 2010 7:00 PM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] Pipe() in syslog-ng ---- HELP

On Tue, 2010-07-13 at 15:32 +0400, Khaleelah Peerbocus wrote:
> By embedded new line character you mean "\n"?
> 
> It is at the end of the query
> 
> destination d_mssql {
>     pipe("/tmp/mssql.syslog-ng.pipe"
>     template("INSERT INTO
>
logs(datetime,host,program,pid,message)VALUES('$R_DATE','$HOST','$PROGRAM','
> $PID','$MSGONLY');\n")
>     template-escape(yes));
> 
> };
> 
> log {
>      source(src);
>      filter(f_debug);
>      destination(d_mssql);
> };
> 
> 
> Even if I remove the \n ..it does not work.. it gives the same output..

No, I mean continuing the template string in a new line in your text editor.

--
Bazsi

____________________________________________________________________________
__
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation:
http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html


____________________________________________________________________________
__
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation:
http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html


____________________________________________________________________________
__
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation:
http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html


____________________________________________________________________________
__
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation:
http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html




More information about the syslog-ng mailing list