Giter Club home page Giter Club logo

c3p0-monitoring-extension's Introduction

AppDynamics C3P0 Monitoring Extension

This extension works only with the standalone machine agent.

##Use Case

c3p0 is a connection pooling library for making traditional JDBC drivers "enterprise-ready" by augmenting them with functionality defined by the jdbc3 spec and the optional extensions to jdbc2. c3p0 registers MBeans under com.mchange.v2.c3p0, one with statistics about the library as a whole (called C3P0Registry), and an MBean for each PooledDataSource you deploy. Please refer here for details.

This eXtension inspects and collects c3p0 datasource statistics exposed through MBeans and reports them to AppDynamics Controller.

##Prerequisites

Please enable JMX in the container if not already enabled that hosts the application using c3p0 connection pooling mechanism.

##Installation

  1. Run 'mvn clean install' from the c3p0-monitoring-extension directory and find the C3P0Monitor.zip in the 'target' directory.
  2. Unzip C3P0Monitor.zip and copy the 'C3P0Monitor' directory to <MACHINE_AGENT_HOME>/monitors/
  3. Configure the extension by referring to the below section.
  4. Restart the Machine Agent.

In the AppDynamics Metric Browser, look for: Application Infrastructure Performance | <Tier> | Custom Metrics | C3P0 in case of default metric path

Configuration

Note : Please make sure not to use tab (\t) while editing yaml files. You can validate the yaml file using a yaml validator

  1. Configure the C3P0 Extension by editing the config.yml file in <MACHINE_AGENT_HOME>/monitors/C3P0Monitor/.

  2. Specify the container instance host, JMX port, username and password in the config.yml. Configure the MBeans for this extension to report the metrics to Controller. By default, com.mchange.v2.c3p0 is the domain name. Extension by default reports the metrics of MBean C3P0Registry, one with statistics about the c3p0 library. Specify the dataSourceName you want to exclude from monitoring as a comma separated values in the keyproperty 'excludePooledDataSources'. PooledDataSource MBean ObjectName is of the form 'com.mchange.v2.c3p0:type=PooledDataSource[z8kfsx944ur8uu1osma2k|1b1a3c12]'. Please refer here for details. You can also add excludePatterns (regex) to exclude any metric tree from showing up in the AppDynamics controller.

    For eg.

         # Server hosting the C3P0 application specifics
         server:
             host: "localhost"
             port: 9044
             username: ""
             password: ""
             
    
         # C3P0 MBeans. Exclude patterns with regex can be used to exclude any unwanted metrics.
         mbeans:
             domainName: "com.mchange.v2.c3p0"
             excludePooledDataSources: [z8kfsx944ur8uu1osma2k|1b1a3c12]
             excludePatterns: [.*AllIdentityTokenized$, .*AllPooledDataSources$]
    
         #prefix used to show up metrics in AppDynamics
         metricPrefix:  "Custom Metrics|C3P0|"
    
    
  3. Configure the path to the config.yml file by editing the in the monitor.xml file in the <MACHINE_AGENT_HOME>/monitors/C3P0Monitor/ directory. Below is the sample

    <task-arguments>
        <!-- config file-->
        <argument name="config-file" is-required="true" default-value="monitors/C3P0Monitor/config.yml" />
         ....
    </task-arguments>
    

##Metrics

  • C3P0Registry: AllIdentityTokenCount, AllIdentityTokenizedCount, AllPooledDataSourcesCount, NumPooledDataSources, NumPoolsAllDataSources
  • PooledDataSource: acquireIncrement, acquireRetryAttempts, acquireRetryDelay, checkoutTimeout, effectivePropertyCycleDefaultUser, idleConnectionTestPeriod, initialPoolSize, loginTimeout, maxAdministrativeTaskTime, maxConnectionAge, maxIdleTime, maxIdleTimeExcessConnections, maxPoolSize, maxStatements, maxStatementsPerConnection, minPoolSize, numBusyConnections, numBusyConnectionsAllUsers, numBusyConnectionsDefaultUser, numConnections, numConnectionsAllUsers, numConnectionsDefaultUser, numFailedCheckinsDefaultUser, numFailedCheckoutsDefaultUser, numFailedIdleTestsDefaultUser, numHelperThreads, numIdleConnections, numIdleConnectionsAllUsers, numIdleConnectionsDefaultUser, numThreadsAwaitingCheckoutDefaultUser, numUnclosedOrphanedConnections, numUnclosedOrphanedConnectionsAllUsers, numUnclosedOrphanedConnectionsDefaultUser, numUserPools, propertyCycle, startTimeMillisDefaultUser, statementCacheNumCheckedOutDefaultUser, statementCacheNumCheckedOutStatementsAllUsers, statementCacheNumConnectionsWithCachedStatementsAllUsers, statementCacheNumConnectionsWithCachedStatementsDefaultUser, statementCacheNumStatementsAllUsers, statementCacheNumStatementsDefaultUser, threadPoolNumActiveThreads, threadPoolNumIdleThreads, threadPoolNumTasksPending, threadPoolSize, unreturnedConnectionTimeout, upTimeMillisDefaultUser

##Contributing

Always feel free to fork and contribute any changes directly here on GitHub.

##Community

Find out more in the AppSphere community.

##Support

For any questions or feature request, please contact AppDynamics Support.

c3p0-monitoring-extension's People

Contributors

akshayappd avatar

Watchers

 avatar James Cloos avatar  avatar Abhimanyu Arora avatar Rev. Richard E. Baker avatar  avatar Shashank Devan avatar  avatar  avatar  avatar  avatar John Southerland avatar Bhuvneshwar Kumar avatar James Schneider avatar  avatar  avatar  avatar Mithun Banerjee avatar Deepak avatar shawn hampton avatar  avatar  avatar Srinivas Dharmasanam avatar Shivkumar Loka avatar  avatar  avatar Daniel Odievich avatar  avatar  avatar Anurag Bajpai avatar  avatar  avatar  avatar Rajeev Singh avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.