{"action":"closed","number":2069,"pull_request":{"url":"https://api.github.com/repos/elastic/beats/pulls/2069","id":78055226,"html_url":"https://github.com/elastic/beats/pull/2069","diff_url":"https://github.com/elastic/beats/pull/2069.diff","patch_url":"https://github.com/elastic/beats/pull/2069.patch","issue_url":"https://api.github.com/repos/elastic/beats/issues/2069","number":2069,"state":"closed","locked":false,"title":"Enhancements in system module","user":{"login":"monicasarbu","id":11757159,"avatar_url":"https://avatars.githubusercontent.com/u/11757159?v=3","gravatar_id":"","url":"https://api.github.com/users/monicasarbu","html_url":"https://github.com/monicasarbu","followers_url":"https://api.github.com/users/monicasarbu/followers","following_url":"https://api.github.com/users/monicasarbu/following{/other_user}","gists_url":"https://api.github.com/users/monicasarbu/gists{/gist_id}","starred_url":"https://api.github.com/users/monicasarbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monicasarbu/subscriptions","organizations_url":"https://api.github.com/users/monicasarbu/orgs","repos_url":"https://api.github.com/users/monicasarbu/repos","events_url":"https://api.github.com/users/monicasarbu/events{/privacy}","received_events_url":"https://api.github.com/users/monicasarbu/received_events","type":"User","site_admin":false},"body":"This PR is a proposal and includes couple of changes:\r\n- set `type` to `<module>.<metricset>` to be easier to define searches in Kibana\r\n- allow the metricset to define what groups of fields is adding instead of placing all metrics under the `system.<meticSet>. For example: for `system.memory`, `mem` and `swap` information are added (move one level up the swap information).\r\n- use gopsutil (instead of gosigar) to get memory statistics and export more information like `memory.available` instead of `actual`, for OSX/BSD (`memory.active`, `memory.inactive`, `memory.wired`), for Linux (`memory.buffers`, `memory.cached`). In addition `swap.in` and `swap.out` are exported.\r\n\r\n\r\nThis PR comes with a few breaking changes:\r\n- `system.cpu.load` -> `system.load`\r\n- `system.memory.swap` -> `system.swap`\r\n- `filesystem.avail` -> `filesystem.available`\r\n- `type: metricsets` -> `type: <module>.<metricSet>`\r\n\r\nThings that need to be updated:\r\n- [ ] docs\r\n- [ ] update the `Fetch()` function of the other modules (except system) to export the group of fields as they are added to event. For example an event returned by `Fetch` should contain `memory`: { \"total\": x, ...} instead of {\"total\": x, ...}\r\n\r\nHere is an example of the JSON object exported by the new version:\r\n```\r\n{\r\n  \"@timestamp\": \"2016-07-19T22:17:44.304Z\",\r\n  \"beat\": {\r\n    \"hostname\": \"mar.local\",\r\n    \"name\": \"mar.local\"\r\n  },\r\n  \"metricset\": {\r\n    \"module\": \"system\",\r\n    \"name\": \"memory\",\r\n    \"rtt\": 6427\r\n  },\r\n  \"system\": {\r\n    \"memory\": {\r\n      \"active\": 5930377216,\r\n      \"available\": 5852270592,\r\n      \"free\": 359858176,\r\n      \"inactive\": 5492412416,\r\n      \"total\": 17179869184,\r\n      \"used\": {\r\n        \"bytes\": 11327598592,\r\n        \"pct\": 0.6594\r\n      },\r\n      \"wired\": 3681193984\r\n    },\r\n    \"swap\": {\r\n      \"free\": 559750,\r\n      \"in\": 0,\r\n      \"out\": 0,\r\n      \"total\": 6144000,\r\n      \"used\": {\r\n        \"bytes\": 5584250,\r\n        \"pct\": 0.9089\r\n      }\r\n    }\r\n  },\r\n  \"type\": \"system.memory\"\r\n}\r\n```\r\n\r\n","created_at":"2016-07-19T21:48:23Z","updated_at":"2016-07-20T19:51:22Z","closed_at":"2016-07-20T19:51:22Z","merged_at":null,"merge_commit_sha":"a57756c551c371ff311f013c6aeff81ca5c5b2d2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/beats/pulls/2069/commits","review_comments_url":"https://api.github.com/repos/elastic/beats/pulls/2069/comments","review_comment_url":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/beats/issues/2069/comments","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/55cd7bc00c9f8853bacc1e8f995e8e075e37632d","head":{"label":"monicasarbu:use_gopsutil_mem","ref":"use_gopsutil_mem","sha":"55cd7bc00c9f8853bacc1e8f995e8e075e37632d","user":{"login":"monicasarbu","id":11757159,"avatar_url":"https://avatars.githubusercontent.com/u/11757159?v=3","gravatar_id":"","url":"https://api.github.com/users/monicasarbu","html_url":"https://github.com/monicasarbu","followers_url":"https://api.github.com/users/monicasarbu/followers","following_url":"https://api.github.com/users/monicasarbu/following{/other_user}","gists_url":"https://api.github.com/users/monicasarbu/gists{/gist_id}","starred_url":"https://api.github.com/users/monicasarbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monicasarbu/subscriptions","organizations_url":"https://api.github.com/users/monicasarbu/orgs","repos_url":"https://api.github.com/users/monicasarbu/repos","events_url":"https://api.github.com/users/monicasarbu/events{/privacy}","received_events_url":"https://api.github.com/users/monicasarbu/received_events","type":"User","site_admin":false},"repo":{"id":47255032,"name":"beats","full_name":"monicasarbu/beats","owner":{"login":"monicasarbu","id":11757159,"avatar_url":"https://avatars.githubusercontent.com/u/11757159?v=3","gravatar_id":"","url":"https://api.github.com/users/monicasarbu","html_url":"https://github.com/monicasarbu","followers_url":"https://api.github.com/users/monicasarbu/followers","following_url":"https://api.github.com/users/monicasarbu/following{/other_user}","gists_url":"https://api.github.com/users/monicasarbu/gists{/gist_id}","starred_url":"https://api.github.com/users/monicasarbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monicasarbu/subscriptions","organizations_url":"https://api.github.com/users/monicasarbu/orgs","repos_url":"https://api.github.com/users/monicasarbu/repos","events_url":"https://api.github.com/users/monicasarbu/events{/privacy}","received_events_url":"https://api.github.com/users/monicasarbu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/monicasarbu/beats","description":"Moved here: https://github.com/elastic/beats","fork":true,"url":"https://api.github.com/repos/monicasarbu/beats","forks_url":"https://api.github.com/repos/monicasarbu/beats/forks","keys_url":"https://api.github.com/repos/monicasarbu/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monicasarbu/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monicasarbu/beats/teams","hooks_url":"https://api.github.com/repos/monicasarbu/beats/hooks","issue_events_url":"https://api.github.com/repos/monicasarbu/beats/issues/events{/number}","events_url":"https://api.github.com/repos/monicasarbu/beats/events","assignees_url":"https://api.github.com/repos/monicasarbu/beats/assignees{/user}","branches_url":"https://api.github.com/repos/monicasarbu/beats/branches{/branch}","tags_url":"https://api.github.com/repos/monicasarbu/beats/tags","blobs_url":"https://api.github.com/repos/monicasarbu/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monicasarbu/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monicasarbu/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/monicasarbu/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monicasarbu/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/monicasarbu/beats/languages","stargazers_url":"https://api.github.com/repos/monicasarbu/beats/stargazers","contributors_url":"https://api.github.com/repos/monicasarbu/beats/contributors","subscribers_url":"https://api.github.com/repos/monicasarbu/beats/subscribers","subscription_url":"https://api.github.com/repos/monicasarbu/beats/subscription","commits_url":"https://api.github.com/repos/monicasarbu/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/monicasarbu/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/monicasarbu/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/monicasarbu/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/monicasarbu/beats/contents/{+path}","compare_url":"https://api.github.com/repos/monicasarbu/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monicasarbu/beats/merges","archive_url":"https://api.github.com/repos/monicasarbu/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monicasarbu/beats/downloads","issues_url":"https://api.github.com/repos/monicasarbu/beats/issues{/number}","pulls_url":"https://api.github.com/repos/monicasarbu/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/monicasarbu/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/monicasarbu/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monicasarbu/beats/labels{/name}","releases_url":"https://api.github.com/repos/monicasarbu/beats/releases{/id}","deployments_url":"https://api.github.com/repos/monicasarbu/beats/deployments","created_at":"2015-12-02T10:50:02Z","updated_at":"2015-12-02T10:50:07Z","pushed_at":"2016-07-20T19:48:59Z","git_url":"git://github.com/monicasarbu/beats.git","ssh_url":"git@github.com:monicasarbu/beats.git","clone_url":"https://github.com/monicasarbu/beats.git","svn_url":"https://github.com/monicasarbu/beats","homepage":"","size":36544,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"2e761cd18989d7e075f0527dede5563c4ce48db8","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":16554739,"name":"beats","full_name":"elastic/beats","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/beats","description":":tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash ","fork":false,"url":"https://api.github.com/repos/elastic/beats","forks_url":"https://api.github.com/repos/elastic/beats/forks","keys_url":"https://api.github.com/repos/elastic/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/beats/teams","hooks_url":"https://api.github.com/repos/elastic/beats/hooks","issue_events_url":"https://api.github.com/repos/elastic/beats/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/beats/events","assignees_url":"https://api.github.com/repos/elastic/beats/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/beats/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/beats/tags","blobs_url":"https://api.github.com/repos/elastic/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/beats/languages","stargazers_url":"https://api.github.com/repos/elastic/beats/stargazers","contributors_url":"https://api.github.com/repos/elastic/beats/contributors","subscribers_url":"https://api.github.com/repos/elastic/beats/subscribers","subscription_url":"https://api.github.com/repos/elastic/beats/subscription","commits_url":"https://api.github.com/repos/elastic/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/beats/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/beats/merges","archive_url":"https://api.github.com/repos/elastic/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/beats/downloads","issues_url":"https://api.github.com/repos/elastic/beats/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/beats/labels{/name}","releases_url":"https://api.github.com/repos/elastic/beats/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/beats/deployments","created_at":"2014-02-05T19:01:02Z","updated_at":"2016-07-20T14:56:00Z","pushed_at":"2016-07-20T19:48:59Z","git_url":"git://github.com/elastic/beats.git","ssh_url":"git@github.com:elastic/beats.git","clone_url":"https://github.com/elastic/beats.git","svn_url":"https://github.com/elastic/beats","homepage":"https://www.elastic.co/products/beats","size":41815,"stargazers_count":2982,"watchers_count":2982,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":499,"mirror_url":null,"open_issues_count":273,"forks":499,"open_issues":273,"watchers":2982,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/beats/pulls/2069"},"html":{"href":"https://github.com/elastic/beats/pull/2069"},"issue":{"href":"https://api.github.com/repos/elastic/beats/issues/2069"},"comments":{"href":"https://api.github.com/repos/elastic/beats/issues/2069/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/beats/pulls/2069/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/beats/pulls/2069/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/beats/statuses/55cd7bc00c9f8853bacc1e8f995e8e075e37632d"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":3,"review_comments":4,"commits":1,"additions":463,"deletions":334,"changed_files":22}}
{"actor":{"display_login":"monicasarbu"}}