{"action":"created","comment":{"url":"https://api.github.com/repos/Tendrl/specifications/pulls/comments/92555682","pull_request_review_id":13072199,"id":92555682,"diff_hunk":"@@ -0,0 +1,287 @@\n+// vim: tw=79\n+\n+= Expose a way for tendrl-api to expose data from time series db\n+\n+== Introduction\n+\n+A small introduction to the components part of this spec\n+(borrowed from Tendrl/documentation):\n+\n+=== Tendr/tendrl-api\n+\n+* Frontend/northbound API.\n+* This is the integration point for any external management system/frontend\n+  with Tendrl, including the Tendrl UI.\n+* The App has the necessary logic to understand the state definitions stored in\n+  the Central Store and present them over it’s API.\n+* The App has the necessary logic to be able to invoke Operations through the\n+  Central Store’s Job Queue implementation.\n+* The App is completely stateless. All the state is stored in the Central\n+  Store. The App essentially acts as a translation proxy between an external\n+  system (including Tendrl UI) and the Central Store.\n+* The App is intended to be primarily used for systems integration. As such,\n+  the API is completely generic and self descriptive. The intended use case is\n+  that any system wishing to leverage Tendrl uses the API’s descriptive\n+  responses to construct targeted queries for a specific cluster instances\n+  being managed by Tendrl.\n+\n+=== Tendrl Performance (performance_monitoring)\n+\n+It is a separate service that runs outside tendrl core stack and it relies on\n+the state information in tendrl’s central store for its functioning. Typically\n+it can be co-resident with tendrl application but nothing necessiates this.\n+Following are its sub-components based on the functionalities:\n+\n+* Api Layer : This layer will serve the following responsibilities.\n+  ** Serve the time series data stored in time series database.\n+  ** The apis internally use a plugin based approach for querying the\n+     time-series performance data which eases the task of supporting multiple\n+     time-series databases.\n+* Aggregator : This module aggregates atomic stats(ex: cluster utilization) to\n+  composite(system utilization) stats which will be required by UI for the\n+  dashboards.\n+\n+== Problem description\n+\n+Tendrl/tendrl-api(a part of tendrl-core) is agnostic of time-series db(a part\n+of monitoring stack of tendrl) and its specifics but needs to be able to expose\n+data in the time series db if the monitoring stack is installed.\n+\n+== Use Cases\n+\n+* If monitoring stack is installed by user, the user should be able to seamlessly\n+  access tendrl maintained time series performance data over specified\n+  time-ranges.\n+\n+== Proposed change\n+\n+* Tendrl/performance-monitoring will expose apis to access performance data in\n+  time-series db. This is achieved by:\n+  ** Interface to time-series db is designed in the form of plugins specific to\n+     a time-series db.\n+    *** This means that to support a new time-series db, all it takes is the\n+        addition of its apecic interface as a plugin and doesn't require\n+        touching any other part of the code.\n+    *** The way the plugins work is :\n+      **** The interfaces to time-series db are added under the directory\n+           tendrl/performance-monitoring/time_series_db/dbplugins of\n+           tendrl/performance-monitoring.\n+      **** These plugins inherit from a common interface and hence all of them\n+           follow a similar basic skeletal structure.\n+      **** The plugin framework uses python's meta-class approach and they get\n+           registered with the framework when everything in the plugin path is\n+           imported but only the plugin configured in trendrl's conf will be\n+           used to interface to the time-series db. The way this works is as\n+           follows:\n+            ***** A singleton manager looks for all/any plugins in directory\n+                  tendrl/performance-monitoring/time_series_db/dbplugins and\n+                  imports them all.\n+            ***** The moment they are imported the meta-class registers an\n+                  instance of the plugin with itself.\n+            ***** The singleton manager then stores the instance of required\n+                  time-series db plugin which will be henceforth used for all\n+                  interactions with the time-series db.\n+            ***** Since the manager is a singleton, there is only one instance\n+                  of it throughout the life of Tendrl/performance-monitoring\n+                  application which means all this house-keeping is done only\n+                  once during the lifecycle of the application.\n+* The following apis will be exposed by Tendrl/performance-monitoring:\n+  ** An api to list the monitored resources of a particular entity\n+  ** An api to get statistics of any monitored resource from list in above api\n+     for a particular entity.\n+* The Tendrl/tendrl-api proxies to these apis and remains agnostic of the\n+  time-series db specifics.\n+\n+=== Alternatives\n+\n+None\n+\n+=== Data model impact:\n+\n+Data in time-series db is stored as key-value pairs(utilization to timestamp)\n+in its specific collection/table named by the fully qualified resource name\n+and this is very specific to the way collectd's plugins send metrics to time\n+series db and hence not much control can be exercised here unless we use\n+custom collectd plugins rather than the collectd provided ones\n+\n+=== Impacted Modules:\n+\n+==== Tendrl API impact:\n+\n+The tendrl-api interfaces to the apis mentioned above under the section","path":"specs/time_series_api.adoc","position":111,"original_position":111,"commit_id":"0487718172c7ba80672bd7d37055d4e164eb3dba","original_commit_id":"4e732e8c4edc69f379bc0fe365d0d713e832653d","user":{"login":"nthomas-redhat","id":6671718,"avatar_url":"https://avatars.githubusercontent.com/u/6671718?v=3","gravatar_id":"","url":"https://api.github.com/users/nthomas-redhat","html_url":"https://github.com/nthomas-redhat","followers_url":"https://api.github.com/users/nthomas-redhat/followers","following_url":"https://api.github.com/users/nthomas-redhat/following{/other_user}","gists_url":"https://api.github.com/users/nthomas-redhat/gists{/gist_id}","starred_url":"https://api.github.com/users/nthomas-redhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nthomas-redhat/subscriptions","organizations_url":"https://api.github.com/users/nthomas-redhat/orgs","repos_url":"https://api.github.com/users/nthomas-redhat/repos","events_url":"https://api.github.com/users/nthomas-redhat/events{/privacy}","received_events_url":"https://api.github.com/users/nthomas-redhat/received_events","type":"User","site_admin":false},"body":"I would like see more details on how the tendrl-api to performance-monitoring interaction happens","created_at":"2016-12-15T07:22:05Z","updated_at":"2016-12-15T07:22:05Z","html_url":"https://github.com/Tendrl/specifications/pull/63#discussion_r92555682","pull_request_url":"https://api.github.com/repos/Tendrl/specifications/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/Tendrl/specifications/pulls/comments/92555682"},"html":{"href":"https://github.com/Tendrl/specifications/pull/63#discussion_r92555682"},"pull_request":{"href":"https://api.github.com/repos/Tendrl/specifications/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/Tendrl/specifications/pulls/63","id":97833115,"html_url":"https://github.com/Tendrl/specifications/pull/63","diff_url":"https://github.com/Tendrl/specifications/pull/63.diff","patch_url":"https://github.com/Tendrl/specifications/pull/63.patch","issue_url":"https://api.github.com/repos/Tendrl/specifications/issues/63","number":63,"state":"open","locked":false,"title":"Specification for exposing apis to access time-series data","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":"tendrl-bug-id: Tendrl/specifications#62\r\nSigned-off-by: anmolbabu <anmolbudugutta@gmail.com>","created_at":"2016-12-13T20:52:53Z","updated_at":"2016-12-15T07:24:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffb24a97d7b721da5527a93077851797bfe59ca1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Tendrl/specifications/pulls/63/commits","review_comments_url":"https://api.github.com/repos/Tendrl/specifications/pulls/63/comments","review_comment_url":"https://api.github.com/repos/Tendrl/specifications/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tendrl/specifications/issues/63/comments","statuses_url":"https://api.github.com/repos/Tendrl/specifications/statuses/0487718172c7ba80672bd7d37055d4e164eb3dba","head":{"label":"anmolbabu:issues#62","ref":"issues#62","sha":"0487718172c7ba80672bd7d37055d4e164eb3dba","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":75258650,"name":"specifications","full_name":"anmolbabu/specifications","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/specifications","description":"Tendrl specs go here","fork":true,"url":"https://api.github.com/repos/anmolbabu/specifications","forks_url":"https://api.github.com/repos/anmolbabu/specifications/forks","keys_url":"https://api.github.com/repos/anmolbabu/specifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anmolbabu/specifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anmolbabu/specifications/teams","hooks_url":"https://api.github.com/repos/anmolbabu/specifications/hooks","issue_events_url":"https://api.github.com/repos/anmolbabu/specifications/issues/events{/number}","events_url":"https://api.github.com/repos/anmolbabu/specifications/events","assignees_url":"https://api.github.com/repos/anmolbabu/specifications/assignees{/user}","branches_url":"https://api.github.com/repos/anmolbabu/specifications/branches{/branch}","tags_url":"https://api.github.com/repos/anmolbabu/specifications/tags","blobs_url":"https://api.github.com/repos/anmolbabu/specifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anmolbabu/specifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anmolbabu/specifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/anmolbabu/specifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anmolbabu/specifications/statuses/{sha}","languages_url":"https://api.github.com/repos/anmolbabu/specifications/languages","stargazers_url":"https://api.github.com/repos/anmolbabu/specifications/stargazers","contributors_url":"https://api.github.com/repos/anmolbabu/specifications/contributors","subscribers_url":"https://api.github.com/repos/anmolbabu/specifications/subscribers","subscription_url":"https://api.github.com/repos/anmolbabu/specifications/subscription","commits_url":"https://api.github.com/repos/anmolbabu/specifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/anmolbabu/specifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/anmolbabu/specifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/anmolbabu/specifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/anmolbabu/specifications/contents/{+path}","compare_url":"https://api.github.com/repos/anmolbabu/specifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anmolbabu/specifications/merges","archive_url":"https://api.github.com/repos/anmolbabu/specifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anmolbabu/specifications/downloads","issues_url":"https://api.github.com/repos/anmolbabu/specifications/issues{/number}","pulls_url":"https://api.github.com/repos/anmolbabu/specifications/pulls{/number}","milestones_url":"https://api.github.com/repos/anmolbabu/specifications/milestones{/number}","notifications_url":"https://api.github.com/repos/anmolbabu/specifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anmolbabu/specifications/labels{/name}","releases_url":"https://api.github.com/repos/anmolbabu/specifications/releases{/id}","deployments_url":"https://api.github.com/repos/anmolbabu/specifications/deployments","created_at":"2016-12-01T05:31:37Z","updated_at":"2016-11-28T07:16:01Z","pushed_at":"2016-12-14T16:33:19Z","git_url":"git://github.com/anmolbabu/specifications.git","ssh_url":"git@github.com:anmolbabu/specifications.git","clone_url":"https://github.com/anmolbabu/specifications.git","svn_url":"https://github.com/anmolbabu/specifications","homepage":null,"size":44,"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":"14d48da316a5a4073f4f9d77d80c3bd4dc160393","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":74454505,"name":"specifications","full_name":"Tendrl/specifications","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/specifications","description":"Tendrl specs go here","fork":false,"url":"https://api.github.com/repos/Tendrl/specifications","forks_url":"https://api.github.com/repos/Tendrl/specifications/forks","keys_url":"https://api.github.com/repos/Tendrl/specifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tendrl/specifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tendrl/specifications/teams","hooks_url":"https://api.github.com/repos/Tendrl/specifications/hooks","issue_events_url":"https://api.github.com/repos/Tendrl/specifications/issues/events{/number}","events_url":"https://api.github.com/repos/Tendrl/specifications/events","assignees_url":"https://api.github.com/repos/Tendrl/specifications/assignees{/user}","branches_url":"https://api.github.com/repos/Tendrl/specifications/branches{/branch}","tags_url":"https://api.github.com/repos/Tendrl/specifications/tags","blobs_url":"https://api.github.com/repos/Tendrl/specifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tendrl/specifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tendrl/specifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tendrl/specifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tendrl/specifications/statuses/{sha}","languages_url":"https://api.github.com/repos/Tendrl/specifications/languages","stargazers_url":"https://api.github.com/repos/Tendrl/specifications/stargazers","contributors_url":"https://api.github.com/repos/Tendrl/specifications/contributors","subscribers_url":"https://api.github.com/repos/Tendrl/specifications/subscribers","subscription_url":"https://api.github.com/repos/Tendrl/specifications/subscription","commits_url":"https://api.github.com/repos/Tendrl/specifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tendrl/specifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tendrl/specifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tendrl/specifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tendrl/specifications/contents/{+path}","compare_url":"https://api.github.com/repos/Tendrl/specifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tendrl/specifications/merges","archive_url":"https://api.github.com/repos/Tendrl/specifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tendrl/specifications/downloads","issues_url":"https://api.github.com/repos/Tendrl/specifications/issues{/number}","pulls_url":"https://api.github.com/repos/Tendrl/specifications/pulls{/number}","milestones_url":"https://api.github.com/repos/Tendrl/specifications/milestones{/number}","notifications_url":"https://api.github.com/repos/Tendrl/specifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tendrl/specifications/labels{/name}","releases_url":"https://api.github.com/repos/Tendrl/specifications/releases{/id}","deployments_url":"https://api.github.com/repos/Tendrl/specifications/deployments","created_at":"2016-11-22T09:09:11Z","updated_at":"2016-12-06T04:44:37Z","pushed_at":"2016-12-15T07:06:15Z","git_url":"git://github.com/Tendrl/specifications.git","ssh_url":"git@github.com:Tendrl/specifications.git","clone_url":"https://github.com/Tendrl/specifications.git","svn_url":"https://github.com/Tendrl/specifications","homepage":null,"size":44,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":54,"forks":12,"open_issues":54,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Tendrl/specifications/pulls/63"},"html":{"href":"https://github.com/Tendrl/specifications/pull/63"},"issue":{"href":"https://api.github.com/repos/Tendrl/specifications/issues/63"},"comments":{"href":"https://api.github.com/repos/Tendrl/specifications/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/Tendrl/specifications/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/Tendrl/specifications/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tendrl/specifications/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/Tendrl/specifications/statuses/0487718172c7ba80672bd7d37055d4e164eb3dba"}}}}
{"actor":{"display_login":"nthomas-redhat"}}