I'm trying to use mmkubernetes where the docker containers are logging via
journald.
my config is:
module(load="imfile" PollingInterval="10") # provided support for monitoring
alternate log files
module(load="imuxsock") # provides support for local system logging (e.g. via
logger command)
module(load="imklog") # provides kernel logging support (previously done by
rklogd)
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
module(load="mmkubernetes"
kubernetesurl="http://k8s-master.lc.dc.openx.org:8080"
tls.cacert="/etc/ssl/certs/ca-bundle.crt"
allowunsignedcerts="on"
token="foobar"
annotation_match=[".*"]
filenamerules="rule=:/var/log/containers/"
action(type="mmkubernetes")
stop
one note, filenamerules is only supposed to be needed if you are using the file
log-driver in docker, but you cannot start up without it.
rsyslogd 8.34.0, compiled with:
PLATFORM: x86_64-redhat-linux-gnu
PLATFORM (lsb_release -d):
FEATURE_REGEXP: Yes
GSSAPI Kerberos 5 support: Yes
FEATURE_DEBUG (debug build, slow code): No
32bit Atomic operations supported: Yes
64bit Atomic operations supported: Yes
memory allocator: system default
Runtime Instrumentation (slow code): No
uuid support: Yes
systemd support: Yes
Number of Bits in RainerScript integers: 64
# rpm -qa |grep -e liblognorm -e rsyslog
liblognorm5-2.0.4-3.el7.x86_64
rsyslog-8.34.0-1.el7.centos.x86_64
rsyslog-mmkubernetes-8.34.0-1.el7.centos.x86_64
I get a segfault during startup of rsyslog -dn as soon as it gets to the config
line for the mmkubernetes action.
...
3657.410240277:main thread : rsconf.c: cnf:global:obj: obj: 'module'
3657.410244521:main thread : rainerscript.c: nvlst 0x5621d2bf3650:
3657.410247414:main thread : rainerscript.c: name: 'filenamerules',
value 'rule=:/var/log/containers/'
3657.410250422:main thread : rainerscript.c: name:
'annotation_match':
3657.410252983:main thread : rainerscript.c: ARRAY:
3657.410262441:main thread : rainerscript.c: string '.*'
3657.410274927:main thread : rainerscript.c: name: 'token', value
'foobar'
3657.410277832:main thread : rainerscript.c: name:
'allowunsignedcerts', value 'on'
3657.410280948:main thread : rainerscript.c: name: 'tls.cacert',
value '/etc/ssl/certs/ca-bundle.crt'
3657.410284269:main thread : rainerscript.c: name: 'kubernetesurl',
value 'http://k8s-master.lc.dc.openx.org:8080'
3657.410287235:main thread : rainerscript.c: name: 'load', value
'mmkubernetes'
3657.410291003:main thread : rainerscript.c: nvlstGetParam: name 'load', type
13, valnode->bUsed 0
3657.410293938:main thread : modules.c: modulesProcessCnf params:
3657.410296334:main thread : rainerscript.c: load: 'mmkubernetes'
3657.410301781:main thread : modules.c: Requested to load module
'mmkubernetes'
3657.410305008:main thread : modules.c: loading module
'/usr/lib64/rsyslog/mmkubernetes.so'
3657.410638835:main thread : mmkubernetes.c: mmkubernetes: module compiled
with rsyslog version 8.34.0.
3657.410644530:main thread : obj.c: caller requested object 'regexp', not
found (iRet -3003)
3657.410650711:main thread : modules.c: Requested to load module 'lmregexp'
3657.410654508:main thread : modules.c: loading module
'/usr/lib64/rsyslog/lmregexp.so'
3657.410697814:main thread : modules.c: module lmregexp of type 2 being
loaded (keepType=0).
3657.410701260:main thread : regexp.c: entry point 'isCompatibleWithFeature'
not present in module
3657.410704285:main thread : regexp.c: entry point 'setModCnf' not present in
module
3657.410707099:main thread : regexp.c: entry point 'getModCnfName' not
present in module
3657.410709863:main thread : regexp.c: entry point 'beginCnfLoad' not present
in module
3657.410713726:main thread : modules.c: source file mmkubernetes.c requested
reference for module 'lmregexp', reference count now 1
3657.410785276:main thread : modules.c: module mmkubernetes of type 1 being
loaded (keepType=1).
3657.410790205:main thread : modules.c: module config name is 'mmkubernetes'
3657.410792974:main thread : modules.c: module mmkubernetes supports rsyslog
v6 config interface
3657.410797388:main thread : mmkubernetes.c: entry point
'activateCnfPrePrivDrop' not present in module
3657.410801337:main thread : mmkubernetes.c: entry point 'doHUP' not present
in module
3657.410804489:main thread : mmkubernetes.c: entry point 'doHUPWrkr' not
present in module
3657.410807524:main thread : mmkubernetes.c: entry point
'SetShutdownImmdtPtr' not present in module
3657.410810741:main thread : mmkubernetes.c: entry point 'beginTransaction'
not present in module
3657.410814060:main thread : mmkubernetes.c: entry point 'commitTransaction'
not present in module
3657.410817072:main thread : mmkubernetes.c: entry point 'endTransaction' not
present in module
3657.410823633:main thread : rainerscript.c: nvlstGetParam: name
'kubernetesurl', type 14, valnode->bUsed 0
3657.410827198:main thread : rainerscript.c: nvlstGetParam: name
'tls.cacert', type 14, valnode->bUsed 0
3657.410830187:main thread : rainerscript.c: nvlstGetParam: name
'allowunsignedcerts', type 4, valnode->bUsed 0
3657.410833465:main thread : rainerscript.c: nvlstGetParam: name 'token',
type 14, valnode->bUsed 0
3657.410836381:main thread : rainerscript.c: nvlstGetParam: name
'annotation_match', type 15, valnode->bUsed 0
3657.410840103:main thread : rainerscript.c: nvlstGetParam: name
'filenamerules', type 15, valnode->bUsed 0
3657.410843759:main thread : mmkubernetes.c: module (global) param blk for
mmkubernetes:
3657.410846413:main thread : rainerscript.c: kubernetesurl:
'http://k8s-master.lc.dc.openx.org:8080'
3657.410851845:main thread : rainerscript.c: srcmetadatapath: (unset)
3657.410856448:main thread : rainerscript.c: dstmetadatapath: (unset)
3657.410860306:main thread : rainerscript.c: tls.cacert:
'/etc/ssl/certs/ca-bundle.crt'
3657.410865310:main thread : rainerscript.c: allowunsignedcerts: 1
3657.410870110:main thread : rainerscript.c: token: 'foobar'
3657.410874909:main thread : rainerscript.c: tokenfile: (unset)
3657.410879590:main thread : rainerscript.c: annotation_match: ARRAY:
3657.410882980:main thread : rainerscript.c: string '.*'
3657.410889176:main thread : rainerscript.c:
3657.410891719:main thread : rainerscript.c: de_dot: (unset)
3657.410896891:main thread : rainerscript.c: de_dot_separator: (unset)
3657.410901583:main thread : rainerscript.c: filenamerulebase: (unset)
3657.410905318:main thread : rainerscript.c: containerrulebase: (unset)
3657.410910067:main thread : rainerscript.c: filenamerules: ARRAY:
3657.410913202:main thread : rainerscript.c: string
'rule=:/var/log/containers/'
3657.410918465:main thread : rainerscript.c:
3657.410921035:main thread : rainerscript.c: containerrules: (unset)
-> $$ = nterm conf ()
Stack now 0
Entering state 1
Reading a token: Next token is token BEGIN_ACTION ()
Shifting token BEGIN_ACTION ()
Entering state 5
Reducing stack by rule 18 (line 159):
-> $$ = nterm nvlst ()
Stack now 0 1 5
Entering state 31
Reading a token: Next token is token NAME ()
Shifting token NAME ()
Entering state 58
Reading a token: Next token is token '=' ()
Shifting token '=' ()
Entering state 101
Reading a token: Next token is token STRING ()
Shifting token STRING ()
Entering state 136
Reducing stack by rule 21 (line 162):
$1 = token STRING ()
-> $$ = nterm value ()
Stack now 0 1 5 31 58 101
Entering state 137
Reducing stack by rule 20 (line 161):
$1 = token NAME ()
$2 = token '=' ()
$3 = nterm value ()
-> $$ = nterm nv ()
Stack now 0 1 5 31
Entering state 60
Reducing stack by rule 19 (line 160):
$1 = nterm nvlst ()
$2 = nterm nv ()
-> $$ = nterm nvlst ()
Stack now 0 1 5
Entering state 31
Reading a token: Next token is token ENDOBJ ()
Shifting token ENDOBJ ()
Entering state 62
Reducing stack by rule 41 (line 191):
$1 = token BEGIN_ACTION ()
$2 = nterm nvlst ()
$3 = token ENDOBJ ()
3657.411138144:main thread : rainerscript.c: nvlstGetParam: name 'type', type
14, valnode->bUsed 0
3657.411141869:main thread : ../action.c: action param blk after
actionNewInst:
3657.411143872:main thread : rainerscript.c: name: (unset)
3657.411148566:main thread : rainerscript.c: type: 'mmkubernetes'
3657.411153431:main thread : rainerscript.c: action.errorfile: (unset)
3657.411157940:main thread : rainerscript.c: action.writeallmarkmessages:
(unset)
3657.411161793:main thread : rainerscript.c: action.execonlyeverynthtime:
(unset)
3657.411166640:main thread : rainerscript.c:
action.execonlyeverynthtimetimeout: (unset)
3657.411171301:main thread : rainerscript.c:
action.execonlyonceeveryinterval: (unset)
3657.411175323:main thread : rainerscript.c:
action.execonlywhenpreviousissuspended: (unset)
3657.411180212:main thread : rainerscript.c:
action.repeatedmsgcontainsoriginalmsg: (unset)
3657.411184904:main thread : rainerscript.c: action.resumeretrycount: (unset)
$1 = nterm nvlst ()
$2 = nterm nv ()
-> $$ = nterm nvlst ()
Stack now 0 1 5
Entering state 31
Reading a token: Next token is token ENDOBJ ()
Shifting token ENDOBJ ()
Entering state 62
Reducing stack by rule 41 (line 191):
$1 = token BEGIN_ACTION ()
$2 = nterm nvlst ()
$3 = token ENDOBJ ()
3796.827947352:main thread : rainerscript.c: nvlstGetParam: name 'type', type
14, valnode->bUsed 0
3796.827949903:main thread : ../action.c: action param blk after
actionNewInst:
3796.827951135:main thread : rainerscript.c: name: (unset)
3796.827953237:main thread : rainerscript.c: type: 'mmkubernetes'
3796.827955469:main thread : rainerscript.c: action.errorfile: (unset)
3796.827957493:main thread : rainerscript.c: action.writeallmarkmessages:
(unset)
3796.827959497:main thread : rainerscript.c: action.execonlyeverynthtime:
(unset)
3796.827961437:main thread : rainerscript.c:
action.execonlyeverynthtimetimeout: (unset)
3796.827963647:main thread : rainerscript.c:
action.execonlyonceeveryinterval: (unset)
3796.827965799:main thread : rainerscript.c:
action.execonlywhenpreviousissuspended: (unset)
3796.827967962:main thread : rainerscript.c:
action.repeatedmsgcontainsoriginalmsg: (unset)
3796.827970118:main thread : rainerscript.c: action.resumeretrycount: (unset)
3796.827972234:main thread : rainerscript.c: action.reportsuspension: (unset)
3796.827974359:main thread : rainerscript.c:
action.reportsuspensioncontinuation: (unset)
3796.827976466:main thread : rainerscript.c: action.resumeinterval: (unset)
3796.827978527:main thread : rainerscript.c: action.copymsg: (unset)
3796.827981991:main thread : mmkubernetes.c: newActInst (mmkubernetes)
3796.827984034:main thread : mmkubernetes.c: action param blk in
mmkubernetes:
3796.827985126:main thread : rainerscript.c: kubernetesurl: (unset)
3796.827987108:main thread : rainerscript.c: srcmetadatapath: (unset)
3796.827989048:main thread : rainerscript.c: dstmetadatapath: (unset)
3796.827990997:main thread : rainerscript.c: tls.cacert: (unset)
3796.827992989:main thread : rainerscript.c: allowunsignedcerts: (unset)
3796.827994901:main thread : rainerscript.c: token: (unset)
3796.827996827:main thread : rainerscript.c: tokenfile: (unset)
3796.827998796:main thread : rainerscript.c: annotation_match: (unset)
3796.828000797:main thread : rainerscript.c: de_dot: (unset)
3796.828002738:main thread : rainerscript.c: de_dot_separator: (unset)
3796.828004667:main thread : rainerscript.c: filenamerulebase: (unset)
3796.828006622:main thread : rainerscript.c: containerrulebase: (unset)
3796.828008570:main thread : rainerscript.c: filenamerules: (unset)
3796.828010572:main thread : rainerscript.c: containerrules: (unset)
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.