pmm
pmm copied to clipboard
Custom dashboard got "Error while unescaping path" in pmm-managed.log
Description
Hi
We've been using a PMM Grafana instance for our custom dashboard, integrated with the Altinity plugin for ClickHouse. However, following the most recent update, we encountered an issue.
In the course of investigating the issue, I discovered an error in the pmm-managed.log file, which indicated a problem unescaping a path for a query.
time="2024-02-07T13:28:18.800+00:00" level=warning msg="Error while unescaping path /graph/api/datasources/proxy/8/ .....
The problematic request got from nginx/auth_request. As a temporary solution, I managed to address the issue at the nginx level. Nonetheless, I'm wondering if a more permanent fix could be implemented in the PMM-managed codebase to prevent such errors from occurring in the future.
Expected Results
no error
Actual Results
Error while unescaping path
Version
PMM: 2.41.1 (January 29, 2024 UTC)
Steps to reproduce
Use Altinity plugin for ClickHouse for datasource
Relevant logs
`time="2024-02-07T13:28:18.800+00:00" level=warning msg="Error while unescaping path /graph/api/datasources/proxy/8/?query=WITH%20(%0A%20%20%20%20CASE%20%0A%20%20%20%20%20%20%20%20WHEN%20(3000%20%25%2060)%20%3D%200%20THEN%203000%0A%20%20%20%20ELSE%2060%20END%0A)%20AS%20scale%0ASELECT%0A%20%20%20%20(intDiv(toUInt32(timestamp)%2C%203000)%20*%203000)%20*%201000%20as%20t%2C%0A%20%20%20%20hostname%20h%2C%0A%20%20%20%20status%20s%2C%0A%20%20%20%20SUM(req_count)%20as%20req_count%0AFROM%20pinba.report_by_all%0AWHERE%0A%20%20%20%20timestamp%20%3E%3D%20toDateTime(1707139680)%20AND%20timestamp%20%3C%3D%20toDateTime(1707312480)%0A%20%20%20%20AND%20status%20%3E%3D%20400%0A%20%20%20%20AND%20CASE%20WHEN%20%27all%27%20%3C%3E%20%27all%27%20THEN%20schema%20%3D%20%27all%27%20ELSE%201%20END%0A%20%20%20%20AND%20CASE%20WHEN%20%27all%27%20%3C%3E%20%27all%27%20THEN%20hostname%20%3D%20%27all%27%20ELSE%201%20END%0A%20%20%20%20AND%20CASE%20WHEN%20%27all%27%20%3C%3E%20%27all%27%20THEN%20server_name%20%3D%20%27all%27%20ELSE%201%20END%0AGROUP%20BY%20t%2C%20h%2C%20s%0AORDER%20BY%20t%20FORMAT%20JSON: \"parse \\\"/graph/api/datasources/proxy/8/?query=WITH (\\\\n CASE \\\\n WHEN (3000 % 60) = 0 THEN 3000\\\\n ELSE 60 END\\\\n) AS scale\\\\nSELECT\\\\n (intDiv(toUInt32(timestamp), 3000) * 3000) * 1000 as t,\\\\n hostname h,\\\\n status s,\\\\n SUM(req_count) as req_count\\\\nFROM pinba.report_by_all\\\\nWHERE\\\\n timestamp >= toDateTime(1707139680) AND timestamp <= toDateTime(1707312480)\\\\n AND status >= 400\\\\n AND CASE WHEN 'all' <> 'all' THEN schema = 'all' ELSE 1 END\\\\n AND CASE WHEN 'all' <> 'all' THEN hostname = 'all' ELSE 1 END\\\\n AND CASE WHEN 'all' <> 'all' THEN server_name = 'all' ELSE 1 END\\\\nGROUP BY t, h, s\\\\nORDER BY t FORMAT JSON\\\": net/url: invalid control character in URL\"" component=grafana/auth req="GET /graph/api/datasources/proxy/8/?query=WITH%20(%0A%20%20%20%20CASE%20%0A%20%20%20%20%20%20%20%20WHEN%20(3000%20%25%2060)%20%3D%200%20THEN%203000%0A%20%20%20%20ELSE%2060%20END%0A)%20AS%20scale%0ASELECT%0A%20%20%20%20(intDiv(toUInt32(timestamp)%2C%203000)%20*%203000)%20*%201000%20as%20t%2C%0A%20%20%20%20hostname%20h%2C%0A%20%20%20%20status%20s%2C%0A%20%20%20%20SUM(req_count)%20as%20req_count%0AFROM%20pinba.report_by_all%0AWHERE%0A%20%20%20%20timestamp%20%3E%3D%20toDateTime(1707139680)%20AND%20timestamp%20%3C%3D%20toDateTime(1707312480)%0A%20%20%20%20AND%20status%20%3E%3D%20400%0A%20%20%20%20AND%20CASE%20WHEN%20%27all%27%20%3C%3E%20%27all%27%20THEN%20schema%20%3D%20%27all%27%20ELSE%201%20END%0A%20%20%20%20AND%20CASE%20WHEN%20%27all%27%20%3C%3E%20%27all%27%20THEN%20hostname%20%3D%20%27all%27%20ELSE%201%20END%0A%20%20%20%20AND%20CASE%20WHEN%20%27all%27%20%3C%3E%20%27all%27%20THEN%20server_name%20%3D%20%27all%27%20ELSE%201%20END%0AGROUP%20BY%20t%2C%20h%2C%20s%0AORDER%20BY%20t%20FORMAT%20JSON"`
Code of Conduct
- [X] I agree to follow Percona Community Code of Conduct