[rsyslog-notify] Forum Thread: named pipe does not work when combined with template - (Mode 'edit_topic')

noreply at adiscon.com noreply at adiscon.com
Thu Jun 23 09:53:21 CEST 2016


User: jxu158 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26655#p26655

Message: 
----------
Hi there,

I really could use some help, I am completely out of idea...

I created a configuration file: /etc/rsyslog.d/myconf.conf and it looks
like this originally:
[code:26tkffho]
local3.debug    |/dev/stdout
[/code:26tkffho]

This works  and I can see logs from both /var/log/message and standard
output.

Now I need to create a template to format the message.  So I changed the
configuration to look like this:
[code:26tkffho]
template(name="myOutput" type="list") { property(name="timegenerated"
dateformat="rfc3339") constant(value=" level=")
property(name="syslogseverity-text") constant(value=" site=testSite
component=") property(name="syslogtag") constant(value=" hostname=")
property(name="hostname") property(name="msg" spifno1stsp="on" )
property(name="msg") constant(value="\r\n") }
local3.debug    |/dev/stdout;myOutput
[/code:26tkffho]

After I made modification, I can only see formatted message in
/va/log/message and I do not see any output from standard output...

I am using rsyslog version 7.4.10, and /etc/rsyslog.conf looks like this:
[code:26tkffho]
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see
http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

$ModLoad imuxsock # provides support for local system logging (e.g.
via logger command)
$ModLoad imklog   # provides kernel logging support (previously done by
rklogd)
#$ModLoad immark  # provides --MARK-- message capability

# Provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514

#### GLOBAL DIRECTIVES ####

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# File syncing capability is disabled by default. This feature is
usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on

# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf

#### RULES ####

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none               
/var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                 
-/var/log/maillog

# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                         
/var/log/spooler

# Save boot messages also to boot.log
local7.*                                               
/var/log/boot.log

# ### begin forwarding rule ###
# ### end of the forwarding rule ###
[/code:26tkffho]

Can someone please help me and let me know how should I configure this? 
Much... much appreciated!


More information about the rsyslog-notify mailing list