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

Prerequisites

  • Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.
  • 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. The metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.
    3. 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.

    4. Restart the Machine Agent.

       

    5. 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

  • Please look at the troubleshooting document and make sure that everything is followed correctly.
  • For any support questions, please contactappdx-ext@appdynamics.com.



     

    Version:

    2.2

    Compatibility:

    3.6

    Last Update:

    14 Feb 2018