Monitor PostgresSQL database using the UIM jdbc_response probe
search cancel

Monitor PostgresSQL database using the UIM jdbc_response probe

book

Article ID: 35831

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

Currently there is not a dedicated probe to monitor the PostgreSQL database Server. By following the steps below you can enable monitoring of this SQL database by utilizing the jdbc_response probe.

Environment

  • UIM 20.x or higher
  • jdbc_response probe 1.25

Cause

- Guidance

Resolution

Part I - On PostgreSQL Server:

Depending on OS (Windows/Linux) and UNIX flavor (RPM-based or Debian-based), configuration may vary (please refer to your platform's PostgreSQL documentation). Generally PostgreSQL configuration file is postgresql.conf.

1. Enable Remote access for PostgreSQL:

       In postgresql.conf, make PostgreSQL Listen on Ethernet IP address: listen_addresses = '##.##.##.##'


2. Enable remote access from jdbc_response probe robot:

        In pg_hba.conf

        host all all ##.##.##.##/## <password>


3. Restart PostgreSQL database service:

       # /etc/init.d/postgresql restart


4. Create and allow PostgreSQL monitoring user:

    Login to PostgreSQL using 'psql' command as an admin user

       $psql -U <user> -W

       Enter the password for the PostgreSQL admin user


5. Create PostgreSQL monitoring user:

        postgres =# createuser <user> with password '<password>';


6. GRANT new user access to the monitored database:

        postgres=# grant all on database pgdb to <user>;

  

Part-II - On 'jdbc_response' probe Robot:

1. Download PostgreSQL JDBC Driver from PostgreSQL site:

       http://jdbc.postgresql.org/download.html 

2. Rename postgresql-8.4-701.jdbc4.jar to pg.jar for your convenience to use driver name

3. Copy pg.jar to \probe\database\jdbc_response\jar\

4. Change runprobe.bat:

        set CLASSPATH should look like this:

        set CLASSPATH=jar\jdbc_response.jar;jar\nimsoft.jar;jar\TwoFish.jar;jar\oracle.jar;jar\sql_drv.jar;jar\pg.jar

5. Verify the existence of jar\pg.jar

6. In jdbc_response probe connection properties:

      Database URL: jdbc:postgresql://##.##.##.##:5432/pgdb

      Driver Name: org.postgresql.Driver

      Driver Path: /Program Files/Nimsoft/probes/database/jdbc_response/jar/pg.jar

      User ID: <user>

      Password: <password>

 
You should now be able to connect PostgreSQL Server database using the jdbc_response probe.

Notes:

  • Make sure you have Java JRE installed on the jdbc_response probe robot
  • On PostgreSQL server, modify firewall rules to allow connection to PostgreSQL port (the default port is 5432/tcp).
  • URL to jdbc driver could be outdated but you should be able to find the latest from the website.

 

Additional Information

Related KB: Monitor postgreSQL databases with MCS in UIM (broadcom.com)

You can use the sql_response probe to monitor a Postgresql database.

You can add postgresql as successfully queried through an ODBC connection using the Postgresql ODBC driver (Be sure to have the Postgres database driver installed).

Attachments

jdbc_response-1.25_1676999304941.zip get_app
postgresql_mcs_templates_1676999288413.zip get_app