Skip to content
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

Issue with query_manager_metrics in client.rb, returns empty always #10

Open
dandu1008 opened this issue Jan 7, 2020 · 1 comment
Open

Comments

@dandu1008
Copy link

dandu1008 commented Jan 7, 2020

Am trying the below code to pull AWS EMR Presto query manager metrics, but its always return empty.

require 'presto/metrics'
require 'pp'
client = Presto::Metrics::Client.new(:host => 'localhost', :port=>8889)

client.query_manager_metrics(["abandoned_queries.total_count", "canceled_queries.total_count", "completed_queries.total_count", "execution_time.five_minutes.avg", "failed_queries.total_count", "queued_queries", "queued_time.five_minutes.avg", "running_queries"]).values

client.query_manager_metrics(["executor.active_count", "executor.completed_task_count"])

Presto SQL:

Able to query the metrics by using JXM schema and JXM metric tables in presto sql.
select "completedqueries.totalcount" from jmx.current."com.facebook.presto.execution:name=querymanager";
result: 106

And as per README.md, have tried other metrics like od level, gc metrics, they are working as expected except "query_manager_metrics".

Please look into this issue, and share if you have any fix or quick workaround.

@dandu1008
Copy link
Author

dandu1008 commented Jan 8, 2020

presto-metrics 0.3.12 works with EMR to pull Presto query_manager_metrics.
In higher versions, JMX tables are updated from com.facebook.presto.* to presto.*, which are not exist under jmx schema in presto.
https://prestodb.io/docs/current/connector/jmx.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant