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

Problems with query results extension 2.0

tsagredo
Participant

Hello everyone,
I have two queries with a warning message in the log after performing the integration, for this reason I cannot see the metrics in dynatrace.

El mensaje es el siguiente:

"While polling for endpoint 10.136.51.7:5432:mc_db query have failed: Query 2, Query 4"

tsagredo_0-1724260606492.png

I can't find the error in the yaml code

This is the section dedicated to query 4, it has problems

tsagredo_1-1724260975270.png

tsagredo_2-1724261085846.png

tsagredo_3-1724261144412.png

 

 

 

 

 

 

1 REPLY 1

dannemca
DynaMight Guru
DynaMight Guru

Can you show us some examples of the result of this query?

As I am seeing, you are storing all the columns results as metrics, but they seems to be dimensions instead.

Remember that metrics can only receive numeric values.

If you try to store a metric value as string, it will fail.

Also, the dimensions seems odd, they should be "simple", but you are just replicating the metric names for those.

Imaging that you want to display the count (cantidad) of something, you would do like this:

 - group: Query 4
    featureSet: mon_grandes_comercios
    interval:
      minutes: 5
	ingest: metrics
    timeout: "60"
    query: >
        SELECT columns from table 
    dimensions:
        - key: "tx_nombre_canal"
          value: "col:tx_nombre_canal"
        - key: "tx_codigo_respuesta"
          value: "col:tx_codigo_respuesta"
        ...
		- key: "numero_terminal"
		  value: "col:numero_terminal"
    metrics:
      - key: my.postgresql.poc.mom_grandes_comercios.cantidad
        value: col:cantidad

This way, in the same metric, you would be able to use the dimensions to filter by name, message, response code, etc. and have the quantity as result.

Try and let us know.

Site Reliability Engineer @ Kyndryl

Featured Posts