24 Apr 2024 03:50 AM - edited 24 Apr 2024 03:51 AM
Hello everyone,
So I have an Oracle database query with a format more or less like this:
Is it possible to use Dynatrace, perhaps with an extension, to retrieve the result from the COUNT(*) column?
Then from the result, we will set a threshold, and if it exceeds a certain value, then an alert will be sent.
If possible, could you please assist in showing an example of how to do this?
Thank you.
24 Apr 2024 04:20 AM
Hi @agylpradipta. Yes it's possible, one easy approach is do it with a script:
24 Apr 2024 04:26 AM
Is there a simpler approach? For instance, I just came across this extension https://www.dynatrace.com/hub/detail/custom-database-queries/?query=custom+database+qu&filter=all, could we use that?
24 Apr 2024 06:16 AM - edited 24 Apr 2024 06:32 AM
You could use that, but the extension is deprecated so I wouldn't use something that is not supported anymore.
Rather use this one: https://www.dynatrace.com/hub/detail/custom-database-extension/?query=queries&filter=all
24 Apr 2024 06:23 AM
I've just come across the following extension version, which seems to be new and not deprecated -> https://www.dynatrace.com/hub/detail/custom-database-extension/?query=custom+database+query&filter=a.... Can we use this?
If so, would anyone here be willing to share how to use it, referring to the Oracle database query I sent earlier?
Thank you.
24 Apr 2024 07:26 AM
Yes, you can use it.
You need to build your own extension. I would recommend using the extension plugin for VSCode
https://developer.dynatrace.com/extensions-v2/dynatrace-extensions-vscode/
Then you need to build the extensión, refer to SQL datasource here https://docs.dynatrace.com/docs/shortlink/sql-reference