Jump to: navigation, search

Difference between revisions of "MagnetoDB/specs/monitoring-health-check"

(Request Syntax)
m (Specification status)
 
(20 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
=== Specification status ===
 
=== Specification status ===
  
Needs approval
+
Approved '''isviridov'''
 +
Approved "ikhudoshyn"
  
 
=== Problem Description ===
 
=== Problem Description ===
  
 
Service administrators should have an ability for lightweigt checking of MagnetoDB health status.
 
Service administrators should have an ability for lightweigt checking of MagnetoDB health status.
 +
it is also needed for loadbalancers  in order to decide if instance can process requests
  
 
=== Proposed Change ===
 
=== Proposed Change ===
  
 
It should be http request without credentials, that will allow to understand that:
 
It should be http request without credentials, that will allow to understand that:
1. magnetodb-api service is running
+
# magnetodb-api service is running
2. Keystone is available to magnetodb-api
+
# Keystone is available to magnetodb-api
3. Backend is available to magnetodb-api and working properly
+
# Backend is available to magnetodb-api and working properly
 +
 
 +
===== Use Cases =====
 +
# Fast and easy healthcheck for loadbalancer
 +
# Full manual healthcheck just with simple GET request
 +
 
 +
===== Usage scenarios =====
 +
# Checking magnetodb-api server availability without  subsystems
 +
# Checking magnetodb-api server availability and checking its connectivity to Keystone and Cassandra
 +
 
  
 
===== Request Syntax =====
 
===== Request Syntax =====
GET healthcheck/
+
    GET /healthcheck
 +
    GET /healthcheck?fullcheck=true
  
 
===== Headers =====
 
===== Headers =====
* User-Agent
+
    * User-Agent
* Content-Type: application/json
+
    * Accept: text/plain
* Accept: application/json
 
  
 
===== Response Code =====
 
===== Response Code =====
200
+
    200 or 503
  
 
===== Response Body =====
 
===== Response Body =====
    {
+
     "OK|Cassanra: ERROR|Keystone: ERROR|Keystone: ERROR, Cassandra: ERROR"
     "status": "OK|ERROR"
 
    "details": "<message>"
 
    }
 
  
 
===== Intristic implementation =====
 
===== Intristic implementation =====
Line 48: Line 56:
 
Cassandra availability will be checked with quering "magnetodb.table_info" table:
 
Cassandra availability will be checked with quering "magnetodb.table_info" table:
  
     SELECT * FROM magnetodb.table_info;
+
     SELECT * FROM magnetodb.table_info LIMIT 1;
  
 
Method
 
Method
Line 79: Line 87:
  
 
==== Implementation ====
 
==== Implementation ====
none
+
Same health check request needs to be implemented for magnetodb-streaming-api
  
 
===== Assignee(s) =====
 
===== Assignee(s) =====

Latest revision as of 13:08, 9 October 2014

Monitoring - healthcheck http request

Launchpad: [1]

Request for check MagnetoDB health status.

Specification status

Approved isviridov Approved "ikhudoshyn"

Problem Description

Service administrators should have an ability for lightweigt checking of MagnetoDB health status. it is also needed for loadbalancers in order to decide if instance can process requests

Proposed Change

It should be http request without credentials, that will allow to understand that:

  1. magnetodb-api service is running
  2. Keystone is available to magnetodb-api
  3. Backend is available to magnetodb-api and working properly
Use Cases
  1. Fast and easy healthcheck for loadbalancer
  2. Full manual healthcheck just with simple GET request
Usage scenarios
  1. Checking magnetodb-api server availability without subsystems
  2. Checking magnetodb-api server availability and checking its connectivity to Keystone and Cassandra


Request Syntax
   GET /healthcheck
   GET /healthcheck?fullcheck=true
Headers
   * User-Agent
   * Accept: text/plain
Response Code
   200 or 503
Response Body
   "OK|Cassanra: ERROR|Keystone: ERROR|Keystone: ERROR, Cassandra: ERROR"
Intristic implementation

Keystone availability will be checked by sending request:

   GET /

This request should return available versions of Keystone API with 200 code.


Cassandra availability will be checked with quering "magnetodb.table_info" table:

   SELECT * FROM magnetodb.table_info LIMIT 1;

Method

   bool health_check()

will be added to storage API.

Alternatives

none

Security Impact

We consider that this request will not need any credentials and an ability to send it to MagnetoDB should be under external control

Notifications Impact

none

Other End User Impact

none

Performance Impact

none

Other Deployer Impact

none

Developer Impact

none

Implementation

Same health check request needs to be implemented for magnetodb-streaming-api

Assignee(s)

Primary assignee:

 aostapenko

Other contributors:

 none
Work Items

none

Dependencies

none

Documentation Impact

Feature needs to be described in doc sources

References

none