{"action":"created","issue":{"url":"https://api.github.com/repos/vjeantet/bitfan/issues/67","repository_url":"https://api.github.com/repos/vjeantet/bitfan","labels_url":"https://api.github.com/repos/vjeantet/bitfan/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/vjeantet/bitfan/issues/67/comments","events_url":"https://api.github.com/repos/vjeantet/bitfan/issues/67/events","html_url":"https://github.com/vjeantet/bitfan/issues/67","id":282063024,"number":67,"title":"I can't use items of array after mutate split","user":{"login":"AlexAkulov","id":7137047,"avatar_url":"https://avatars0.githubusercontent.com/u/7137047?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexAkulov","html_url":"https://github.com/AlexAkulov","followers_url":"https://api.github.com/users/AlexAkulov/followers","following_url":"https://api.github.com/users/AlexAkulov/following{/other_user}","gists_url":"https://api.github.com/users/AlexAkulov/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexAkulov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexAkulov/subscriptions","organizations_url":"https://api.github.com/users/AlexAkulov/orgs","repos_url":"https://api.github.com/users/AlexAkulov/repos","events_url":"https://api.github.com/users/AlexAkulov/events{/privacy}","received_events_url":"https://api.github.com/users/AlexAkulov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-14T11:07:50Z","updated_at":"2017-12-14T14:03:31Z","closed_at":null,"author_association":"COLLABORATOR","body":"Hello! \r\nMy usual case is receiving tab-separated line, split, and manipulate items. But in bitfan I can't use items of array after mutate split.\r\n\r\nFor example:\r\nconfig:\r\n```\r\ninput {\r\n    stdin {}\r\n}\r\nfilter {\r\n    mutate {\r\n        split => {\"message\" => \" \"}\r\n    }\r\n    mutate {\r\n        add_field => {\r\n            \"one\" => \"%{message[0]}\",\r\n            \"two\" => \"%{message[1]}\",\r\n            \"three\" => \"%{message.2}\",\r\n            \"four\" => \"%{[message][3]}\"\r\n        }\r\n    }\r\n}\r\noutput {\r\n  stdout {\r\n     codec => rubydebug { }\r\n  }\r\n}\r\n\r\n```\r\noutput:\r\n```\r\n$ bitfan run\r\n1 2 3 4\r\n{\r\n  \"@timestamp\": 2017-12-14 13:46:34 Local,\r\n  \"tags\":       []string{},\r\n  \"one\":        \"[1 2 3 4]\",\r\n  \"two\":        \"\",\r\n  \"three\":      \"\",\r\n  \"four\":       \"\",\r\n  \"host\":       \"vm-bitfan1\",\r\n  \"message\":    []string{\r\n    \"1\",\r\n    \"2\",\r\n    \"3\",\r\n    \"4\",\r\n  },\r\n}\r\n```\r\nProbably it is specific of \"github.com/clbanning/mxj\", this library supports only maps but not slices."},"comment":{"url":"https://api.github.com/repos/vjeantet/bitfan/issues/comments/351719194","html_url":"https://github.com/vjeantet/bitfan/issues/67#issuecomment-351719194","issue_url":"https://api.github.com/repos/vjeantet/bitfan/issues/67","id":351719194,"user":{"login":"vjeantet","id":1162157,"avatar_url":"https://avatars1.githubusercontent.com/u/1162157?v=4","gravatar_id":"","url":"https://api.github.com/users/vjeantet","html_url":"https://github.com/vjeantet","followers_url":"https://api.github.com/users/vjeantet/followers","following_url":"https://api.github.com/users/vjeantet/following{/other_user}","gists_url":"https://api.github.com/users/vjeantet/gists{/gist_id}","starred_url":"https://api.github.com/users/vjeantet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjeantet/subscriptions","organizations_url":"https://api.github.com/users/vjeantet/orgs","repos_url":"https://api.github.com/users/vjeantet/repos","events_url":"https://api.github.com/users/vjeantet/events{/privacy}","received_events_url":"https://api.github.com/users/vjeantet/received_events","type":"User","site_admin":false},"created_at":"2017-12-14T14:03:31Z","updated_at":"2017-12-14T14:03:31Z","author_association":"OWNER","body":"I think this is related to a bug on the Split func\nWhich split and set []string instead of []interface\n\nMxj knows how to handle []interface"}}
{"actor":{"display_login":"vjeantet"}}