dd-trace-java
dd-trace-java copied to clipboard
Stream Hikaricp Pool jmx metrics to Datadog
Hi, I'm not sure if it's the right place to post a question but I'll try it here.
We are building a docker container and using the java agent for datadog. My goal is to start sending Hikaricp pool metrics to datadog.
we start our application like this.
CMD ["/bin/sh", "-c", \
"java -XX:MinRAMPercentage=50.0 \
-XX:MaxRAMPercentage=80.0 \
-javaagent:./dd-java-agent.jar \
-Ddd.jmxfetch.config.dir=metrics \
-Ddd.jmxfetch.config=conf.yaml \
-jar ./apps.jar" \
]
Note : all the DD environment variable are injected by k8s when the container start. All the default jvm metric stream fine to datadog....
I did verify in mbean explorer in VisualVm and the metric are there!
I created a file conf.yaml like this in metrics\cong.yaml
init_config:
is_jmx: true
collect_default_metrics: true
conf:
- include:
domain: com.zaxxer.hikari
bean_regex:
- com.zaxxer.hikari:type=Pool.*
name: Pool
attribute:
ActiveConnections:
metric_type: gauge
alias: hikaricp.activeconnections
IdleConnections:
metric_type: gauge
alias: hikaricp.idleconnections
ThreadsAwaitingConnection:
metric_type: gauge
alias: hikaricp.threadsawaitingconnection
TotalConnections:
metric_type: gauge
alias: hikaricp.totalconnections
instances:
- host: 127.0.0.1
I don't get any error when my application start but nothing look to work....
Do I miss something important? How I could debug this to see if anything is wrong?
Thanks
I did more modification without a lot of more progress my file look like this now ;
init_config:
instances:
- jvm_direct: true
name: hubspot-deletion
conf:
- include:
bean_regex:
- com\.zaxxer\.hikari:type=Pool (.*
attribute:
ActiveConnections:
metric_type: gauge
alias: hikaricp.activeconnections
IdleConnections:
metric_type: gauge
alias: hikaricp.idleconnections
ThreadsAwaitingConnection:
metric_type: gauge
alias: hikaricp.threadsawaitingconnection
TotalConnections:
metric_type: gauge
alias: hikaricp.totalconnections
still no luck.
Sorry, I'm not sure how to help you here. You might get more support in https://github.com/DataDog/jmxfetch
@royremit - We are trying to get the same Hikaricp Pool metrics to Datadog - were you able to find a configuration that worked?
I need to send some metrics about Hikaricp too. It's necessary to build an custom image to aim this? I saw this documentation page, but I confused about that. Currenty we using datadog-agent-jmx image inside Kubernetes to fetch metrics about ignite, for Hikaricp this way doesn't works?
@royremit did u manage to fix it? how?