Guest User

Untitled

a guest
Jun 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. # 2018-06-18 - GFMUI / Documentation
  2.  
  3. ## Status / Monitoring
  4.  
  5. ### Suggested client status endpoint
  6. ```
  7. api/status
  8. ```
  9.  
  10. ### How to report health in status
  11. - add 'health' in status response
  12. - `{'health' : 'ok'}` if the client is healthy
  13. - `{'health' : 'anything but ok'}` if client is unhealthy; the value of the `health` should be a descriptive message that is human readable to give admins a starting point for troubleshooting
  14.  
  15. ### Client status reponse
  16. The client status response is different for each client service. As long as there's a `health` field in the root level of the response JSON document, then the UI may pivot on the `health` field to indicate possible error state(s) on the client service.
  17.  
  18. ## Client Reporting Response
  19.  
  20. ### Suggested reporting endoint
  21. ```
  22. api/reporting
  23. ```
  24.  
  25. ### Inside the job JSON declaration in Services Manager client conf
  26. ```
  27. [...
  28. {'job' : 'jobx',
  29. 'reporting' : true|false},
  30. ...]
  31. ```
  32.  
  33. ### Reporting JSON response
  34.  
  35. ```
  36. {'id' : 'reporting call id',
  37. 'client' : 'client id / alias',
  38. 'published' : 'time that reporting was generated and returned YYYY-MM-DDTHH:mm:ss.SSS',
  39. 'blocks' : [{'id' : 'report0',
  40. 'title' : 'Report block title}
  41. 'meta' : {'column-metax' : 'foobar'}
  42. 'data' : [{'col1' : 'val1',
  43. 'col2' : 'val2'}
  44. {'col1' : 'val12',
  45. 'col2' : 'val22'}]},
  46. {'id' : 'reportn',
  47. 'title' : 'Report Block Title #n',
  48. 'meta' : {'column-metax' : 'foobarx'}
  49. 'data : [{'col1' : 'val1',
  50. 'coln' : 'valn'}]}]}
  51. ```
  52. ### Fields
  53. - id : the unique identifer for the client reporting call
  54. - client : the client service that creating the reporting response
  55. - published : the timestamp for when report was published on the client
  56. - blocks : the list of reporting blocks, each with its own title and data
  57. - id : report block id
  58. - title : the plain english title that will be used as header for the data / block on the UI
  59. - meta : metadata about the data (column names, datatypes, etc)
  60. - data : a list of records as JSON documents
Add Comment
Please, Sign In to add comment