This article provides instructions on how to create a connection to a PostgreSQL database using the jdbc_response probe.
Depending on OS(Windows/Linux) and *NIX flavor (RPM-based or Debian-based), configuration may vary (please refer to your platform's PostgreSQL documentation).
Part I - On PostgreSQL database server:
Generally PostgreSQL configuration file is postgresql.conf
1- Enable Remote access for PostgreSQL:
a. In postgresql.conf, make PostgreSQL Listen on ethernet IP address:
listen_addresses = '10.#.#.##'
b. Enable remote access from jdbc_response probe robot:
In pg_hba.conf
host all all '10.#.#.##'/24 password
c. Restart PostgreSQL database service:
# /etc/init.d/postgresql restart
2- Create/allow PostgreSQL monitoring user:
a. Login to PostgreSQL using 'psql' command as an admin user
$psql -U <pguser> -W
Enter password for the PostgreSQL admin user
b. Create PostgreSQL monitoring user:
postgres =# createuser dbuser with password '<password>';
c. Grant new user access to monitored databse:
postgres=# grant all on database pgdb to dbuser;
Part-II - On 'jdbc_response' probe Robot:
1. Download PostgreSQL JDBC Driver from PostgreSQL site.
2. Rename downloaded jar file to pg.jar for your convenience to use driver name
3. Copy pg.jar to \probe\database\jdbc_response\jar\
4. In jdbc_response probe connection properties, it should look like this.
Database URL: jdbc:postgresql://'10.#.#.##':5432/pgdb
Driver Name: org.postgresql.Driver
Driver Path: /Program Files/Nimsoft/probes/database/jdbc_response/jar/pg.jar
User ID: <dbuser>
Password: <dbuser_password>
You should now be able to connect PostgreSQL Server database using the jdbc_response probe.