21 Jan 2025 03:17 PM
I have created a Dynatrace sql query extension as mentioned in the Youtube Video A Practical Guide to SQL Extensions with Dynatrace - YouTube.
After creating and signing the extension, I am getting the below error in the logs.
warn
2025-01-21 14:59:36.834 SFM Event
name: custom:custom.db.query.2.0
version: "0.0.4"
minDynatraceVersion: "1.279.0"
author:
name: John Doe
metrics:
- key: my.sql.status.value
metadata:
displayName: My Values
unit: Count
sqlServer:
- group: Latest data
featureSet: Latest
interval:
minutes: 1
ingest: metrics
query: >
select count (id) as count
from master.chart WITH (NOLOCK) where
creation_date > DATEADD(minute, -15, GETDATE())
metrics:
- key: my.sql.status.value
value: col:count
dimensions:
- key: stat_name
value: const:latest
How can i fix it?
The connection details seem to be fine. The same query and database were used in fetching the data using custom.db.query extension. It got deprecated. that is why I have created a new extension.
Solved! Go to Solution.
28 Jan 2025 01:54 PM
The error message indicates that the query didn't return any data or that there was something wrong with it.
The code looks fine at first glance, so if you're 100% sure that the query is returning data for the user you have configured in the extension, then your next step should be to get a support archive for the ActiveGate which is running that extension (or going into the AG directly) and having a look into the logs /remotepluginmodule/log/extensions/datasources/<your-ext-name>.
There should be some more info on what happened with your query. Either that it failed or that it returned 0 rows.