{"action":"opened","issue":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/128","repository_url":"https://api.github.com/repos/logstash-plugins/logstash-input-file","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/128/comments","events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-file/issues/128/events","html_url":"https://github.com/logstash-plugins/logstash-input-file/issues/128","id":154622410,"number":128,"title":"Options to disable 'host' and/or 'path' field adding.","user":{"login":"jeesim2","id":1100831,"avatar_url":"https://avatars.githubusercontent.com/u/1100831?v=3","gravatar_id":"","url":"https://api.github.com/users/jeesim2","html_url":"https://github.com/jeesim2","followers_url":"https://api.github.com/users/jeesim2/followers","following_url":"https://api.github.com/users/jeesim2/following{/other_user}","gists_url":"https://api.github.com/users/jeesim2/gists{/gist_id}","starred_url":"https://api.github.com/users/jeesim2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeesim2/subscriptions","organizations_url":"https://api.github.com/users/jeesim2/orgs","repos_url":"https://api.github.com/users/jeesim2/repos","events_url":"https://api.github.com/users/jeesim2/events{/privacy}","received_events_url":"https://api.github.com/users/jeesim2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-13T02:41:37Z","updated_at":"2016-05-13T02:41:37Z","closed_at":null,"body":"previous discuss \r\nhttps://discuss.elastic.co/t/not-to-add-host-path-field/49889/2\r\n\r\nHi.\r\n\r\nWith this configuration,\r\n```\r\ninput {\r\n    file {\r\n       codec ... json\r\n        path   => ...\r\n    }\r\n}\r\noutput {\r\n    elasticsearch {\r\n        ...\r\n    }\r\n}\r\n```\r\n\r\nlogstash will add fields 'host' and 'path' to the origin document.\r\n\r\n```\r\n  \"_source\": {\r\n   ...\r\n    \"path\": \"/home1/.logstash/input/default_agg_daily/0505.json\",\r\n    \"host\": \"xyzzzz\"\r\n  },\r\n```\r\n\r\nAnd I want to remove path and host by\r\n```\r\nmutate {remove_fileds => [...] }\r\n```\r\n\r\nBut some case the origin document may contain field 'path' and/or 'host'.\r\nSo I can not use remove_filds simply.\r\n\r\nHow about provide an option to disable host and path field adding?"}}