Monitoring¶
Data for monitoring¶
We are currently processing several types of events for monitoring:
- request (any http request) 
- error (failed http request) 
Every event is a point in the time series. The point is represented as union of the following data:
- series name 
- start event time 
- tags, indexed data in storage, dictionary: keys - string tag names, values - string, integer, float 
- fields, non indexed data in storage, dictionary: keys - string tag names, values - string, integer, float 
Monitoring series¶
- Requests series. - Triggered on every request. Each point contains a data about corresponding request (execution time and etc). - Requests series tags¶ - tag name - description - service - always “luna-handlers” - route - concatenation of a request method and a request resource (POST:/extractor) - status_code - http status code of response - Requests series fields¶ - fields - description - request_id - request id - execution_time - request execution time - Requests series additional tags¶ - tag name - resource - description - handler_id - /handlers/{handlerId}/events - handler ID - verifier_id - /verifiers/{verifierId}/verifications - verifier ID - Requests series additional fields¶ - fields - resource - description - download_images_time - /detector - time taken to download the image from Image Store - save_warps_time - /detector - time taken to save warps to Image Store - save_attributes_time - /extractor - time taken to save samples to Image Store - load_face_samples_time - /extractor - time taken to download the face sample from Image Store - load_face_samples_time - /extractor/upgrade - time taken to download the face sample from Image Store - load_body_samples_time - /extractor/upgrade - time taken to download the body sample from Image Store - save_face_attributes_time - /extractor/upgrade - time taken to save face attributes to Luna Faces - save_event_attributes_time - /extractor/upgrade - time taken to save event attributes to Luna Faces - load_images_for_processing_time - /handlers/{handlerId}/events - time taken to load image for processing from request - face_sample_storage_policy_time - /handlers/{handlerId}/events - time taken to save face samples to Image Store - face_sample_storage_policy_time - /verifiers/{verifierId}/verifications - time taken to save face samples to Image Store - body_sample_storage_policy_time - /handlers/{handlerId}/events - time taken to save body samples to Image Store - image_origin_storage_policy_time - /handlers/{handlerId}/events - time taken to save image origins to Image Store - face_attribute_storage_policy_time - /handlers/{handlerId}/events - time taken to save face attributes to Image Store - face_attribute_storage_policy_time - /verifiers/{verifierId}/verifications - time taken to save face attributes to Image Store - face_storage_policy_time - /handlers/{handlerId}/events - time taken to save face with avatar to Luna Faces - event_storage_policy_time - /handlers/{handlerId}/events - time taken to save event to Luna Events - notification_storage_policy_time - /handlers/{handlerId}/events - time taken to send notification to Luna Sender - match_policy_time - /handlers/{handlerId}/events - time taken for matching - match_policy_time - /verifiers/{verifierId}/verifications - time taken for matching 
- Errors series. - Triggered on failed request. Each point contains error_code of luna error. - Errors series tags¶ - tag name - description - service - always “luna-handlers” - route - concatenation of a request method and a request resource (POST:/extractor) - status_code - http status code of response - error_code - Luna Platform error code - Errors series fields¶ - fields - description - request_id - request id - Errors series additional tags¶ - tag name - resource - description - handler_id - /handlers/{handlerId}/events - handler ID - verifier_id - /verifiers/{verifierId}/verifications - verifier ID 
Database¶
Monitoring is implemented as data sending to an influx database. You can setup your database credentials in configuration file in section “monitoring”.
Plugins¶
You can realize your own plugin for sending monitoring data. See plugins
Module request monitoring plugin example
- class luna_handlers.crutches_on_wheels.cow.plugins.plugin_examples.request_monitoring_plugin_example.BaseRequestMonitoringPlugin(app)[source]¶
- Base class for requests monitoring. 
- class luna_handlers.crutches_on_wheels.cow.plugins.plugin_examples.request_monitoring_plugin_example.RequestMonitoringPlugin(app)[source]¶
- Example plugin sends a request data for monitoring to third-party source. Only one instance of this class exist during the program execution.