Failover Support Using PostgreSQL as Backend DB Server
Follow the steps given below to configure failover using PostgreSQL as database backend in Applications Manager:
1. Configuring database server:
For setting up the remote database server, PostgreSQL DB has to be installed and started. To do so, follow the steps given below:
Upon completing the above steps, the PostgreSQL database server should be ready for connections.
2. Configuring Primary Server:
- Install Applications Manager on the remote server by selecting the database as PostgreSQL and complete the installation. Installation Steps
- Start this installation at least once and stop it as follows:
- In Windows services, make sure the ManageEngine Applications Manager service is stopped.
- From Applications Manager server, open an Administrator command prompt window.
- Go to <Applications Manager Home> folder and run the following command:
shutdownApplicationsManager.bat -force
- Repeat the above command to ensure that all processes are stopped.
- Open the AMServer.properties file located under <Applications Manager Home>/conf/ directory and update the below entries:
am.dbserver.type=pgsql
am.db.port=15432 (Port number can be confirmed from the postgres_ext.conf file of the PostgreSQL database server installed, which is located under <Applications Manager Home>/working/pgsql/data/amdb/ directory.)
am.dbport.check=false
- Open the database_params.conf file located under <Applications Manager Home>/working/conf/PGSQL as well as <Applications Manager Home>/working/conf directories and replace existing the JDBC URL with that of the following URL containing the hostname and port of the PostgreSQL DB server for both the files:
Url jdbc:postgresql://apm-db-server:15432/amdb?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
- Now start Applications Manager in Primary server using any one of the following steps:
- Windows: Start the Applications Manager as a service by executing the installservice.bat file located under <Applications Manager Home>/bin directory. Refer here for detailed steps
- Linux: Start the Applications Manager as a service by executing the installservice.sh file located under <Applications Manager Home>/bin directory. Refer here for detailed steps
Upon completing the above steps, the Primary server will be started and will be connected to the database server containing PostgreSQL DB.
3. Configuring Secondary/Failover Server:
- Install Applications Manager on the remote server by selecting the database as PostgreSQL and complete the installation. Installation Steps
- Start this installation at least once and stop it as follows:
- In Windows services and make sure the ManageEngine Applications Manager service is stopped.
- From Applications Manager server, open an Administrator command prompt window.
- Go to <Applications Manager Home> folder and run the following command:
shutdownApplicationsManager.bat -force
- Repeat the above command to ensure that all processes are stopped.
- Open the AMServer.properties file located under <Applications Manager Home>/conf/ directory and update the below entries:
am.dbserver.type=pgsql
am.db.port=15432 (Port number can be confirmed from the postgres_ext.conf file of the PostgreSQL database server installed, which is located under <Applications Manager Home>/working/pgsql/data/amdb/ directory.)
am.dbport.check=false
- Open the database_params.conf file located under <Applications Manager Home>/working/conf/PGSQL as well as <Applications Manager Home>/working/conf directories and replace existing the JDBC URL with that of the following URL containing the hostname and port of the PostgreSQL DB server for both the files:
Url jdbc:postgresql://apm-db-server:15432/amdb?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
- Now start Applications Manager in Secondary/Failover server using any one of the following steps:
- Windows: Start the Applications Manager as a service by executing the installservice.bat file located under <Applications Manager Home>/bin directory. Refer here for detailed steps
- Linux: Start the Applications Manager as a service by executing the installservice.sh file located under <Applications Manager Home>/bin directory. Refer here for detailed steps
Upon completing the above steps, the Secondary server will be connected to the PostgreSQL database and will listen to the Primary server. However, the installation will not be started completely as the Primary is already up and running.
You can verify whether the failover setup is configured properly with the help of logs generated from Applications Manager. Click here to view sample output