{"action":"created","comment":{"url":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/comments/89055681","pull_request_review_id":9606369,"id":89055681,"diff_hunk":"@@ -0,0 +1,55 @@\n+from flask import Flask, request\n+import urllib2\n+import tendrl.utils as utils\n+from multiprocessing import Process\n+import ast\n+from tendrl.TimeSeriesDBManager import TimeSeriesDBManager\n+\n+app = Flask(__name__)\n+\n+@app.route(\"/monitoring/nodes/<node_name>/<resource_name>/stats\")\n+def getStats(node_name, resource_name):\n+    return TimeSeriesDBManager().get_plugin().get_metric_stats(node_name, resource_name)\n+\n+\n+@app.route(\"/moitoring/nodes/<node_name>/monitored_types\")","path":"tendrl/APIManager.py","position":null,"original_position":15,"commit_id":"e1ea34448b08450dae2e891e3daaa81f31a37611","original_commit_id":"d9c7684f39ef9a93db9722edfa92d52ec976823d","user":{"login":"anmolbabu","id":3525639,"avatar_url":"https://avatars.githubusercontent.com/u/3525639?v=3","gravatar_id":"","url":"https://api.github.com/users/anmolbabu","html_url":"https://github.com/anmolbabu","followers_url":"https://api.github.com/users/anmolbabu/followers","following_url":"https://api.github.com/users/anmolbabu/following{/other_user}","gists_url":"https://api.github.com/users/anmolbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/anmolbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anmolbabu/subscriptions","organizations_url":"https://api.github.com/users/anmolbabu/orgs","repos_url":"https://api.github.com/users/anmolbabu/repos","events_url":"https://api.github.com/users/anmolbabu/events{/privacy}","received_events_url":"https://api.github.com/users/anmolbabu/received_events","type":"User","site_admin":false},"body":"Addressed in https://github.com/Tendrl/performance_monitoring/pull/2","created_at":"2016-11-22T07:30:42Z","updated_at":"2016-11-22T07:30:42Z","html_url":"https://github.com/Tendrl/performance_monitoring/pull/1#discussion_r89055681","pull_request_url":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/comments/89055681"},"html":{"href":"https://github.com/Tendrl/performance_monitoring/pull/1#discussion_r89055681"},"pull_request":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1","id":92484422,"html_url":"https://github.com/Tendrl/performance_monitoring/pull/1","diff_url":"https://github.com/Tendrl/performance_monitoring/pull/1.diff","patch_url":"https://github.com/Tendrl/performance_monitoring/pull/1.patch","issue_url":"https://api.github.com/repos/Tendrl/performance_monitoring/issues/1","number":1,"state":"closed","locked":false,"title":"monitoring: Add time-series db plugins + apis to access time-series","user":{"login":"anmolbabu","id":3525639,"avatar_url":"https://avatars.githubusercontent.com/u/3525639?v=3","gravatar_id":"","url":"https://api.github.com/users/anmolbabu","html_url":"https://github.com/anmolbabu","followers_url":"https://api.github.com/users/anmolbabu/followers","following_url":"https://api.github.com/users/anmolbabu/following{/other_user}","gists_url":"https://api.github.com/users/anmolbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/anmolbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anmolbabu/subscriptions","organizations_url":"https://api.github.com/users/anmolbabu/orgs","repos_url":"https://api.github.com/users/anmolbabu/repos","events_url":"https://api.github.com/users/anmolbabu/events{/privacy}","received_events_url":"https://api.github.com/users/anmolbabu/received_events","type":"User","site_admin":false},"body":"This patch adds the following:\r\n1. Manager.py :\r\n a. On load, it pushes the default monitoring configurations to etcd.\r\n b. It starts the monitoring api manager.\r\n2. APIManager.py:\r\n a. Starts flask api server as a multiprocessing.process\r\n b. Exposes 2 apis:\r\n   i. /monitoring/nodes/<node_name>/<resource_name>/stats: to fetch\r\n     stats of <resource_name> of <node_name>.\r\n  ii. /moitoring/nodes/<node_name>/monitored_types: to fetch the list\r\n     of metrics available in the time series db.\r\n3. DefaultsManager.py: Provide monitoring defaults.\r\n4. TimeSeriesDBManager.py:\r\n  a. Provides plugin based framework. This framework allows\r\n     the developers to define as many time-series db driver/plugins as\r\n     he/she wishes but, at a time only 1 is active depending upon config\r\n     file field.\r\n  b. Adds GraphitePlugin to facilitate queries to graphite and also adds\r\n     InfluxDbPlugin which is currently just a place holder to facilitate\r\n     qeries to influxdb in future.\r\n  c. Any time-series db access enaling plugin like GraphitePlugin need to\r\n     extend an abstract class TimeSeriesDBPlugin.\r\n  d. This file also adds a meta class PluginMount which creates anything\r\n     inheriting from TimeSeriesDBPlugin.\r\n5. utils.py:\r\n  a. Singleton Logger which is created only once and can be used for logging\r\n  b. Singleton TendrlConfig which is created only once and can be used for\r\n     utilizing configurations in config file.\r\n  c. Defines a singleton which can be used to decorate a class as singleton\r\n6. EtcdStore.py: Enables access to etcd.\r\n\r\nChange-Id: I95174aa8220f6a38419dd3eb9b7c479f26e53e9a\r\nSigned-off-by: anmolbabu <anmolbudugutta@gmail.com>","created_at":"2016-11-06T11:31:50Z","updated_at":"2016-11-22T07:30:42Z","closed_at":"2016-11-22T06:14:09Z","merged_at":null,"merge_commit_sha":"0a20f9ead64b5f8134eaddb659210c9bd7628a17","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tendrl/performance_monitoring/issues/1/comments","statuses_url":"https://api.github.com/repos/Tendrl/performance_monitoring/statuses/e1ea34448b08450dae2e891e3daaa81f31a37611","head":{"label":"anmolbabu:monitoring","ref":"monitoring","sha":"e1ea34448b08450dae2e891e3daaa81f31a37611","user":{"login":"anmolbabu","id":3525639,"avatar_url":"https://avatars.githubusercontent.com/u/3525639?v=3","gravatar_id":"","url":"https://api.github.com/users/anmolbabu","html_url":"https://github.com/anmolbabu","followers_url":"https://api.github.com/users/anmolbabu/followers","following_url":"https://api.github.com/users/anmolbabu/following{/other_user}","gists_url":"https://api.github.com/users/anmolbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/anmolbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anmolbabu/subscriptions","organizations_url":"https://api.github.com/users/anmolbabu/orgs","repos_url":"https://api.github.com/users/anmolbabu/repos","events_url":"https://api.github.com/users/anmolbabu/events{/privacy}","received_events_url":"https://api.github.com/users/anmolbabu/received_events","type":"User","site_admin":false},"repo":{"id":72984607,"name":"performance_monitoring","full_name":"anmolbabu/performance_monitoring","owner":{"login":"anmolbabu","id":3525639,"avatar_url":"https://avatars.githubusercontent.com/u/3525639?v=3","gravatar_id":"","url":"https://api.github.com/users/anmolbabu","html_url":"https://github.com/anmolbabu","followers_url":"https://api.github.com/users/anmolbabu/followers","following_url":"https://api.github.com/users/anmolbabu/following{/other_user}","gists_url":"https://api.github.com/users/anmolbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/anmolbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anmolbabu/subscriptions","organizations_url":"https://api.github.com/users/anmolbabu/orgs","repos_url":"https://api.github.com/users/anmolbabu/repos","events_url":"https://api.github.com/users/anmolbabu/events{/privacy}","received_events_url":"https://api.github.com/users/anmolbabu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anmolbabu/performance_monitoring","description":"Performance monitoring stack","fork":true,"url":"https://api.github.com/repos/anmolbabu/performance_monitoring","forks_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/forks","keys_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/teams","hooks_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/hooks","issue_events_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/issues/events{/number}","events_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/events","assignees_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/assignees{/user}","branches_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/branches{/branch}","tags_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/tags","blobs_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/statuses/{sha}","languages_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/languages","stargazers_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/stargazers","contributors_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/contributors","subscribers_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/subscribers","subscription_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/subscription","commits_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/contents/{+path}","compare_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/merges","archive_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/downloads","issues_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/issues{/number}","pulls_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/pulls{/number}","milestones_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/milestones{/number}","notifications_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/labels{/name}","releases_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/releases{/id}","deployments_url":"https://api.github.com/repos/anmolbabu/performance_monitoring/deployments","created_at":"2016-11-06T10:53:33Z","updated_at":"2016-11-04T08:58:43Z","pushed_at":"2016-11-22T07:20:55Z","git_url":"git://github.com/anmolbabu/performance_monitoring.git","ssh_url":"git@github.com:anmolbabu/performance_monitoring.git","clone_url":"https://github.com/anmolbabu/performance_monitoring.git","svn_url":"https://github.com/anmolbabu/performance_monitoring","homepage":null,"size":27,"stargazers_count":0,"watchers_count":0,"language":null,"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":"Tendrl:master","ref":"master","sha":"e1ea34448b08450dae2e891e3daaa81f31a37611","user":{"login":"Tendrl","id":19151627,"avatar_url":"https://avatars.githubusercontent.com/u/19151627?v=3","gravatar_id":"","url":"https://api.github.com/users/Tendrl","html_url":"https://github.com/Tendrl","followers_url":"https://api.github.com/users/Tendrl/followers","following_url":"https://api.github.com/users/Tendrl/following{/other_user}","gists_url":"https://api.github.com/users/Tendrl/gists{/gist_id}","starred_url":"https://api.github.com/users/Tendrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tendrl/subscriptions","organizations_url":"https://api.github.com/users/Tendrl/orgs","repos_url":"https://api.github.com/users/Tendrl/repos","events_url":"https://api.github.com/users/Tendrl/events{/privacy}","received_events_url":"https://api.github.com/users/Tendrl/received_events","type":"Organization","site_admin":false},"repo":{"id":72830841,"name":"performance_monitoring","full_name":"Tendrl/performance_monitoring","owner":{"login":"Tendrl","id":19151627,"avatar_url":"https://avatars.githubusercontent.com/u/19151627?v=3","gravatar_id":"","url":"https://api.github.com/users/Tendrl","html_url":"https://github.com/Tendrl","followers_url":"https://api.github.com/users/Tendrl/followers","following_url":"https://api.github.com/users/Tendrl/following{/other_user}","gists_url":"https://api.github.com/users/Tendrl/gists{/gist_id}","starred_url":"https://api.github.com/users/Tendrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tendrl/subscriptions","organizations_url":"https://api.github.com/users/Tendrl/orgs","repos_url":"https://api.github.com/users/Tendrl/repos","events_url":"https://api.github.com/users/Tendrl/events{/privacy}","received_events_url":"https://api.github.com/users/Tendrl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tendrl/performance_monitoring","description":"Performance monitoring stack","fork":false,"url":"https://api.github.com/repos/Tendrl/performance_monitoring","forks_url":"https://api.github.com/repos/Tendrl/performance_monitoring/forks","keys_url":"https://api.github.com/repos/Tendrl/performance_monitoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tendrl/performance_monitoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tendrl/performance_monitoring/teams","hooks_url":"https://api.github.com/repos/Tendrl/performance_monitoring/hooks","issue_events_url":"https://api.github.com/repos/Tendrl/performance_monitoring/issues/events{/number}","events_url":"https://api.github.com/repos/Tendrl/performance_monitoring/events","assignees_url":"https://api.github.com/repos/Tendrl/performance_monitoring/assignees{/user}","branches_url":"https://api.github.com/repos/Tendrl/performance_monitoring/branches{/branch}","tags_url":"https://api.github.com/repos/Tendrl/performance_monitoring/tags","blobs_url":"https://api.github.com/repos/Tendrl/performance_monitoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tendrl/performance_monitoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tendrl/performance_monitoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tendrl/performance_monitoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tendrl/performance_monitoring/statuses/{sha}","languages_url":"https://api.github.com/repos/Tendrl/performance_monitoring/languages","stargazers_url":"https://api.github.com/repos/Tendrl/performance_monitoring/stargazers","contributors_url":"https://api.github.com/repos/Tendrl/performance_monitoring/contributors","subscribers_url":"https://api.github.com/repos/Tendrl/performance_monitoring/subscribers","subscription_url":"https://api.github.com/repos/Tendrl/performance_monitoring/subscription","commits_url":"https://api.github.com/repos/Tendrl/performance_monitoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tendrl/performance_monitoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tendrl/performance_monitoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tendrl/performance_monitoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tendrl/performance_monitoring/contents/{+path}","compare_url":"https://api.github.com/repos/Tendrl/performance_monitoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tendrl/performance_monitoring/merges","archive_url":"https://api.github.com/repos/Tendrl/performance_monitoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tendrl/performance_monitoring/downloads","issues_url":"https://api.github.com/repos/Tendrl/performance_monitoring/issues{/number}","pulls_url":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls{/number}","milestones_url":"https://api.github.com/repos/Tendrl/performance_monitoring/milestones{/number}","notifications_url":"https://api.github.com/repos/Tendrl/performance_monitoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tendrl/performance_monitoring/labels{/name}","releases_url":"https://api.github.com/repos/Tendrl/performance_monitoring/releases{/id}","deployments_url":"https://api.github.com/repos/Tendrl/performance_monitoring/deployments","created_at":"2016-11-04T08:58:43Z","updated_at":"2016-11-17T14:18:25Z","pushed_at":"2016-11-22T07:20:56Z","git_url":"git://github.com/Tendrl/performance_monitoring.git","ssh_url":"git@github.com:Tendrl/performance_monitoring.git","clone_url":"https://github.com/Tendrl/performance_monitoring.git","svn_url":"https://github.com/Tendrl/performance_monitoring","homepage":null,"size":10,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1"},"html":{"href":"https://github.com/Tendrl/performance_monitoring/pull/1"},"issue":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/issues/1"},"comments":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Tendrl/performance_monitoring/statuses/e1ea34448b08450dae2e891e3daaa81f31a37611"}}}}
{"actor":{"display_login":"anmolbabu"}}