{"action":"created","issue":{"url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent/issues/16","repository_url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent","labels_url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent/issues/16/comments","events_url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent/issues/16/events","html_url":"https://github.com/nginxinc/nginx-amplify-agent/pull/16","id":145157867,"number":16,"title":"Fix following error in psutil.Process.cpu_percent method:","user":{"login":"vadamlyuk","id":18002553,"avatar_url":"https://avatars.githubusercontent.com/u/18002553?v=3","gravatar_id":"","url":"https://api.github.com/users/vadamlyuk","html_url":"https://github.com/vadamlyuk","followers_url":"https://api.github.com/users/vadamlyuk/followers","following_url":"https://api.github.com/users/vadamlyuk/following{/other_user}","gists_url":"https://api.github.com/users/vadamlyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/vadamlyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadamlyuk/subscriptions","organizations_url":"https://api.github.com/users/vadamlyuk/orgs","repos_url":"https://api.github.com/users/vadamlyuk/repos","events_url":"https://api.github.com/users/vadamlyuk/events{/privacy}","received_events_url":"https://api.github.com/users/vadamlyuk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dedm","id":11830034,"avatar_url":"https://avatars.githubusercontent.com/u/11830034?v=3","gravatar_id":"","url":"https://api.github.com/users/dedm","html_url":"https://github.com/dedm","followers_url":"https://api.github.com/users/dedm/followers","following_url":"https://api.github.com/users/dedm/following{/other_user}","gists_url":"https://api.github.com/users/dedm/gists{/gist_id}","starred_url":"https://api.github.com/users/dedm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dedm/subscriptions","organizations_url":"https://api.github.com/users/dedm/orgs","repos_url":"https://api.github.com/users/dedm/repos","events_url":"https://api.github.com/users/dedm/events{/privacy}","received_events_url":"https://api.github.com/users/dedm/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-04-01T11:43:29Z","updated_at":"2016-04-01T21:43:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent/pulls/16","html_url":"https://github.com/nginxinc/nginx-amplify-agent/pull/16","diff_url":"https://github.com/nginxinc/nginx-amplify-agent/pull/16.diff","patch_url":"https://github.com/nginxinc/nginx-amplify-agent/pull/16.patch"},"body":"2016-04-01 13:44:39,299 [12628] nginx_metrics failed to collect metrics workers_cpu due to AttributeError\r\n2016-04-01 13:44:39,299 [12628] nginx_metrics additional info:\r\nTraceback (most recent call last):\r\n  File \"/usr/local/src/nginx-amplify/nginx-amplify-agent/amplify/agent/containers/nginx/collectors/metrics.py\", line 49, in collect\r\n    method()\r\n  File \"/usr/local/src/nginx-amplify/nginx-amplify-agent/amplify/agent/containers/nginx/collectors/metrics.py\", line 182, in workers_cpu\r\n    u, s = p.cpu_percent()\r\n  File \"/usr/local/src/nginx-amplify/nginx-amplify-agent/amplify/agent/util/ps.py\", line 38, in cpu_percent\r\n    if psutil._POSIX:\r\nAttributeError: 'module' object has no attribute '_POSIX'\r\n"},"comment":{"url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent/issues/comments/204576176","html_url":"https://github.com/nginxinc/nginx-amplify-agent/pull/16#issuecomment-204576176","issue_url":"https://api.github.com/repos/nginxinc/nginx-amplify-agent/issues/16","id":204576176,"user":{"login":"vadamlyuk","id":18002553,"avatar_url":"https://avatars.githubusercontent.com/u/18002553?v=3","gravatar_id":"","url":"https://api.github.com/users/vadamlyuk","html_url":"https://github.com/vadamlyuk","followers_url":"https://api.github.com/users/vadamlyuk/followers","following_url":"https://api.github.com/users/vadamlyuk/following{/other_user}","gists_url":"https://api.github.com/users/vadamlyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/vadamlyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadamlyuk/subscriptions","organizations_url":"https://api.github.com/users/vadamlyuk/orgs","repos_url":"https://api.github.com/users/vadamlyuk/repos","events_url":"https://api.github.com/users/vadamlyuk/events{/privacy}","received_events_url":"https://api.github.com/users/vadamlyuk/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T21:43:32Z","updated_at":"2016-04-01T21:43:32Z","body":"Yah, probably you are right.\r\n\r\nMy OS (OpenSuSE) doen't supported by install script and I made instalation by myself.\r\nAnd seems I have made this incorrect and that is the source of problem.\r\nBut anyway amplify agent works fine in my case after this small fix even in wrong instalation.\r\n\r\n# python\r\nPython 2.7.10 (default, May 24 2015, 14:46:10) [GCC] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import psutil\r\n>>> psutil.__version__\r\n'4.1.0'\r\n>>> from amplify import psutil\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nImportError: cannot import name psutil\r\n>>> psutil.__version__\r\n'4.1.0'\r\n>>>\r\n"}}