-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Stats API #362
Comments
One of the interesting information for user could be "progress" of detectors, for example, if monitors are keeping up with log indices ingestion doc rate. There is issue created on alerting repo for implementation of Monitor Explain API which could be used for this: opensearch-project/alerting#751 |
Thinking on the possible API structure. Scope of stats API:
Path and HTTP methods
URL Parametersnode-id: node-id of the node for which the stats are required ResponseTBD after Response Body Fields review Response Body FieldsCluster Level Statistics
Node Level StatisticsThe node level statistics will be calculated at individual node level and will be aggregated over all nodes as well for a holistic overview.
Task BreakthroughThe plan is to get a working API with minimal information ready and then add on statistics as required.
ReferencesUsed the below APIs to decide on structure of stats API here. |
can you post an example response? |
@eirsep Sure. After re-iterating through the request and responses, here is the updated proposal. I have limited the response objects to make it look more cleaner and avoid unnecessary information in the first implementation of stats API. Request:
Proposing 2 sample responses: Sample Response 1:
When there are no detectors or no custom logs defined, the above response would look like:
Sample Response 2:Considering only detectors_per_log_type and having a sub field all to signify aggregated metrics for all log types consolidated.
When there are no detectors or no custom logs defined, the above response would look like:
Proposed ResponseI propose Sample Response 1 over the other as it is much more cleaner implementation. The drawback with Sample Response 2 is that when iteration over different log types in the response object, one may have to purposely check and omit Future ImprovementsIf we require node level metrics, the same can be implemented in future with an additional parameter in request body:
The scope of this advanced metrics can be decided after the implementation of API proposed above. The idea is to keep the default API behavior light-weight as collecting the information at node level granularity will be an expensive task which will linearly scale for large clusters depending upon their node count and most users may not need those metrics for their usage. |
* Rebase to push doc level changes on latest main changes (#391) * Document level alerting dev (opensearch-project#272) Signed-off-by: Ashish Agrawal <[email protected]> * Add last run context to Monitor data model Signed-off-by: Ashish Agrawal <[email protected]> * add Update Monitor function Signed-off-by: Ashish Agrawal <[email protected]> * fix integ test Signed-off-by: Ashish Agrawal <[email protected]> * Implemented draft of Finding data model, a new Input type, and some basic unit tests. (opensearch-project#260) * Implemented draft of Finding data model, and some basic unit tests for it. Signed-off-by: AWSHurneyt <[email protected]> * POC for doc-level-alerting (opensearch-project#277) Signed-off-by: Sriram <[email protected]> * Add connection to triggers for doc level alerting (opensearch-project#316) Signed-off-by: Ashish Agrawal <[email protected]> * CRUD APIs integration Tests and validation"conflict resolved" (opensearch-project#362) Signed-off-by: charliezhangaws <[email protected]> * Segregate monitor runner logic for separation of concerns (opensearch-project#363) * Refactor monitor runner logic for separation of concerns and better testability. Signed-off-by: Saurabh Singh <[email protected]> * Add action and alert flow and findings schema and additional fixes (opensearch-project#381) Signed-off-by: Ashish Agrawal <[email protected]> * Finding Search API (opensearch-project#385) * Findings search API based on Annie's work Signed-off-by: Annie Lee <[email protected]> * Fix Search API and add IT tests Signed-off-by: Ashish Agrawal <[email protected]> Co-authored-by: Annie Lee <[email protected]> * Fix integ tests and minor issues from doc level changes Signed-off-by: Ashish Agrawal <[email protected]> Co-authored-by: Annie Lee <[email protected]> Co-authored-by: Daniel Doubrovkine (dB.) <[email protected]> Co-authored-by: AWSHurneyt <[email protected]> Co-authored-by: Sriram <[email protected]> Co-authored-by: charliezhangaws <[email protected]> Co-authored-by: Saurabh Singh <[email protected]> Co-authored-by: Annie Lee <[email protected]> * Add Trigger condition resolver which parses and evaluates the Trigger expression. (opensearch-project#405) Signed-off-by: Saurabh Singh <[email protected]> * percolate query implementation in doc-level alerting (opensearch-project#399) Signed-off-by: Subhobrata Dey <[email protected]> * Finding Index rollover (opensearch-project#408) * Finding Index rollover Signed-off-by: jiahe zhang <[email protected]> * Apply fixes to make rollover work Signed-off-by: Ashish Agrawal <[email protected]> Co-authored-by: jiahe zhang <[email protected]> Co-authored-by: Annie Lee <[email protected]> Co-authored-by: Daniel Doubrovkine (dB.) <[email protected]> Co-authored-by: AWSHurneyt <[email protected]> Co-authored-by: Sriram <[email protected]> Co-authored-by: charliezhangaws <[email protected]> Co-authored-by: Saurabh Singh <[email protected]> Co-authored-by: Annie Lee <[email protected]> Co-authored-by: Saurabh Singh <[email protected]> Co-authored-by: Subhobrata Dey <[email protected]>
We need a stats API that gives insights into health and analytics of plugin usage. Stats can tell us how many detector/rule creation failures, success have occurred at a node level.
The text was updated successfully, but these errors were encountered: