[rsyslog-notify] Forum Thread: Empty configuration validation - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Thu Jul 7 12:18:59 CEST 2016


User: zezollo 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26709#p26709

Message: 
----------
Hello,

In order to log some informations from a python script I'm writing, in a
dedicated /var/log/myapp.log, I have kept /etc/rsyslog.conf as is (provided
by bodhilinux, e.g. ubuntu: only listening to a unix socket). A copy of its
content is at the end of this post.

I have added one file, named /etc/rsyslog.d/40-local.conf, containing only
this:

[code:2ng8359w]local5.*                       
/var/log/myapp.log[/code:2ng8359w]

then restarted rsyslogd, what is up now, and listening to unix socket
/dev/log:
[code:2ng8359w]# ps aux | grep rsyslog
syslog    3960  0.0  0.0 190312  2676 ?        Ssl  07:23  
0:00 rsyslogd
# lsof | grep "/dev/log"
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system
/run/user/1000/gvfs
      Output information may be incomplete.
rsyslogd   3960           syslog    0u     unix 0xffff8800b2785500      0t0
   3176322 /dev/log
in:imuxso  3960  3961     syslog    0u     unix 0xffff8800b2785500     
0t0    3176322 /dev/log
in:imklog  3960  3962     syslog    0u     unix 0xffff8800b2785500     
0t0    3176322 /dev/log
rs:main    3960  3963     syslog    0u     unix 0xffff8800b2785500     
0t0    3176322 /dev/log[/code:2ng8359w]

But, even if there's a correct Include directive at the end of
/etc/rsyslog.conf,  '40-local.conf' does not seem to be taken into account:
[code:2ng8359w]# rsyslogd -N1 | grep 40-local.conf
rsyslogd: version 7.4.4, config validation run (level 1),
master config /etc/rsyslog.conf
rsyslogd: End of config validation run. Bye.
#[/code:2ng8359w]

Previously, when running this configuration validation, I used to get (same
version, same configuration files):
[code:2ng8359w]# rsyslogd -N1 | grep 40-local.conf
rsyslogd: version 7.4.4, config validation run (level 1),
master config /etc/rsyslog.conf
4296.714405532:7f0a30d99780: requested to include config file
'/etc/rsyslog.d/40-local.conf'
4296.714441710:7f0a30d99780: config parser: pushed file
/etc/rsyslog.d/40-local.conf on top of stack
4296.714742727:7f0a30d99780: config parser: resume parsing
of file /etc/rsyslog.d/40-local.conf at line 1
4296.715014410:7f0a30d99780: config parser: reached end of
file /etc/rsyslog.d/40-local.conf
rsyslogd: End of config validation run. Bye.[/code:2ng8359w]

But now it looks like nothing gets done at all:
[code:2ng8359w]
# rsyslogd -N6                                                             
                                                            
rsyslogd: version 7.4.4, config validation run (level 6),
master config /etc/rsyslog.conf
rsyslogd: End of config validation run. Bye.
[/code:2ng8359w]

I also tried to replace the single Include directive by three explicit
ones, but this doesn't work any better:

[code:2ng8359w]$IncludeConfig /etc/rsyslog.d/20-ufw.conf
$IncludeConfig /etc/rsyslog.d/40-local.conf
$IncludeConfig /etc/rsyslog.d/50-default.conf[/code:2ng8359w]

All the files are readable:

[code:2ng8359w]# ll /etc/rs*
-rw-r--r-- 1 root root 1544 juil.  7 11:10 /etc/rsyslog.conf

/etc/rsyslog.d:
total 32
drwxr-xr-x   2 root root  4096 juil.  7 11:10 ./
drwxr-xr-x 146 root root 12288 juil.  7 11:33 ../
-rw-r--r--   1 root root   311 mars  17  2012 20-ufw.conf
-rw-r--r--   1 root root   172 juil.  7 11:10 40-local.conf
-rw-r--r--   1 root root  1655 avril 18  2013
50-default.conf[/code:2ng8359w]

So, what is wrong? Have I missed something from the documentation? Is there
anything else I could check to get a hint?


-----------------------------------

Content of /etc/rsyslog.conf:

[code:2ng8359w]#  /etc/rsyslog.conf    Configuration file for
rsyslog.
#
#                       For more information see
#                      
/usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
#  Default logging rules can be found in
/etc/rsyslog.d/50-default.conf
#################
#### MODULES ####
#################
$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support
#$ModLoad immark  # provides --MARK-- message capability
# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
# provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514
# Enable non-kernel facility klog messages
$KLogPermitNonKernelFacility on
###########################
#### GLOBAL DIRECTIVES ####
###########################

#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# Filter duplicated messages
$RepeatedMsgReduction on

#
# Set the default permissions for all log files.
#
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup syslog

#
# Where to place spool and state files
#
$WorkDirectory /var/spool/rsyslog

$template MathmakerTpl,"%$now%
%timegenerated:12:23:date-rfc3339% %syslogtag%%msg%\n" 

#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf[/code:2ng8359w]


More information about the rsyslog-notify mailing list