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

Abstract

This troubleshooting article should help you resolve the most common issues for the custom DB Query Extension

 

Problem

A custom DB Query Extension comprehends many SQL data sources of different databases. Most used are the following:

  • IBM DB2
  • ORACLE
  • Snowflake
  • SAP HANA
  • SQL Server
  • PostgreSQL
  • MySQL

 This extension can fall into error status, and its logs are the most helpful thing to check in such cases.

Where are those logs?

Most logs can be found under the ActiveGate logs directory: https://docs.dynatrace.com/docs/ingest-from/dynatrace-activegate/configuration/where-can-i-find-acti...

As an alternative, a support archive can be downloaded from the ActiveGate: https://docs.dynatrace.com/docs/shortlink/activegate-diagnostics#collect-and-review-locally and then the logs shall be datasource subfolder:

GiuseppeRanieri_0-1736781231841.png

 

It is recommended to have a text editor that opens the extracted folder of the SupportArchive.

Following, there are different categories of issues and keywords to look for.

 

Troubleshooting steps

 

CONNECTION ISSUES

most common issues are identified with certain keywords:

  • Unable to connect to the database
  • Unable to create initial connections of pool
  • Connection is failing for endpoints
  • Fastcheck failed

Troubleshooting:

Verify that the host where the database is operating is reachable from the ActiveGate, then a connection to the database is possible. Here, you can either use our tool or a command like this:

$ nmap -p 1431 my.database.host.example.com

Search the keywords in those logs from your ActiveGate

\remotepluginmodule\log\extensions\datasources\com.dynatrace.extension.nameOfTheExtension

A connection between the ActiveGate and the database should always be possible.


CERTIFICATES AND AUTHENTICATION

keywords:

  • truststore
  • certificate
  • ssh
  • kerberos
  • Fastcheck failed

Supported authentication forms with their configuration flags:

  • IBM DB2
    • sslConnection = true
    • sslClientHostnameValidation = BASIC
    • Basic
    • SSL
  • ORACLE
    • PROTOCOL = tcps
    • oracle.net.ssl_server_dn_match = true
    • Basic
    • SSL
  • Snowflake
    • snowflake has SSL enabled by default
  • SAP HANA
    • encrypt = true
    • validateCertificate = true
    • Basic
    • SSL
  • SQL Server
    • integratedSecurity = true
    • authenticationScheme = NTLM
    • domain = user_input (if not null)
    • integratedSecurity = true
    • authenticationScheme = javaKerberos
    • java.security.krb5.realm = user_input (if not null)
    • java.security.krb5.kdc = user_input (if not null)
    • encrypt= true
    • trustServerCertificate = false (if validate certificates is set to true)
    • Basic
    • NTLM
    • KERBEROS
    • SSL
  • PostgreSQL
    • ssl = true
    • sslmode = verify-full
    • sslfactory = org.postgresql.ssl.DefaultJavaSSLFactory
    • SSL
  • MySQL
    • sslMode = verify-full
    • SSL

Troubleshooting:

  1. Verify
    • Windows: %PROGRAMDATA%\dynatrace\remotepluginmodule\agent\conf\userdata
    • Unix: /var/lib/dynatrace/remotepluginmodule/agent/conf/userdata
    • Truststore name: sqlds_truststore
    • Truststore password: sqlds_truststore
    • Truststore default path:
    • No other truststore is in its directory
    • Truststore and its directory permissions (too many permissions may also cause problems!)
    • CN in the certificate matches the hostname in the connection string.
  2. In case there is more than one certificate in the truststore, create a new one with a single certificate (Remember to move the other truststore to a different directory)

 

DATA ACCESS ISSUE

keywords:

  • Empty result for query

Troubleshooting:

  1. Check if the appropriate feature sets are enabled.
  2. Check which query the metrics in build on, to do this download the extension, in the extension.yaml file search for the empty metric, there should be its related query, run this query on the database logged in with the same user of the extension, compare the results
  3. Verify privileges for given user, requirements, and Database version for troubled vendor:

 

- How to check which query to run?

E.g., the Microsoft SQL Server extension is not returning any result for the metric

1. since this metric is part of the Sessions feature set, check this feature set is active:

GiuseppeRanieri_1-1736781231842.png

 

2. Download the extension from the Hub, unzip the file, and look for an extension.yaml, within this file, look for the metric key (in this case, sql-server.sessions):

GiuseppeRanieri_2-1736781231843.png

Run the query in the database and check if there is any difference with the result shown in Dynatrace.

 

What's next

If this article did not help, please open a support ticket, mention that this article was used, and provide the following in the ticket:

  • log files
  • what lines were analyzed
  • what query was run
  • what data was gathered pointing to the steps followed in this guide

A support engineer will review the issue and provide further assistance.

Version history
Last update:
‎14 Jan 2025 03:02 PM
Updated by:
Comments
a_barbera
Dynatrace Contributor
Dynatrace Contributor

Great article! Congrats!

AntonPineiro
DynaMight Guru
DynaMight Guru

This is golden, thank you so much! :take_my_money:

GerardJ
Advisor

Thanks a lot, so useful !