Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 2018-06-18 - GFMUI / Documentation
- ## Status / Monitoring
- ### Suggested client status endpoint
- ```
- api/status
- ```
- ### How to report health in status
- - add 'health' in status response
- - `{'health' : 'ok'}` if the client is healthy
- - `{'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
- ### Client status reponse
- 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.
- ## Client Reporting Response
- ### Suggested reporting endoint
- ```
- api/reporting
- ```
- ### Inside the job JSON declaration in Services Manager client conf
- ```
- [...
- {'job' : 'jobx',
- 'reporting' : true|false},
- ...]
- ```
- ### Reporting JSON response
- ```
- {'id' : 'reporting call id',
- 'client' : 'client id / alias',
- 'published' : 'time that reporting was generated and returned YYYY-MM-DDTHH:mm:ss.SSS',
- 'blocks' : [{'id' : 'report0',
- 'title' : 'Report block title}
- 'meta' : {'column-metax' : 'foobar'}
- 'data' : [{'col1' : 'val1',
- 'col2' : 'val2'}
- {'col1' : 'val12',
- 'col2' : 'val22'}]},
- {'id' : 'reportn',
- 'title' : 'Report Block Title #n',
- 'meta' : {'column-metax' : 'foobarx'}
- 'data : [{'col1' : 'val1',
- 'coln' : 'valn'}]}]}
- ```
- ### Fields
- - id : the unique identifer for the client reporting call
- - client : the client service that creating the reporting response
- - published : the timestamp for when report was published on the client
- - blocks : the list of reporting blocks, each with its own title and data
- - id : report block id
- - title : the plain english title that will be used as header for the data / block on the UI
- - meta : metadata about the data (column names, datatypes, etc)
- - data : a list of records as JSON documents
Add Comment
Please, Sign In to add comment