-
Notifications
You must be signed in to change notification settings - Fork 130
feat: adding Elastic as a metrics provider #3890
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
Conversation
6b62eb0 to
2ff6567
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3890 +/- ##
==========================================
- Coverage 77.74% 77.41% -0.33%
==========================================
Files 219 220 +1
Lines 11575 11703 +128
==========================================
+ Hits 8999 9060 +61
- Misses 2212 2277 +65
- Partials 364 366 +2
... and 2 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Signed-off-by: SandeepD2697 <[email protected]>
Signed-off-by: SandeepD2697 <[email protected]>
Signed-off-by: SandeepD2697 <[email protected]>
Signed-off-by: SandeepD2697 <[email protected]>
Signed-off-by: SandeepD2697 <[email protected]>
48087c1 to
9470a0e
Compare
Signed-off-by: Moritz Wiesinger <[email protected]>
|
Please add the metrics provider also to the helm charts, helm chart tests and docs, as it was done here https://github.com/keptn/lifecycle-toolkit/pull/3361/files |
Signed-off-by: SandeepD2697 <[email protected]>
Signed-off-by: SandeepD2697 <[email protected]>
|
@odubajDT added elastic as metric provider in helm charts, helm chart tests and docs as suggested |
Signed-off-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Moritz Wiesinger <[email protected]>
|
odubajDT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution :)



fixes #3727
Hey @mowies I have taken the code changes from the previous contributors and updated it accordingly by adding it in the provider.go and calling when it is elastic. This is my initial version please have a look and let me know the changes I need to make or any enhancements.
For now the methods purpose are-
GetElasticClient: Creates a new Elasticsearch client.
FetchAnalysisValue: Runs a query to get analysis results and returns the metric value.
EvaluateQuery: Runs a metric query for the last 30 minutes and returns the metric value.
runElasticQuery: Executes a query on Elasticsearch and returns the result.
extractMetric: Gets the metric value from the Elasticsearch result.