0

How to run/configure syslog-ng to log only above the security loglevel/priority WARNING?

I would like to discard NOTICES like:

Destination timeout has elapsed, closing connection; fd='36'

From the docs: (https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.22/administration-guide/17#TOPIC-1209129) I found this:

The syslog-ng OSE application sends the following message types from the internal() source:

fatal: Priority value: critical (2), Facility value: syslog (5)

error: Priority value: error (3), Facility value: syslog (5)

warning: Priority value: warning (4), Facility value: syslog (5)

notice: Priority value: notice (5), Facility value: syslog (5)

info: Priority value: info (6), Facility value: syslog (5)

But can't find how to set the loglevel to warning

nbari
  • 558
  • 1
  • 9
  • 28

1 Answers1

1

The internal() source of syslog-ng produces internal messages on different hard-coded log levels. verbose, debug, and trace messages can be enabled/disabled with syslog-ng-ctl verbose|debug|trace --set on|off .

You can add a filter to keep only warnings and above:

filter f_warn { severity(warning..emergency) };

log {
  source { internal(); };
  filter(f_warn);
  destination { ... };
};
MrAnno
  • 210
  • 1
  • 7