Showing results for 
Show  only  | Search instead for 
Did you mean: 

Migrating PostgreSQL queries from Custom Database Queries to Custom Database Extension


We've begun the preliminary work of migrating our existing Custom DB Queries to the new Custom Database Extension.

Building our new custom extension has been relatively easy, thanks to the existing Dynatrace documentation and recent YouTube videos. Great work with the videos, by the way.

I am able to successfully add 2 out of 3 custom queries to our new custom extension. However, the 3rd query (when added to the extension) returns the following error:

"Failed to assign monitoring configuration to ActiveGate. Reason: Error in YAML or JSON configuration"

Our 3rd query works in our current environment (as it's currently being used to generate metrics and Problem Alerts), but it is not working in Extensions 2.0.

VS Code does not show any YAML/JSON errors, and it is obviously a valid query that works when querying the database.

Do you have any thoughts on why this is happening?





Hi, this seems in part due to the new requirement that the queries need to be defined inside the extension file. I have talked to many people and this is not a viable way to do this, I don't understand why DT would make it more difficult to configure new queries in the extension.

In 1.0 extension you can define the queries inside the endpoint configuration, even the frequency, now we are more prone to errors and this makes it harder to change queries or troubleshoot as well.

As for your particular case I guess we could help if you provide the files in use.




Good afternoon.

We decided to create separate ActiveGate Groups (one for each AWS account), instead of just using one default ActiveGate Group.

Now that the ActiveGate Group work is complete, I re-uploaded the custom extension (unchanged) and now all 3 custom database queries are working without errors. 😅

The new issue we are having now is when viewing the new metrics in Data Explorer (and filtering by one of our custom dimensions), it's not actually returning any of the actual database metric values. All it does is return the name of the dimension.

In this case, our dimension is called job_name. Instead of Data Explorer showing us the actual names of the jobs, it just returns "job_name".

Any thoughts as to why this is happening?


Dynatrace Guru
Dynatrace Guru

Are you maybe using const: instead of col: ?

How does your YAML look like?


Thank you for your reply, Mike.

That's exactly what it was. 😅


Featured Posts