qan-api2 return error

Description

hi, I want to use the qan-api2 to get the data for pmm-query-analysis, and store the data of query analysis in another database, but an error was returned. please help me, thanks!

(1) my pmm-server(my local environment): 10.124.12.2 docker-install username:admin passwd:admin pmm-server-version:2.23.0

(2) my api command:
curl -s -X POST -d ‘{“period_start_from”: “2022-02-27T00:00:00Z”, “period_start_to”: “2022-02-27T01:00:00Z”, “order_by”: “num_queries”, “columns”: [“lock_time”, “sort_scan”], “group_by”: “server”} ’ http://admin:admin@10.124.12.2/v0/qan/GetReport | jq

(3) return error:
{error:internal server error, code:13, message:internal server error}

(4) qan-api: https://github.com/percona/qan-api2

(5) i want to get this query_analysis data (red box) : 

How to test

None

How to document

None

Attachments

2

Smart Checklist

Activity

Show:

soulcoder March 2, 2022 at 6:08 AM

I want to get all the query analysis data through qan-api2. 

This is the reason why I use qan-api2. but now the API uses an error. Please provide a solution. Thank you

 

soulcoder March 2, 2022 at 6:00 AM

@Puneet  hi, I want to store the data of query analysis in another database through qan-api2. The PMM version I use is 2.23.0. The level of the problem has been adjusted to low level. My English is not very good and it is difficult to communicate. Please help me solve this problem. Thank you!

 

Puneet Kala March 2, 2022 at 4:30 AM

Hello  thanks a lot for your report, could you please provide some more context as to why the bug is critical, Do you see this issue consistently, it would be a great help to understand your end goal better, you want to use the API end point to get those queries? What version of PMM you are using? 

Details

Assignee

Reporter

Priority

Needs QA

Needs Doc

Smart Checklist

Created March 2, 2022 at 2:20 AM
Updated February 13, 2024 at 3:50 PM