opensearch-project / perftop

📈 PerfTop: A client for the OpenSearch Performance Analyzer
https://opensearch.org/docs/latest/monitoring-plugins/pa/index/#get-started-with-perftop
Apache License 2.0
16 stars 18 forks source link

Add env.js to store global property, add legacy mode to support rest APIs backward compatibility, and update documents #10

Closed hxiao608 closed 3 years ago

hxiao608 commented 3 years ago

Signoff by: Harold Xiao haoruxia@amazon.com

Is your feature request related to a problem? Please provide an existing Issue # , or describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you are proposing Add a new js file for setting and getting global properties, introduce a legacy flag to enable perfTop to run in a legacy mode, which will send out API request to opendistro endpoint

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Test Local build pass and succesfully test the new endpoint with the sample metrics command: ./build/opensearch-perf-top-macos --dashboard ${Dashboard} --endpoint localhost:9600 results: Screen Shot 2021-05-21 at 4 45 12 PM Screen Shot 2021-05-21 at 4 52 52 PM

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

sruti1312 commented 3 years ago

Since we dont have automated testing. Can we manually test the artifact and confirm everything is working as expected? Please add the manual testing details as well to the PR. Thanks!

hxiao608 commented 3 years ago

Perftop can now render metrics with the new _plugins endpoint. The legacy mode will be able to render metrics after the setting up the Rest API BC for original _opendistro endpoint .