aggregateknowledge/rsyslog-zeromq — Issue #3: imzeromq problem
Author: bradziszewski
Created: 2012-03-06 08:16:13+00:00
State: open

hello,

Have problem to log msg over imzeromq.

my rsyslog.conf:

$ModLoad omzeromq.so
$ModLoad imzeromq.so
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$FileOwner root
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$IncludeConfig /etc/rsyslog.d/*.conf
$RuleSet Events
*.* /var/log/zmq
$InputZeroMQServerBindRuleset Events
$InputZeroMQServerRun pattern=sub,bind=tcp://*:5557,subscribe=AAA
$Ruleset RSYSLOG_DefaultRuleset
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err /var/log/mail.err
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
*.emerg :omusrmsg:*
daemon.*;mail.*;\
news.err;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole

my client:

#!/usr/bin/python
import zmq

context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.connect("tcp://127.0.0.1:5557")

for request in range(1,10):
#msg = "<165>1 2003-08-24T05:14:15.000003-07:00 192.0.2.1 myproc 8710 - - %% It's time to make the do-nuts"
msg = "AAA <165>1 2003-08-24T05:14:15.000003-07:00 192.0.2.1 myproc 8710 - - %% It's time to make the do-nuts"
socket.send(msg)
print "Sending", msg

and it's my rsyslog debug output:

1743.488976403:7f99ecc5b700: main Q: entry added, size now log 1, phys 1 entries
1743.489018807:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489034120:7f99ecc5b700: main Q: entry added, size now log 2, phys 2 entries
1743.489044840:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489057438:7f99ecc5b700: main Q: entry added, size now log 3, phys 3 entries
1743.489067729:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489080124:7f99ecc5b700: main Q: entry added, size now log 4, phys 4 entries
1743.489091634:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489104004:7f99ecc5b700: main Q: entry added, size now log 5, phys 5 entries
1743.489114188:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489126492:7f99ecc5b700: main Q: entry added, size now log 6, phys 6 entries
1743.489136705:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489148932:7f99ecc5b700: main Q: entry added, size now log 7, phys 7 entries
1743.489159109:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489171285:7f99ecc5b700: main Q: entry added, size now log 8, phys 8 entries
1743.489181578:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489193808:7f99ecc5b700: main Q: entry added, size now log 9, phys 9 entries
1743.489204067:7f99ecc5b700: main Q: EnqueueMsg advised worker start
1743.489279267:7f99ee45e700: wti 0x25c7d40: worker awoke from idle processing
1743.489296721:7f99ee45e700: we deleted 0 objects and enqueued 0 objects
1743.489304321:7f99ee45e700: delete batch from store, new sizes: log 9, phys 9
1743.489314069:7f99ee45e700: processBatch: batch of 9 elements must be processed
1743.489321864:7f99ee45e700: Processing next rule
1743.489329655:7f99ee45e700: testing filter, f_pmask 0
1743.489336813:7f99ee45e700: testing filter, f_pmask 0
1743.489343783:7f99ee45e700: testing filter, f_pmask 0
1743.489350761:7f99ee45e700: testing filter, f_pmask 0
1743.489357717:7f99ee45e700: testing filter, f_pmask 0
1743.489364714:7f99ee45e700: testing filter, f_pmask 0
1743.489371725:7f99ee45e700: testing filter, f_pmask 0
1743.489378737:7f99ee45e700: testing filter, f_pmask 0
1743.489385726:7f99ee45e700: testing filter, f_pmask 0
1743.489393080:7f99ee45e700: Processing next action
1743.489401967:7f99ee45e700: Called action(Batch), logging to builtin-file
1743.489410774:7f99ee45e700: XXXXX: tryDoAction 0x25d14c0, pnElem 9, nElem 9
1743.489418868:7f99ee45e700: ruleset: get iRet 0 from rule.ProcessMsg()
1743.489426216:7f99ee45e700: ruleset.ProcessMsg() returns 0
1743.489433757:7f99ee45e700: regular consumer finished, iret=0, szlog 0 sz phys 9
1743.489443851:7f99ee45e700: we deleted 9 objects and enqueued 0 objects
1743.489451343:7f99ee45e700: delete batch from store, new sizes: log 0, phys 0
1743.489478114:7f99ee45e700: regular consumer finished, iret=4, szlog 0 sz phys 0
1743.489485641:7f99ee45e700: main Q:Reg/w0: worker IDLE, waiting for work.

Any ideas what i'm doing wrong?

Regards,
Bartek