{"action":"created","issue":{"url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1644","repository_url":"https://api.github.com/repos/rsyslog/rsyslog","labels_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1644/labels{/name}","comments_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1644/comments","events_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1644/events","html_url":"https://github.com/rsyslog/rsyslog/issues/1644","id":240520972,"number":1644,"title":"Imfile multilevelwildcard not work add new path and new file?","user":{"login":"xiagujinqiao","id":6712820,"avatar_url":"https://avatars3.githubusercontent.com/u/6712820?v=4","gravatar_id":"","url":"https://api.github.com/users/xiagujinqiao","html_url":"https://github.com/xiagujinqiao","followers_url":"https://api.github.com/users/xiagujinqiao/followers","following_url":"https://api.github.com/users/xiagujinqiao/following{/other_user}","gists_url":"https://api.github.com/users/xiagujinqiao/gists{/gist_id}","starred_url":"https://api.github.com/users/xiagujinqiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiagujinqiao/subscriptions","organizations_url":"https://api.github.com/users/xiagujinqiao/orgs","repos_url":"https://api.github.com/users/xiagujinqiao/repos","events_url":"https://api.github.com/users/xiagujinqiao/events{/privacy}","received_events_url":"https://api.github.com/users/xiagujinqiao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"alorbach","id":1675286,"avatar_url":"https://avatars1.githubusercontent.com/u/1675286?v=4","gravatar_id":"","url":"https://api.github.com/users/alorbach","html_url":"https://github.com/alorbach","followers_url":"https://api.github.com/users/alorbach/followers","following_url":"https://api.github.com/users/alorbach/following{/other_user}","gists_url":"https://api.github.com/users/alorbach/gists{/gist_id}","starred_url":"https://api.github.com/users/alorbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alorbach/subscriptions","organizations_url":"https://api.github.com/users/alorbach/orgs","repos_url":"https://api.github.com/users/alorbach/repos","events_url":"https://api.github.com/users/alorbach/events{/privacy}","received_events_url":"https://api.github.com/users/alorbach/received_events","type":"User","site_admin":false},"assignees":[{"login":"alorbach","id":1675286,"avatar_url":"https://avatars1.githubusercontent.com/u/1675286?v=4","gravatar_id":"","url":"https://api.github.com/users/alorbach","html_url":"https://github.com/alorbach","followers_url":"https://api.github.com/users/alorbach/followers","following_url":"https://api.github.com/users/alorbach/following{/other_user}","gists_url":"https://api.github.com/users/alorbach/gists{/gist_id}","starred_url":"https://api.github.com/users/alorbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alorbach/subscriptions","organizations_url":"https://api.github.com/users/alorbach/orgs","repos_url":"https://api.github.com/users/alorbach/repos","events_url":"https://api.github.com/users/alorbach/events{/privacy}","received_events_url":"https://api.github.com/users/alorbach/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2017-07-05T02:05:01Z","updated_at":"2017-07-26T08:09:07Z","closed_at":null,"body":"hello！\r\nImfile multilevelwildcard not work add new path and new file？\r\n> * Os version：CentOS Linux release 7.2.1511 (Core)\r\n> * Rsyslog version： 8.27.0\r\n> * /etc/rsyslog.conf\r\n```\r\nmodule(load=\"imfile\" mode=\"inotify\" PollingInterval=\"5\")\r\n$ModLoad omkafka\r\n```\r\n> * /etc/rsyslog.d/docker.conf\r\n```\r\ntemplate(name=\"dockervolumes\" type=\"string\" string=\"%hostname% %syslogtag% '%$!metadata!filename%' %rawmsg%\\n\")\r\nruleset(name=\"dockervolumes\") {\r\n  action (\r\n    queue.workerthreads=\"1\"\r\n    type=\"omkafka\"\r\n    topic=\"dockervolumes\"\r\n    broker=[\"100.73.1.5:9092\",\"100.73.1.6:9092\",\"100.73.1.7:9092\"]\r\n    template=\"dockervolumes\"\r\n    partitions.auto=\"on\"\r\n    errorfile=\"/data/state/kafka_failures.log\"\r\n  )\r\n}\r\ninput(type=\"imfile\" addMetadata=\"on\" Tag=\"dockervolumes\" File=\"/data/docker/volumes/*_log/*/*.log\" Facility=\"local5\" Severity=\"info\" reopenOnTruncate=\"on\" Ruleset=\"dockervolumes\")\r\n```\r\n\r\n### steps:\r\n#### 1.start rsyslog -dn:\r\n```rsyslog -dn```\r\n#### 2.create new dir and new file:\r\n```\r\nmkdir -p /data/docker/volumes/jinqiaotest_log/test && touch /data/docker/volumes/jinqiaotest_log/test/test.log && echo \"test\" >> /data/docker/volumes/jinqiaotest_log/test/test.log && echo \"test\" >> /data/docker/volumes/jinqiaotest_log/test/test.log\r\n```\r\n#### 3.Check if the file exists\r\n```\r\nll /data/docker/volumes/*_log/*/*.log\r\n-rw-r--r-- 1 root root 15 Jul  5 09:47 /data/docker/volumes/jinqiaotest_log/test/test.log\r\n```\r\n#### 4.rsyslog -dn stdout:\r\n```\r\n9181.017786390:imfile.c       : INOTIFY event: file was CREATED: jinqiaotest_log\r\n9181.017798717:imfile.c       : imfile: in_processEvent process Event 40000100 for jinqiaotest_log\r\n9181.017802276:imfile.c       : imfile: in_handleDirEvent dir event for (Idx 0)/data/docker/volumes/*_log/* (mask 40000100)\r\n9181.017805258:imfile.c       : imfile: in_handleDirGetFullDir root='/data/docker/volumes/*_log/*' sub='jinqiaotest_log'\r\n9181.017810383:imfile.c       : imfile: Adding new dir '/data/docker/volumes/jinqiaotest_log' to dirs table\r\n9181.017813653:imfile.c       : imfile: dirsAdd added dir 3 to dirs table: '/data/docker/volumes/jinqiaotest_log'\r\n9181.017822846:imfile.c       : imfile: enter into wdmap[9]: wd 10, dir 3, lstn DIRECTORY:/data/docker/volumes/jinqiaotest_log\r\n9181.017825357:imfile.c       : imfile: in_setupDirWatch: watch 10 added for dir /data/docker/volumes/jinqiaotest_log(Idx=3)\r\n```\r\nso Directories can be dynamically added and removed，but file not\r\n#### 5.if restart rsyslog,dn stdout\r\n```\r\n9455.807833882:main Q:Reg/w0  : action 'action 0': called, logging to omkafka (susp 0/0, direct q 1)\r\n9455.807846426:main Q:Reg/w0  : wti 0x7fca58262ac0: we need to create a new action worker instance for action 0\r\n9455.807852544:main Q:Reg/w0  : wti 0x7fca58262ac0: created action worker instance 1 for action 0\r\n9455.807858700:main Q:Reg/w0  : Action 0 transitioned to state: itx\r\n9455.807863212:main Q:Reg/w0  : entering actionCalldoAction(), state: itx, actionNbr 0\r\n9455.807921634:main Q:Reg/w0  : omkafka setting brokers: '100.73.1.5:9092,100.73.1.6:9092,100.73.1.6:9092'nomkafka: trying to send: key:'(null)', msg:'test-selftest-app-018056 dockervolumes '/data/docker/volumes/jinqiaotest_log/test/test.log' test\r\n'\r\n9455.808310095:main Q:Reg/w0  : omkafka: kafka outqueue length: 1, callbacks called 0\r\n9455.808318693:main Q:Reg/w0  : omkafka: writeKafka returned 0\r\n9455.808327741:main Q:Reg/w0  : Action 0 transitioned to state: rdy\r\n9455.808334920:main Q:Reg/w0  : action 'action 0': set suspended state to 0\r\n9455.808339917:main Q:Reg/w0  : processBATCH: next msg 1: 123\r\n9455.808346774:main Q:Reg/w0  :     ACTION 0 [omkafka:action(type=\"omkafka\" ...)]\r\n9455.808361971:main Q:Reg/w0  : executing action 0\r\n9455.808368754:main Q:Reg/w0  : action 'action 0': called, logging to omkafka (susp 0/0, direct q 1)\r\n9455.808378791:main Q:Reg/w0  : Action 0 transitioned to state: itx\r\n9455.808386901:main Q:Reg/w0  : entering actionCalldoAction(), state: itx, actionNbr 0\r\n9455.808395641:main Q:Reg/w0  : omkafka: trying to send: key:'(null)', msg:'test-selftest-app-018056 dockervolumes '/data/docker/volumes/jinqiaotest_log/test/test.log' test\r\n'\r\n9455.808410272:main Q:Reg/w0  : omkafka: kafka outqueue length: 2, callbacks called 0\r\n'\r\n```\r\nit Work right,So i think Imfile multilevelwildcard not work add new path and new file.\r\nplease help，thanks!"},"comment":{"url":"https://api.github.com/repos/rsyslog/rsyslog/issues/comments/317981115","html_url":"https://github.com/rsyslog/rsyslog/issues/1644#issuecomment-317981115","issue_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1644","id":317981115,"user":{"login":"xiagujinqiao","id":6712820,"avatar_url":"https://avatars3.githubusercontent.com/u/6712820?v=4","gravatar_id":"","url":"https://api.github.com/users/xiagujinqiao","html_url":"https://github.com/xiagujinqiao","followers_url":"https://api.github.com/users/xiagujinqiao/followers","following_url":"https://api.github.com/users/xiagujinqiao/following{/other_user}","gists_url":"https://api.github.com/users/xiagujinqiao/gists{/gist_id}","starred_url":"https://api.github.com/users/xiagujinqiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiagujinqiao/subscriptions","organizations_url":"https://api.github.com/users/xiagujinqiao/orgs","repos_url":"https://api.github.com/users/xiagujinqiao/repos","events_url":"https://api.github.com/users/xiagujinqiao/events{/privacy}","received_events_url":"https://api.github.com/users/xiagujinqiao/received_events","type":"User","site_admin":false},"created_at":"2017-07-26T08:09:07Z","updated_at":"2017-07-26T08:09:07Z","body":"ok,close it,thank "}}
{"actor":{"display_login":"xiagujinqiao"}}