06 Jul 2023 01:13 PM - edited 06 Jul 2023 08:18 PM
Hey, guys.
I recently tried to set up custom database queries in my environment.
But, I am getting this "FATAL dynatrace-jdbc-connector(main)" error. I tested my query in PL SQL and it runs normally.
Could someone help me resolve this error or point me to a way to resolve it?
Solved! Go to Solution.
06 Jul 2023 05:38 PM
Hi,
I've experienced something simular. It ended up having something to do with my configuration in the plugin.
Could you perhaps share your configuration?
Kr.
Michiel
06 Jul 2023 06:23 PM - edited 06 Jul 2023 08:18 PM
Hello friend how are you?
I didn't quite understand the request, would the plugin configuration be the one in the path Settings > Monitoring > Monitored technologies > Generic DB Query Plugin?
If yes, I will attach it in PDF. I count on your help!
06 Jul 2023 06:34 PM
Hi there,
So how this plugin works: you'll need to get a numeric value, f.e. Count(*)
Why? Because you're pushing metrics, so we would need an number. Could you try editing the query to Select COUNT(*) FROM [TABLENAME] ?
see if we get any results?
06 Jul 2023 07:07 PM - edited 06 Jul 2023 08:19 PM
Hello, I tried to change as requested and still got no response. Here's a print and the query change.
06 Jul 2023 07:17 PM
Do you know for sure that the PORT connecting towards is correct? Also, since this is an activegate plug-in, could you see what's in that LOG?
I'm curious if the JDBC connection is actually set up?
06 Jul 2023 07:35 PM - edited 06 Jul 2023 08:19 PM
OK let's go.
My port is configured on port 1521, according to a TNSNAMES I have in my SQL PL that can call that same query.
I don't have access to the server where Active Gate is installed, but I see some logs through Dynatrace that I'm not sure if they are related, because I disabled this plugin to test and it kept collecting that same log.
Does JDBC need to be installed on the host that is Active Gate? Not sure about that as I don't have access.
Detail, I get these logs all day long. I don't think it's related to the plugin.
06 Jul 2023 07:45 PM - edited 06 Jul 2023 09:15 PM
Don't think is necessary to install extra stuff looking at the installation requirements.
Probably it's not the right log if it keeps logging whilst disabled. Could we just try: select count(*)
from [table]?
Just to see if the problem is in the query?
For the logging, a plug-in probably generates its own log file on the activegate. Could you check var/lib/dynatrace/remotepluginmodule/log/remoteplugin? Should also be able to import this.
06 Jul 2023 08:05 PM
Okay, I'll change the query to test.
About the logs, I don't have access to the host where ActiveGate is hosted, I'll need to ask someone who has access.
06 Jul 2023 08:33 PM
I took a look at the logs and noticed the return of error ORA-01858. Any idea how to resolve?
06 Jul 2023 08:35 PM
ORA-01858: a non-numeric character was found where a numeric was expected
Is this with the old or the new query?
06 Jul 2023 08:37 PM
With any one query.
I think the problem is in the date, I'll change it to numbers and run again.
06 Jul 2023 09:07 PM
Hey, friend.
Based on the logs, I changed the date query parameter for the model: XX/Month Number/XXXX instead of XX/Month/XXXX.
I would like to thank you for your help, and if possible edit your comment sent at 11:45 am where you have some information about my query and delete it.
I am very happy if you can do this, thank you very much and have a nice day.
06 Jul 2023 09:15 PM
Done! Good luck with it 🙂