[rsyslog-notify] Forum Thread: Re: messages are missing from the log - (Mode 'reply')
noreply at adiscon.com
noreply at adiscon.com
Tue Apr 8 05:36:48 CEST 2014
User: awolfson
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24503#p24503
Message:
----------
Thank you David,
I found a bug, parentnes was in the wrong place, but now it runs slower 2.5
sec vs 1.7 and places 0 records in the log
I am curious if the way I defined sockets is the proper one.
how syslog() knows to which socket to send messages?
/etc/rsyslog.conf
[code:13tt3xy4]
# rsyslog v5 configuration file
# 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)
module(load="imuxsock" # needs to be done just once
SysSock.RateLimit.Interval="0" # turn off rate limiting
SysSock.Name="/dev/reallog"
)
input(type="imuxsock"
Socket="/dev/reallog"
CreatePath="on")
$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;local0.none;local1.none;local2.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 ###
# The statement between the begin ... end define a SINGLE
forwarding
# rule. They belong together, do NOT split them. If you create
multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /var/lib/rsyslog # where to place spool files
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite rrsyslogetries if host is down
# remote host is: name/ip:port, e.g.
192.168.0.1:514, port optional
#*.* @@remote-host:514
# ### end of the forwarding rule ###
[/code:13tt3xy4]
/etc/rsyslog.d/test-rsyslog.conf
[code:13tt3xy4]
# GEM customizations:
# 3 File producing logging channels for g4k analytical module,
# postgresql database, and g4k network manager info proxy respectively
# to actually gather the data:
$ModLoad impstats
$PStatInterval 30
$PStatSeverity 7
syslog.=debug /var/log/rsyslog-stats
#$SystemLogRateLimitInterval 0
#$MainMsgQueueSize 10000
$MainMsgQueueType LinkedList
$MainMsgQueueDequeueSlowdown 0
#$NainMsgQueueWorkerThreadMinimumMessages 100
#$MainMsgQueueDequeueBatchSize 5000
#$MainMsgQueueWorkerThreads 24
#$ActionQueueType LinkedList
#$ActionQueueSize 100000
#$ActionQueueWorkerThreads 24
#$ActionQueueDequeueBatchSize 5000
##$OMFilelOBufferSize 32k
##$OMFileAsyncWriting on
#$MaxMessageSize 64k
local0.*
/var/log/test-rsyslog.log
local0.* ~
local2.*
/var/log/pgsql.log
[/code:13tt3xy4]
stat-rsyslog
[code:13tt3xy4]
Apr 7 23:32:07 localhost rsyslogd-pstats: imuxsock:
submitted=0 ratelimit.discarded=0 ratelimit.numratelimiters=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 1:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 2:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 4:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 5:
processed=3 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 6:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 7:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 8:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 9:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 10:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: action 11:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:07 localhost rsyslogd-pstats: resource-usage:
utime=0 stime=1000 maxrss=1120 minflt=297 majflt=0 inblock=0 oublock=0
nvcsw=5 nivcsw=0
Apr 7 23:32:07 localhost rsyslogd-pstats: main Q: size=12
enqueued=15 full=0 discarded.full=0 discarded.nf=0 maxqsize=12
Apr 7 23:32:16 localhost rsyslogd-pstats: imuxsock:
submitted=0 ratelimit.discarded=0 ratelimit.numratelimiters=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 1:
processed=13 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 2:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 4:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 5:
processed=3 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 6:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 7:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 8:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 9:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 10:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: action 11:
processed=0 failed=0 suspended=0 suspended.duration=0 resumed=0
Apr 7 23:32:16 localhost rsyslogd-pstats: resource-usage:
utime=0 stime=4000 maxrss=1340 minflt=369 majflt=0 inblock=0 oublock=8
nvcsw=10 nivcsw=1
Apr 7 23:32:16 localhost rsyslogd-pstats: main Q: size=10
enqueued=28 full=0 discarded.full=0 discarded.nf=0 maxqsize=13
[/code:13tt3xy4]
More information about the rsyslog-notify
mailing list