Jump to: navigation, search

Difference between revisions of "MagnetoDB/specs/monitoring-api"

(Implementation)
(Specification status)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== MagnetoDB monitoring api ==
 
== MagnetoDB monitoring api ==
 
 
Launchpad: [https://blueprints.launchpad.net/magnetodb/+spec/monitoring-api monitoring-api]
 
Launchpad: [https://blueprints.launchpad.net/magnetodb/+spec/monitoring-api monitoring-api]
  
 
The API for exposing usage statistic for users, external monitoring or billing tools.
 
The API for exposing usage statistic for users, external monitoring or billing tools.
 +
 +
=== Specification status ===
 +
 +
'''Obsolete''' moved to https://review.openstack.org/#/c/130239/ and https://review.openstack.org/#/c/130801/
  
 
=== Problem Description ===
 
=== Problem Description ===
Line 13: Line 16:
 
=== Proposed Change ===
 
=== Proposed Change ===
  
# Introduce monitoring API available on the same port as data API by path /moninoting/*
+
# Introduce monitoring API available on the same port as data API by path /monitoring/*
# implement REST method for list of tables  /moninoting/{tenant_id}/tables
+
# implement REST method for list of tables  /{tenant_id}/monitoring/tables
# table usage details /moninoting/{tenant_id}/table/{table_name}
+
# table usage details /{tenant_id}/monitoring/table/{table_name}
Response:
+
Response example:
{size: 1003432; item_count: 3000}
+
{item_count: 3000, size: 1003432}
  
 
==== Alternatives ====
 
==== Alternatives ====
Line 26: Line 29:
  
 
* authorization is performed by user's token
 
* authorization is performed by user's token
* authorization can be performed by token with specific role  
+
* authorization can be performed by token with specific role with permission to call monitoring API
 +
* MagnetoDB API node should have access to Jolokia HTTP endpoint
  
 
==== Notifications Impact ====
 
==== Notifications Impact ====
 
None
 
None
 +
 
==== Other End User Impact ====
 
==== Other End User Impact ====
TBD
+
None
 +
 
 
==== Performance Impact ====
 
==== Performance Impact ====
Now we have POC for count items in table (https://review.openstack.org/#/c/118557/) but this implementation is very expensive (we scan all our data to get one counter). So we need change concept and use Cassandra JMX to get approximate number of items and also size of CF on disk.
+
Now we have POC for count items in table (https://review.openstack.org/#/c/118557/), but this implementation is very expensive (we scan all our data to get one counter).  
 +
So we need change concept and use Cassandra JMX to get approximate number of items and also size of CF on disk.
  
 
==== Other Deployer Impact ====
 
==== Other Deployer Impact ====
None
+
* Jolokia component is used for collecting data from Cassandra
 +
** Cassandra start script should be updated with [http://www.jolokia.org/agent/jvm.html jolokia-jvm-agent]
 +
* MagnetoDB API node should have access to Jolokia HTTP endpoint
 +
 
 
==== Developer Impact ====
 
==== Developer Impact ====
 
None
 
None
 +
 
==== Implementation ====
 
==== Implementation ====
Current concept: at Cassandra node we run JMX-HTTP bridge agent ([http://www.jolokia.org Jolokia]). Client goes to MagnetoDB with REST-like interface (.../moninoting/{tenant_id}/table/{table_name}), MagnetoDB goes to Jolokia agent via HTTP, get JMX-metrics from Cassanra and returns them to client. If you have any suggestions about implementation - welcome to our IRC-channel at Freenode #magnetodb.
+
Current concept:  
 +
# at Cassandra node we run JMX-HTTP bridge agent ([http://www.jolokia.org Jolokia]).  
 +
# Client goes to MagnetoDB with REST-like interface (.../{tenant_id}/monitoring/table/{table_name}),  
 +
# MagnetoDB goes to Jolokia agent via HTTP, get JMX-metrics from Cassanra and returns them to client
  
 
===== Assignee(s) =====
 
===== Assignee(s) =====
 
Primary assignee:
 
Primary assignee:
   <ominakov>
+
   ominakov
  
 
Other contributors:
 
Other contributors:
   <None>
+
   achudnovets
 +
  SpyRay
  
 
===== Work Items =====
 
===== Work Items =====
Define Monitoring API on wiki.
+
#Define Monitoring API on wiki.
Write interface for API.
+
#Write interface for API.
Implement calls from MagnetoDB to Jolokia agent.
+
#Implement calls from MagnetoDB to Jolokia agent.
  
 
===== Dependencies =====
 
===== Dependencies =====
[http://www.jolokia.org Jolokia]
+
Devstack integraion update
  
 
==== Documentation Impact ====
 
==== Documentation Impact ====
Monitoring API section should be added here http://magnetodb.readthedocs.org/en/latest/api_reference.html
+
* Monitoring API section should be added here http://magnetodb.readthedocs.org/en/latest/api_reference.html
 +
* deploment guide should be updated http://magnetodb.readthedocs.org/en/latest/admin_guide.html#installation-guide
 
==== References ====
 
==== References ====
None
+
[http://www.jolokia.org Jolokia]
 +
 
 +
[https://review.openstack.org/#/c/122330/ https://review.openstack.org/#/c/122330/ ]

Latest revision as of 11:49, 27 October 2014

MagnetoDB monitoring api

Launchpad: monitoring-api

The API for exposing usage statistic for users, external monitoring or billing tools.

Specification status

Obsolete moved to https://review.openstack.org/#/c/130239/ and https://review.openstack.org/#/c/130801/

Problem Description

As a magnetodb user I need to know how much data I have in table As a magnetodb administrator I need to know now much space is used with user's table As a accountant department I need to know how big user's table is in order to create a bill

Proposed Change

  1. Introduce monitoring API available on the same port as data API by path /monitoring/*
  2. implement REST method for list of tables /{tenant_id}/monitoring/tables
  3. table usage details /{tenant_id}/monitoring/table/{table_name}

Response example: {item_count: 3000, size: 1003432}

Alternatives

Implement as part of data API. However it gives access to data itself for monitoring tools.

Security Impact

  • authorization is performed by user's token
  • authorization can be performed by token with specific role with permission to call monitoring API
  • MagnetoDB API node should have access to Jolokia HTTP endpoint

Notifications Impact

None

Other End User Impact

None

Performance Impact

Now we have POC for count items in table (https://review.openstack.org/#/c/118557/), but this implementation is very expensive (we scan all our data to get one counter). So we need change concept and use Cassandra JMX to get approximate number of items and also size of CF on disk.

Other Deployer Impact

  • Jolokia component is used for collecting data from Cassandra
  • MagnetoDB API node should have access to Jolokia HTTP endpoint

Developer Impact

None

Implementation

Current concept:

  1. at Cassandra node we run JMX-HTTP bridge agent (Jolokia).
  2. Client goes to MagnetoDB with REST-like interface (.../{tenant_id}/monitoring/table/{table_name}),
  3. MagnetoDB goes to Jolokia agent via HTTP, get JMX-metrics from Cassanra and returns them to client
Assignee(s)

Primary assignee:

 ominakov

Other contributors:

 achudnovets
 SpyRay
Work Items
  1. Define Monitoring API on wiki.
  2. Write interface for API.
  3. Implement calls from MagnetoDB to Jolokia agent.
Dependencies

Devstack integraion update

Documentation Impact

References

Jolokia

https://review.openstack.org/#/c/122330/