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

Synthetic SQL query monitor

Enrico_F
DynaMight Pro
DynaMight Pro

Dear community,

In good old AppMon there existed the DB Query Monitor plugin which could be used to send an arbitrary SQL query against a database at scheduled intervals and derive various measures from it (row count, response time etc.).

Question: Is there an equivalent capability or plugin available for Dynatrace which could be used to run SQL queries at scheduled intervals (say: hourly) either from an ActiveGate or a OneAgent and derive metrics such as row count and response time from it? Kinda like a synthetic monitor, only for simulating DB clients 🙂

If there isn't anything available out-of-the-box or as an optional plugin: Would this be a project worth pursuing as a self-written Python plugin to run on OneAgents?


Any feedback would be greatly appreciated.
10 REPLIES 10

pahofmann
DynaMight Leader
DynaMight Leader

There is none yet that I know of.

Would be a good way to get started with dynatrace plugins. You could use a Active Gate Plugin for that aswell.


Dynatrace Certified Master, AppMon Certified Master - Dynatrace Partner - 360Performance.net

dave_mauney
Dynatrace Champion
Dynatrace Champion

I agree this is a good candidate for an Active Gate plugin. I'm sure others would make use of it if you publish it on github.


AlexanderSommer
Dynatrace Pro
Dynatrace Pro

@Patrick H. and @Dave M. are right, you can create a plugin. What we have on our road map are "custom monitors" which enrich our Synthetic use case to additional protocol checks like pings, trace route or ldap checks. I can't give you a date when we will be ready ... but it will not be in the next 6 months 😉


That's a great addition for the feature though!

Heard requests like that at a few customers, and although it's possible via plugins, having this directly in synthetic would be a lower barrier of entry.


Dynatrace Certified Master, AppMon Certified Master - Dynatrace Partner - 360Performance.net

Thanks for the feedback!

Regarding the custom plugin approach: What's limiting in our case is that the execution interval is hard-coded to be 1 min and can't be changed...

Is this still the case for the latest version? And if so, is there something on the roadmap for allowing more flexibility?


rene_forstner
Newcomer

Not sure if this still an actual case, however we developed a rather experimental plugin, which does not rely on OneAgent or ActiveGates but using the 3rd Party Synthetic API and pythons APScheduler to exectue SQL Queries regulary:

https://github.com/NTTDATA-EMEA/dynatrace-sql-plugin


This is great - thanks a lot for sharing!

"can easily be containerized" sounds good, too - although for me not so easy to do atm... If anyone can share an OpenShift build config, docker compose file or even a deployable docker image that would be awesome...

Hi,

give this a try - did not test the functionality of the app itself but at least the API is reachable

FROM python:3.8.5-slim-buster
ADD installODBCDrivers.sh .
RUN chmod +x installODBCDrivers.sh
RUN bash -c "./installODBCDrivers.sh"

WORKDIR /code
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY src/ .

CMD ["python", "./server.py"]


you could play around with passing the env variables through the dockerfile, I'll update the repo next week with a fully tested dockerfile

Kenneth_Gillett
Organizer

Hi, Any update or news on this?

as mentioned on the answer above,

Check out this repo:


https://github.com/NTTDATA-EMEA/dynatrace-sql-plugin




Its using the 3rd party synthetic API, flask to add/remove synthetic
SQL queries and APScheduler to execute them at the defined intervals.