05 Aug 2021
02:36 PM
- last edited on
12 Nov 2021
02:42 PM
by
Karolina_Linda
Hi Team,
I'm trying to count the number of requests which the average response time in their time slot was less than 1 second with the below metricSelector (I'm using Metrics API V2):
builtin:service.response.server:count:splitBy():filter(series(avg,lt,1000000))
but receiving this error in response:
code:400
message:"Failed to parse selector: Illegal filter predicate "series" with 3 arguments."
is there something I'm doing wrong here?
Thanks,
Hamed
This query is working for me - just to confirm, you are using /api/v2/metrics/query endpoint? Are you able to provide a screenshot of the request and error response you are receiving?
Thanks for the quick response. Yes, I'm using that endpoint via Grafana JSON datasource. Here are the screenshots (I wiped out some details):
Please note that the problem is specifically with the `series` filter. I'm making many other queries from the same datasource and all of them are working.
Hmm, I try that exact query in the API Explorer in Dynatrace, as well as in Postman, and it works. Are you able to try a different API tool to make the request - to try and narrow down where the issue lies?
How strange! I just tried it both using the API Explorer and also curl and all return with the same error.
Could it be related to different deployments of Dynatrace we're using? I'm using a managed deployment. Its URL is in the format of *.dynatrace-managed.com/e/*.
I am also testing on Managed version 1.220. Could you provide what the exact request URL was in the Data Explorer so I can check against mine?
Here it is:
https://<....>.dynatrace-managed.com/e/<..........>/api/v2/metrics/query?metricSelector=builtin%3Aservice.response.server%3Acount%3AsplitBy%28%29%3Afilter%28series%28avg%2Cle%2C1000000%29%29&resolution=5m&from=now-30d&entitySelector=type%28service%29%2CentityName.equals<.....>
and the cluster version is 1.218.113
Your query is identical to mine, that is definitely strange. What version is your Dynatrace Managed cluster? I think that this might need a Dynatrace Support ticket to investigate further: https://support.dynatrace.com