21 Aug 2024 06:29 PM
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"
I can't find the error in the yaml code
This is the section dedicated to query 4, it has problems
04 Sep 2024 09:51 PM
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.