ManageEngine® Applications Manager Enterprise Edition - Failover Support |
||
There are two methods of implementing failover support in ManageEngine Applications Manager:
This setup involves a primary Applications Manager, a secondary Applications Manager and a common database. The primary and secondary Applications Manager refer to the common database only. While the primary Applications Manager talks with the database, the secondary Applications Manager simply listens to the database. If the primary server goes down, the secondary server takes over. Afterwards, the initial primary server is restarted and it starts functioning as a secondary server.
Let us assume we are going to set up three nodes - node1, node2
and node3.
Applications Manager: node1, node2
MySQL Database: node3
Install MySQL database Server version 4.0.13 in node3 and start
the MySQL Server.
Otherwise, take the MySQL bundled in Applications Manager itself. For this,
Go to C:\Program Files\ManageEngine\AppManager10\working directory.
Take the zip of the contents in mysql folder.
zip -r mysql.zip mysql\*
Go to C:\Program Files\ManageEngine\AppManager10\working\bin
folder and add the startMySQL.bat and stopMySQL.bat in
the mysql.zip.
zip startMySQL.bat stopMySQL.bat mysql.zip
Take this zip and extract the contents in a folder in node3.
Execute the startMySQL.bat file
This will start the MySQL Database Server.
By default, this MySQL is configured in such a way that it accepts connections
for the machine in which the Applications Manager is installed. Hence, you need
to add entries for the hosts node1 and node2 to access this database.
Please refer the below link for configuring permissions.
http://apm.manageengine.com/-adding--MySQL-gets-error-MYQL-is-not-accessible.html
For stopping the MySQL database, you can use the stopMySQL.bat.
[Open this file and change the line "set MYSQL_HOME=..\mysql"
to "set MYSQL_HOME=.\mysql"]
Installing Applications Manager in node1 and node 2
After installing Applications Manager in node1 and node2, do the following
configurations
For Windows:
By default AppManager10 - C:\Program Files\ManageEngine\AppManager10\
AppManager10\conf\AMServer.properties - Change am.mysql.port to the MySQL port number ( eg: am.mysql.port=3306 )
AppManager10\conf\AMServer.properties - Change am.mysqlport.check to false ( eg: am.mysqlport.check=false )
AppManager10\working\conf\database_params.conf - Change jdbc:mysql://localhost:13326/AMDB
to jdbc:mysql://node3:mysqlport/databasename
(eg: jdbc:mysql://localhost:3306/MADB )
AppManager10\working\conf\database_params.conf - Change username & password fields as required
AppManager10\working\bin\startMySQL.bat - Comment the line starting with mysqld-nt ( eg: rem mysqld-nt .. )
AppManager10\working\bin\stopMySQL.bat - Comment the line starting with mysqladmin ( eg: rem mysqladmin .. )
For Linux:
By default AppManager10 - /opt/ManageEngine/AppManager10
AppManager10/conf/AMServer.properties - Change am.mysql.port to the MySQL port number ( eg: am.mysql.port=3306 )
AppManager10/conf/AMServer.properties - Change am.mysqlport.check to false ( eg: am.mysqlport.check=false )
AppManager10/working/conf/database_params.conf - Change jdbc:mysql://localhost:13326/AMDB
to jdbc:mysql://node:mysqlport/databasename
(eg: jdbc:mysql://localhost:3306/MADB )
AppManager10/working/conf/database_params.conf - Change username & password fields as required
AppManager10/startApplicationsManager.sh - Comment the 3 lines if [ $?
!= 51 ]; then , . $NMS_HOME/bin/stopMySQL.sh and fi using
# in that file.
Sample Files:
AMServer.properties
am.mysql.port=3306
am.mysqlport.check=false
database_params.conf
url jdbc:mysql://appmanager:3306/APPMANAGERDB AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
username admin AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
# password appmanager AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
Note: If your MySQL does not require a password to connect, the password line in <database_params.conf > should be commented as shown in the above example using the #. Otherwise instead of commenting the password line in the <database_params.conf> file, just replace the string appmanager with the password of the your mysql.
startMySQL.bat ( for windows )
rem mysqld-nt --defaults-file=%MYSQL_HOME%\my.ini -u root -b .. --standalone
--
port=13326
stopMySQL.bat ( for windows )
rem mysqladmin -pappmanager -u root --port=13326 shutdown
startApplicationsManager.sh ( for Linux )
# if [ $? != 51 ]; then
# . $NMS_HOME/bin/stopMySQL.sh
# fi
Make sure MySQL Server is started in node3 and check whether the mysql.port given in the AMServer.properties in Applications Manager match.
First start Applications Manager in node1. This will get started and you can login to the console.
Next start the Applications Manager in node2. This will not get started completely, unless the Applications Manager in node1 goes down. When node1Applications Manager goes down, node 2 Applications Manager will get started along with polling, reporting etc.
The general setup of Admin Server will work in the above flow. With
regards to Managed Server, you need to configure the multiple managed servers
as against the single Admin Server.
Steps
Need to start Primary Managed Server. This will register with Admin Server.
Before starting the Secondary Managed Server, go to Admin Server and click Edit Managed Server (for which you are going to add failover support) and click failover details link. Here you need to give Secondary Managed Server details like (Host Name, Web Server port, SSL Port).
Now you can start Secondary Managed Server.
For setting up failover support using replication, please refer this link.
Enterprise Edition - Managed Server |
Anomaly Profile |