PostgreSQL Database - Monitoring Extension

PostgreSQL is an open source object-relational database system.

 

The PostgreSQL monitoring extension captures metrics from a PostgreSQL database and displays them in the AppDynamics Metric Browser.

 

This extension works only with the standalone machine agent.

 

 

Metrics include:

 

  • Transaction commits and rollbacks
  • Blocks hit and read
  • Tuples fetched and returned
  • Tuples inserted/updated/deleted

 

Installation

 

Note: Configure the AppDynamics Machine Agent prior to installing this monitoring extension.

 

1.  Download and extract the PostgreSQLMonitor.zip file into the <machine agent home>/monitors directory.

  1. $ cd <machine agent home>/monitors/
    
    $ unzip PostgreSQLMonitor.zip
  2. Edit the monitor.xml and update:

     

    a. Change <execution-frequency-in-seconds> if the default value of 60 seconds is not required. This defines how often the monitor should execute and collect metrics.


    b. Change <execution-timeout-in-secs> if the default value of 60 seconds is not required. This defines how long the application should wait before timing out.


    c. Change the default-value of "host" under <monitor-run-task><task-argument> if PostgreSQL is not at "localhost".


    d. Change the default-value of "port" under <monitor-run-task><task-arguments> if PostgreSQL is not at port 5432.


    e. Change the default-value of the username under <monitor-run-task><task-arguments> if the default user is not "postgres".


    f. Change the default-value of the password under <monitor-run-task><task-arguments> if the default password is not "welcome".


    g. (OPTIONAL) Change the default-value of the tier under <monitor-run-task><task-arguments> if you want this metric to appear under a specific tier. Otherwise the metrics will be registered in every tier.


    h. Change the default-value of "columns" under <monitor-run-task><task-arguments> if all the metrics specified above are not required.


    i. Change the refresh-intervale under <monitor-run-task><task-arguments> if the default value of 300 seconds is not required. This determines the duration of time before querying for new data from the database.

     

  3. Restart the Machine Agent.

     

  4. Look for the metrics in the AppDynamics Metric Browser.

 

Metrics

 

VariableDescription
numbackendsNumber of Backends
xact_commitTransaction Commits
xact_rollbackTransaction Rollback
blks_readBlocks Read
blks_hitBlocks Hit
tup_returnedTuples Returned
up_fetchedTuples Fetched
tup_insertedTuples Inserted
tup_updatedTuples Updated
tup_deletedTuples Deleted

 

 

Contributing

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

 

Support

 

For any support questions, please contactace@appdynamics.com.



 

Version:

1.0

Compatibility:

3.6

Last Update:

05/20/2013