DataDog / dd-agent

Datadog Agent Version 5
https://docs.datadoghq.com/
Other
1.3k stars 812 forks source link

jmx / tomcat default template should contain database connection monitoring #840

Open ssbarnea opened 10 years ago

ssbarnea commented 10 years ago

Below are two most used ways to monitor database connections for jmx applications. Maybe it would make sense to give them similar aliases so we could properly aggregate them.

Feel free to add your ideas.

Note: the bean name is commented because of a bug that would filter it out if you specify it.

    - include:
                type: C3P0Registry
#                bean: "com.mchange.v2.c3p0
                attribute:
                  AllPooledDataSourcesCount:
                    alias: tomcat.c3p0.allpooled
                    metric_type: gauge
                  NumPooledDataSources:
                    alias: tomcat.c3p0.pooled
                    metric_type: gauge
                  NumPoolsAllDataSources:
                    alias: tomcat.c3p0.pools
                    metric_type: gauge
    - include:
        type: DataSource
        attribute:
          numIdle:
            alias: tomcat.datasource.idle
            metric_type: gauge
          numActive:
            alias: tomcat.datasource.active
            metric_type: gauge
          maxIdle:
            alias: tomcat.datasource.maxidle
            metric_type: gauge
          maxActive:
            alias: tomcat.datasource.maxactive
            metric_type: gauge
remh commented 10 years ago

Hi @ssbarnea Thanks for that!

C3P0 is not included by default in tomcat though and it's not specific to tomcat.

One thing we could do is have a generic C3P0 integration. What do you think ?

ssbarnea commented 10 years ago

This would be brilliant! Just include it in the default tomcat setup as I do think that it doesn't hurt the collection in any way if it is not defined.