{"action":"opened","number":6239,"pull_request":{"url":"https://api.github.com/repos/Icinga/icinga2/pulls/6239","id":182586198,"html_url":"https://github.com/Icinga/icinga2/pull/6239","diff_url":"https://github.com/Icinga/icinga2/pull/6239.diff","patch_url":"https://github.com/Icinga/icinga2/pull/6239.patch","issue_url":"https://api.github.com/repos/Icinga/icinga2/issues/6239","number":6239,"state":"open","locked":false,"title":"Fix Windows check_memory rounding","user":{"login":"mcktr","id":18580278,"avatar_url":"https://avatars2.githubusercontent.com/u/18580278?v=4","gravatar_id":"","url":"https://api.github.com/users/mcktr","html_url":"https://github.com/mcktr","followers_url":"https://api.github.com/users/mcktr/followers","following_url":"https://api.github.com/users/mcktr/following{/other_user}","gists_url":"https://api.github.com/users/mcktr/gists{/gist_id}","starred_url":"https://api.github.com/users/mcktr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcktr/subscriptions","organizations_url":"https://api.github.com/users/mcktr/orgs","repos_url":"https://api.github.com/users/mcktr/repos","events_url":"https://api.github.com/users/mcktr/events{/privacy}","received_events_url":"https://api.github.com/users/mcktr/received_events","type":"User","site_admin":false},"body":"This PR adds floating numbers to the performance data output to correct the rounding and the return value calculation. \r\n\r\n# Tests\r\n\r\nWithout this PR:\r\n\r\n```\r\n.\\check_memory.exe -u GB -w 20% -c 0.1%\r\nMEMORY OK - 17.7469% free| memory=1GB;0.80000000000000004;0.0040000000000000001;0;4\r\n```\r\n\r\nReturns OK, although the warning threshold is exceeded.\r\n\r\nWith PR: \r\n\r\n```\r\n.\\check_memory.exe -u GB -w 20% -c 0.1%\r\nMEMORY WARNING - 17.7633% free| memory=0.71GB;0.80000000000000004;0.0040000000000000001;0;4\r\n```\r\n\r\nReturns rightly WARNING.\r\n\r\nOther units:\r\n\r\n```\r\n .\\check_memory.exe -u KB\r\nMEMORY OK - 16.8722% free| memory=707592kB;;;0;4.19384e+06\r\n\r\n.\\check_memory.exe -u MB\r\nMEMORY OK - 16.8862% free| memory=691.58MB;;;0;4095.55\r\n\r\n.\\check_memory.exe -u GB\r\nMEMORY OK - 16.9085% free| memory=0.676GB;;;0;4\r\n\r\n.\\check_memory.exe -u TB\r\nMEMORY OK - 16.9132% free| memory=0.0007TB;;;0;0.0039\r\n```\r\n\r\nfixes #6161","created_at":"2018-04-18T19:57:24Z","updated_at":"2018-04-18T19:57:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":520053689,"url":"https://api.github.com/repos/Icinga/icinga2/labels/Plugins","name":"Plugins","color":"5882FA","default":false},{"id":526396823,"url":"https://api.github.com/repos/Icinga/icinga2/labels/Windows","name":"Windows","color":"1d76ee","default":false},{"id":54043337,"url":"https://api.github.com/repos/Icinga/icinga2/labels/bug","name":"bug","color":"fc2929","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/Icinga/icinga2/pulls/6239/commits","review_comments_url":"https://api.github.com/repos/Icinga/icinga2/pulls/6239/comments","review_comment_url":"https://api.github.com/repos/Icinga/icinga2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Icinga/icinga2/issues/6239/comments","statuses_url":"https://api.github.com/repos/Icinga/icinga2/statuses/8cbb7494d2a7f727c89cbc9a51457f381d058a3f","head":{"label":"Icinga:fix/windows-check-memory","ref":"fix/windows-check-memory","sha":"8cbb7494d2a7f727c89cbc9a51457f381d058a3f","user":{"login":"Icinga","id":835441,"avatar_url":"https://avatars3.githubusercontent.com/u/835441?v=4","gravatar_id":"","url":"https://api.github.com/users/Icinga","html_url":"https://github.com/Icinga","followers_url":"https://api.github.com/users/Icinga/followers","following_url":"https://api.github.com/users/Icinga/following{/other_user}","gists_url":"https://api.github.com/users/Icinga/gists{/gist_id}","starred_url":"https://api.github.com/users/Icinga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Icinga/subscriptions","organizations_url":"https://api.github.com/users/Icinga/orgs","repos_url":"https://api.github.com/users/Icinga/repos","events_url":"https://api.github.com/users/Icinga/events{/privacy}","received_events_url":"https://api.github.com/users/Icinga/received_events","type":"Organization","site_admin":false},"repo":{"id":12440855,"name":"icinga2","full_name":"Icinga/icinga2","owner":{"login":"Icinga","id":835441,"avatar_url":"https://avatars3.githubusercontent.com/u/835441?v=4","gravatar_id":"","url":"https://api.github.com/users/Icinga","html_url":"https://github.com/Icinga","followers_url":"https://api.github.com/users/Icinga/followers","following_url":"https://api.github.com/users/Icinga/following{/other_user}","gists_url":"https://api.github.com/users/Icinga/gists{/gist_id}","starred_url":"https://api.github.com/users/Icinga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Icinga/subscriptions","organizations_url":"https://api.github.com/users/Icinga/orgs","repos_url":"https://api.github.com/users/Icinga/repos","events_url":"https://api.github.com/users/Icinga/events{/privacy}","received_events_url":"https://api.github.com/users/Icinga/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Icinga/icinga2","description":"Monitoring as code","fork":false,"url":"https://api.github.com/repos/Icinga/icinga2","forks_url":"https://api.github.com/repos/Icinga/icinga2/forks","keys_url":"https://api.github.com/repos/Icinga/icinga2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Icinga/icinga2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Icinga/icinga2/teams","hooks_url":"https://api.github.com/repos/Icinga/icinga2/hooks","issue_events_url":"https://api.github.com/repos/Icinga/icinga2/issues/events{/number}","events_url":"https://api.github.com/repos/Icinga/icinga2/events","assignees_url":"https://api.github.com/repos/Icinga/icinga2/assignees{/user}","branches_url":"https://api.github.com/repos/Icinga/icinga2/branches{/branch}","tags_url":"https://api.github.com/repos/Icinga/icinga2/tags","blobs_url":"https://api.github.com/repos/Icinga/icinga2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Icinga/icinga2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Icinga/icinga2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Icinga/icinga2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Icinga/icinga2/statuses/{sha}","languages_url":"https://api.github.com/repos/Icinga/icinga2/languages","stargazers_url":"https://api.github.com/repos/Icinga/icinga2/stargazers","contributors_url":"https://api.github.com/repos/Icinga/icinga2/contributors","subscribers_url":"https://api.github.com/repos/Icinga/icinga2/subscribers","subscription_url":"https://api.github.com/repos/Icinga/icinga2/subscription","commits_url":"https://api.github.com/repos/Icinga/icinga2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Icinga/icinga2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Icinga/icinga2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Icinga/icinga2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Icinga/icinga2/contents/{+path}","compare_url":"https://api.github.com/repos/Icinga/icinga2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Icinga/icinga2/merges","archive_url":"https://api.github.com/repos/Icinga/icinga2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Icinga/icinga2/downloads","issues_url":"https://api.github.com/repos/Icinga/icinga2/issues{/number}","pulls_url":"https://api.github.com/repos/Icinga/icinga2/pulls{/number}","milestones_url":"https://api.github.com/repos/Icinga/icinga2/milestones{/number}","notifications_url":"https://api.github.com/repos/Icinga/icinga2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Icinga/icinga2/labels{/name}","releases_url":"https://api.github.com/repos/Icinga/icinga2/releases{/id}","deployments_url":"https://api.github.com/repos/Icinga/icinga2/deployments","created_at":"2013-08-28T18:02:06Z","updated_at":"2018-04-18T13:42:34Z","pushed_at":"2018-04-18T19:43:14Z","git_url":"git://github.com/Icinga/icinga2.git","ssh_url":"git@github.com:Icinga/icinga2.git","clone_url":"https://github.com/Icinga/icinga2.git","svn_url":"https://github.com/Icinga/icinga2","homepage":"https://www.icinga.com/products/icinga-2/","size":34165,"stargazers_count":887,"watchers_count":887,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":334,"mirror_url":null,"archived":false,"open_issues_count":274,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":334,"open_issues":274,"watchers":887,"default_branch":"master"}},"base":{"label":"Icinga:master","ref":"master","sha":"c7b6488e905afb08a832aa829146fe80acd0d0ed","user":{"login":"Icinga","id":835441,"avatar_url":"https://avatars3.githubusercontent.com/u/835441?v=4","gravatar_id":"","url":"https://api.github.com/users/Icinga","html_url":"https://github.com/Icinga","followers_url":"https://api.github.com/users/Icinga/followers","following_url":"https://api.github.com/users/Icinga/following{/other_user}","gists_url":"https://api.github.com/users/Icinga/gists{/gist_id}","starred_url":"https://api.github.com/users/Icinga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Icinga/subscriptions","organizations_url":"https://api.github.com/users/Icinga/orgs","repos_url":"https://api.github.com/users/Icinga/repos","events_url":"https://api.github.com/users/Icinga/events{/privacy}","received_events_url":"https://api.github.com/users/Icinga/received_events","type":"Organization","site_admin":false},"repo":{"id":12440855,"name":"icinga2","full_name":"Icinga/icinga2","owner":{"login":"Icinga","id":835441,"avatar_url":"https://avatars3.githubusercontent.com/u/835441?v=4","gravatar_id":"","url":"https://api.github.com/users/Icinga","html_url":"https://github.com/Icinga","followers_url":"https://api.github.com/users/Icinga/followers","following_url":"https://api.github.com/users/Icinga/following{/other_user}","gists_url":"https://api.github.com/users/Icinga/gists{/gist_id}","starred_url":"https://api.github.com/users/Icinga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Icinga/subscriptions","organizations_url":"https://api.github.com/users/Icinga/orgs","repos_url":"https://api.github.com/users/Icinga/repos","events_url":"https://api.github.com/users/Icinga/events{/privacy}","received_events_url":"https://api.github.com/users/Icinga/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Icinga/icinga2","description":"Monitoring as code","fork":false,"url":"https://api.github.com/repos/Icinga/icinga2","forks_url":"https://api.github.com/repos/Icinga/icinga2/forks","keys_url":"https://api.github.com/repos/Icinga/icinga2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Icinga/icinga2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Icinga/icinga2/teams","hooks_url":"https://api.github.com/repos/Icinga/icinga2/hooks","issue_events_url":"https://api.github.com/repos/Icinga/icinga2/issues/events{/number}","events_url":"https://api.github.com/repos/Icinga/icinga2/events","assignees_url":"https://api.github.com/repos/Icinga/icinga2/assignees{/user}","branches_url":"https://api.github.com/repos/Icinga/icinga2/branches{/branch}","tags_url":"https://api.github.com/repos/Icinga/icinga2/tags","blobs_url":"https://api.github.com/repos/Icinga/icinga2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Icinga/icinga2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Icinga/icinga2/git/refs{/sha}","trees_url":"https://api.github.com/repos/Icinga/icinga2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Icinga/icinga2/statuses/{sha}","languages_url":"https://api.github.com/repos/Icinga/icinga2/languages","stargazers_url":"https://api.github.com/repos/Icinga/icinga2/stargazers","contributors_url":"https://api.github.com/repos/Icinga/icinga2/contributors","subscribers_url":"https://api.github.com/repos/Icinga/icinga2/subscribers","subscription_url":"https://api.github.com/repos/Icinga/icinga2/subscription","commits_url":"https://api.github.com/repos/Icinga/icinga2/commits{/sha}","git_commits_url":"https://api.github.com/repos/Icinga/icinga2/git/commits{/sha}","comments_url":"https://api.github.com/repos/Icinga/icinga2/comments{/number}","issue_comment_url":"https://api.github.com/repos/Icinga/icinga2/issues/comments{/number}","contents_url":"https://api.github.com/repos/Icinga/icinga2/contents/{+path}","compare_url":"https://api.github.com/repos/Icinga/icinga2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Icinga/icinga2/merges","archive_url":"https://api.github.com/repos/Icinga/icinga2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Icinga/icinga2/downloads","issues_url":"https://api.github.com/repos/Icinga/icinga2/issues{/number}","pulls_url":"https://api.github.com/repos/Icinga/icinga2/pulls{/number}","milestones_url":"https://api.github.com/repos/Icinga/icinga2/milestones{/number}","notifications_url":"https://api.github.com/repos/Icinga/icinga2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Icinga/icinga2/labels{/name}","releases_url":"https://api.github.com/repos/Icinga/icinga2/releases{/id}","deployments_url":"https://api.github.com/repos/Icinga/icinga2/deployments","created_at":"2013-08-28T18:02:06Z","updated_at":"2018-04-18T13:42:34Z","pushed_at":"2018-04-18T19:43:14Z","git_url":"git://github.com/Icinga/icinga2.git","ssh_url":"git@github.com:Icinga/icinga2.git","clone_url":"https://github.com/Icinga/icinga2.git","svn_url":"https://github.com/Icinga/icinga2","homepage":"https://www.icinga.com/products/icinga-2/","size":34165,"stargazers_count":887,"watchers_count":887,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":334,"mirror_url":null,"archived":false,"open_issues_count":274,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":334,"open_issues":274,"watchers":887,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Icinga/icinga2/pulls/6239"},"html":{"href":"https://github.com/Icinga/icinga2/pull/6239"},"issue":{"href":"https://api.github.com/repos/Icinga/icinga2/issues/6239"},"comments":{"href":"https://api.github.com/repos/Icinga/icinga2/issues/6239/comments"},"review_comments":{"href":"https://api.github.com/repos/Icinga/icinga2/pulls/6239/comments"},"review_comment":{"href":"https://api.github.com/repos/Icinga/icinga2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Icinga/icinga2/pulls/6239/commits"},"statuses":{"href":"https://api.github.com/repos/Icinga/icinga2/statuses/8cbb7494d2a7f727c89cbc9a51457f381d058a3f"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":2,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"mcktr"}}