Tired of Logs flooded with systemd messages:

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Tired of Logs flooded with systemd messages:

Post by SteveBeauchemin »

Red Hat 7 and systemd make too much noise in my messages file.

Starting Session blah blah blah
Started Session blah blah blah
Starting Session blah blah blah
Started Session blah blah blah
Starting Session blah blah blah
Started Session blah blah blah

Finally had it up to HERE... that's right... HERE

So, I made them stop with a one line file.

Code: Select all

vi /etc/rsyslog.d/ignore-systemd-session.conf

if $programname == "systemd" and ($msg contains "Starting Session" or $msg contains "Started Session") then stop
Then restart rsyslog

Code: Select all

systemctl restart rsyslog
GONE...

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Tired of Logs flooded with systemd messages:

Post by mcapra »

Simple, effective, thanks for sharing!

You can also stop Nagios from using the syslog facility completely in nagios.cfg:

Code: Select all

use_syslog=0
Former Nagios employee
https://www.mcapra.com/
Locked