TLDR Ragulraj is unable to monitor jdbc_connections_active metrics with SigNoz despite modifying configurations and adding dependencies. Srikanth provided troubleshooting steps and info on alternatives, but the issue remains unresolved.
> jdbc-datasource.enabled=true
This is not related to the metric. _`jdbc-datasource` which creates spans whenever the `java.sql.DataSource#getConnection` method is called._
OpenTeleme has `db_client_connections_usage` with state either `idle` /`used` and there are several other which can be found here
```#!/bin/bash java -Dlog-path=/logs -Dspring.config.location=file:/properties/fincluez-l2t-ms.yml,file:/properties/fincluez-t-ms-loan.yml -Dlogging.config=file:/properties/logback-spring-loan.xml -javaagent:/opentelemetry/opentelemetry-javaagent.jar -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://${signoz_ip} -Dotel.instrumentation.jdbc-datasource.enabled=true -Dotel.resource.attributes="service.name=fincluez-l2t-loans" -jar loans-l2t-22.2.0-0.1.war``` i gave those while running service , do i need to change Dotel.instrumentation.jdbc-datasource.enabled=true to Dotel.instrumentation.db.client.connections.usage=idle like this ?
> do i need to change Dotel.instrumentation.jdbc-datasource.enabled=true to Dotel.instrumentation.db.client.connections.usage=idle like this ? The `db_client_connections_usage` is a metric name, not a configuration option. > ```Dotel.metrics.exporter=none``` Remove this if you want metrics. If this is from our docs/blogs we will get it updated.
if i remove this Dotel.metrics.exporter=none can i monitor other metrics which mentioned in docs
You can monitor all of the mentioned metrics.
still i am not able to monitor db_client_connections_usage , after removing the above configuration
Where did the “instances” come from? Did you add the label yourself? Does it even exist? When you work with any metric data, the easy and the best thing is to run as simple as query with metric name and see what data exists.
even if i run query only with metrics name i am not getting
Then there is likely high chance the data is not being received. Check your setup properly. Check the logs of the collector if it has any issues.
Ok i ll check
> failed to scrape prometheus endpoint You need to fix this. Make sure the endpoint you are configuring is correct and reachable by collector.
i crosschecked with some query in clickhouse DB -> SELECT name FROM ( SELECT DISTINCT JSONExtractString(labels, '__name__') AS name FROM signoz_metrics.time_series) AS tmp1 WHERE name ILIKE '%jvm%' ,its giving some result as some list jvm metrics .same i tried with (jdbc) SELECT name FROM ( SELECT DISTINCT JSONExtractString(labels, '__name__') AS name FROM signoz_metrics.time_series) AS tmp1 WHERE name ILIKE '%jdbc%' the response result is 0 . any changes i need to do from clickhouse DB side ?
Is your failed to scrape fixed? I was requesting you to fix the failed to scrape. How does this cross checking or anything about the ClickHouse help if there is no data collected?
i was trying to fix those scrape i have a doubt in this prometheus: config: scrape_configs: - job_name: "otel-collector" scrape_interval: 60s static_configs: - targets: ["otel-collector:8889"] - job_name: "jvm-metrics" scrape_interval: 10s metrics_path: "/actuator/prometheus" static_configs: - targets: ["<IP of the machine:8090>"] here i should provide our service details or it should prometheus details
please help in me fixing failed to scrape , any hint like where to check
It should be the endpoint of your service which is emitting the metrics. For example, if your application is running on some host `10.53.34.50` and port `8090` you can verify if it emits metrics by curling with `curl
eventhough it is showing failing to scrape , i am able to get other metrics except jdbc and hikari
can u give me hint , that were i need to check failed to scrape
> eventhough it is showing failing to scrape , i am able to get other metrics except jdbc and hikari The jdbc and hikari metrics are coming from the micrometer and need to be scraped. The rest of the metrics could be coming from OTLP. > can u give me hint , that were i need to check failed to scrape This is mostly like a network issue. Please make sure the host and port are correct and are reachable to the SigNoz collector.
host and port are correct i am able to reach to the service from otel collector . whether I need to any dependency regarding micrometer in my pom.xml
and we are using signoz 0.8.2 version is jdbc and hikari metrics available for that version
i tried by adding some dependency in my pom.xml ```<dependency> <groupId>io.opentelemetry</groupId> <artifactId>opentelemetry-api</artifactId> </dependency> <dependency> <groupId>io.opentelemetry</groupId> <artifactId>opentelemetry-api-metrics</artifactId> <version>1.9.1-alpha</version> </dependency>```
curl -X GET 10.53.34.50:3774/alpha-transformation-ms/actuator/prometheus and i am able to run this for checking whether service is reachable or not
The `metrics_path` in the configuration then should be `/alpha-transformation-ms/actuator/prometheus`
yes same i given in config,yml also
If you run `curl -X GET 10.53.34.50:3774/alpha-transformation-ms/actuator/prometheus` from the collector host, does it resolve and return any data? Did you have the micrometer setup
yes i am able to get data from the curl , regarding micrometer we have added only dependency in out spring application based on the docs
any other things i need to configure regarding micrometer apart from this ?
is htrod and load-htrod service is mandatory one ?
Ragulraj
Thu, 13 Apr 2023 04:01:40 UTCHello team i was trying to monitor jdbc_connections_active metrics for my service in signoz , but not able to get data when i give PromQL in dashboard and even i tried by enabling Dotel.instrumentation.jdbc-datasource.enabled=true , is there any other equivalent metrics for jdbc