{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/logstash-forwarder/issues/477","labels_url":"https://api.github.com/repos/elastic/logstash-forwarder/issues/477/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash-forwarder/issues/477/comments","events_url":"https://api.github.com/repos/elastic/logstash-forwarder/issues/477/events","html_url":"https://github.com/elastic/logstash-forwarder/pull/477","id":90231035,"number":477,"title":"Add a feature 'dead size' to lsf","user":{"login":"nehaljwani","id":1779189,"avatar_url":"https://avatars.githubusercontent.com/u/1779189?v=3","gravatar_id":"","url":"https://api.github.com/users/nehaljwani","html_url":"https://github.com/nehaljwani","followers_url":"https://api.github.com/users/nehaljwani/followers","following_url":"https://api.github.com/users/nehaljwani/following{/other_user}","gists_url":"https://api.github.com/users/nehaljwani/gists{/gist_id}","starred_url":"https://api.github.com/users/nehaljwani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nehaljwani/subscriptions","organizations_url":"https://api.github.com/users/nehaljwani/orgs","repos_url":"https://api.github.com/users/nehaljwani/repos","events_url":"https://api.github.com/users/nehaljwani/events{/privacy}","received_events_url":"https://api.github.com/users/nehaljwani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-22T22:36:16Z","updated_at":"2015-06-23T01:00:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/logstash-forwarder/pulls/477","html_url":"https://github.com/elastic/logstash-forwarder/pull/477","diff_url":"https://github.com/elastic/logstash-forwarder/pull/477.diff","patch_url":"https://github.com/elastic/logstash-forwarder/pull/477.patch"},"body":"This feature enables users to specify a dead size for the log files.\r\nAs soon as the size of the log file exceeds the gives size, lsf will\r\nstop reading logs from the file. It will resume reading, only when\r\nthe log file is rotated or renamed.\r\n\r\nChanges:\r\n* config.go:\r\n  Rename deadtime to deadTimeDur to explicitely determine it's usage\r\n  Introduce DeadSize (string) and deadSizeVal (uint64)\r\n* harvestor.go:\r\n  Apply check for dead size. Stop harvesting once exceeded.\r\n* logstash-forwarder.go:\r\n  Introduce a global map and mutex for deadfile db.\r\n* prospector.go:\r\n  Resume harvestor on dead files only under certain conditions.\r\n* bytefmt.go:\r\n  Add function to convert size-string to bytes\r\n* bytefmt_test.go:\r\n  Add unit testcases for the new conversion function"},"comment":{"url":"https://api.github.com/repos/elastic/logstash-forwarder/issues/comments/114315177","html_url":"https://github.com/elastic/logstash-forwarder/pull/477#issuecomment-114315177","issue_url":"https://api.github.com/repos/elastic/logstash-forwarder/issues/477","id":114315177,"user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T01:00:53Z","updated_at":"2015-06-23T01:00:53Z","body":"What is the goal of stopping reading? What consequence is the length of the\nfile being read?\n\nOn Monday, June 22, 2015, Nehal J Wani <notifications@github.com> wrote:\n\n> Oh. @jordansissel <https://github.com/jordansissel> I think I put a\n> confusing message in the commit. s/writing/reading. The 'dead size'\n> parameter enables user to put a threshold on the maximum amount of data to\n> be forwarded for a given log file. So, for example, my application writes\n> logs to the file /var/log/myapp.log and lsf is configured to ship it's\n> contents somewhere, then it should stop harvesting the file as soon as it\n> crosses the 'dead size' for that file. But should resume from 0, when the\n> file is rotated.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/elastic/logstash-forwarder/pull/477#issuecomment-114312328>\n> .\n>\n"}}