Configure Postgres for TIBCO OI Hawk RedTail
You can enable TIBCO OI Hawk RedTail to connect to an external Postgres server by performing the following steps:
Enabling Remote Connectivity on Postgres
You must enable remote connectivity on Postgres for HA deployment. To enable remote connectivity, perform the following:
- Procedure
-
Go to DATA_FOLDER/postgresql and open the
pg_hba.conf
file. - Append the following line after "# IPv4 local connections":
host all all <IP_address>/32 md5
Where,
IP_address
is the IP address of the machine on which Postgres is running.
Configuring a Single Postgres Server for TIBCO OI Hawk RedTail HA Deployment
If you do not want to create a database cluster and want to use only a single Postgres server to serve all nodes for incoming requests, perform the following steps:
- Procedure
-
Go to DATA_FOLDER/postgresql and open the
pg_hba.conf
file. - Append the following after "# IPv4 local connections":
hostssl all all 127.0.0.1/32 trust
hostssl all all <IP_address_1>/32 md5
hostssl all all <IP_address_2>/32 md5
hostssl all all <IP_address_3>/32 md5Where,
IP_address
denotes the IP addresses of the machines which are a part of HA deployment.
Configuring PostgreSQL for HA Deployment
Updating Configuration Parameters
Make the changes to the configuration parameters of the following components:
Webapp
Open the rt_webapp_vars.json
file in a text editor and update the DATABASE_URL
configuration parameter as following in all three machines that are a part of HA deployment:
"DATABASE_URL" : <protocol>://<DB username>:<DB password>@<host1>:<port1>,<host2>:<port2>/<DB name to access>
Where,
• | The DB user name and password are set only once, and they are provided at the beginning of the URL. The user name and password should be the same for all hosts. These parameters are optional. They can be empty. |
• | The hosts and ports are a set of keys and values for the different IP addresses where the databases are present. |
• | The DB name is the name of the database that must be accessed. |
Example: DATABASE_URL=postgres://postgres:mypassword@192.0.2.1:5432,192.0.2.2:5432,192.0.2.3:5432/logapplogu
Hawk RedTail Console
Open the rt_hawkconsolenode_vars.json
file in a text editor and update the datasource_url
configuration parameter as following in all three machines that are a part of HA deployment:
"datasource_url" : "jdbc:postgresql://<host1>:<port1>,<host2>:<port2>/logumon"
Grafana
Open the rt_grafana_server_vars.json
file in a text editor and update the GF_DATABASE_HOST
configuration parameter as following in all three machines that are a part of HA deployment:
GF_DATABASE_HOST
parameter is set as currently active PostgreSQL database IP and port.