If you have multiple Sonar devices, not only can you use them for Replication, you can also set them up for Service Monitoring, as failover devices in case one of the servers goes down for whatever reason.
HOW DOES FAILOVER WORK?
Failover works in a very simple way. The backup Sonar is set to ping your primary server at a set interval. If your primary server fails to respond to the backup Sonar at any given moment, the backup Sonar will carry out a set of commands specified by you in order to act as the primary Sonar until your main Sonar comes back online. Once the primary Sonar becomes ping-able again, the backup Sonar will revert back to it's secondary state. All of this is automatic, and requires no interference from you, the user, at all.
WHAT DO YOU NEED?
- Two Sonar Servers
- Both Sonar's must have the same interface IPs as the other (except for one, which will identify each individual server)
- Both Sonar's should be on the same version (failover from a 3.2 to a 3.5 will work, but it is recommended that both Sonar's have the same version).
HOW DO I SET UP SERVICE MONITORING
Log into the Sonar management application (GUI) in your Backup Sonar and navigate to System -> Service Monitoring. Here, you can add and create new Service Monitoring jobs for the server.
- In Service Monitoring, navigate to the "Actions" Tab. Here, you will get the specify the job that the Backup Sonar does when it cannot (or can) ping the Primary Sonar.
- Select "Add" next to the Action ID drop-down menu to create a new ID. You can name this job something meaningful, like "Main Sonar Down" or something similar.
- Now you can add tasks to this job. Click Add down the bottom to open up a window. Here you can specify the job. In the event that the main Sonar goes down, you will want to "enable" the interfaces on the secondary Sonar. For example, the "Job" will be to enable, and the "Type" will be the interface. You can then click the ellipsis button and select which interface you want to enable. Rinse and repeat this process until you have set a job to enable all the interfaces on the secondary Sonar in the event of ping failure.
- If there are any routes to be enabled, run the same process as above but instead of "interface" as the type, you want to select "route".
- The next process will be to set up a new Action ID in the event that the main Sonar comes back online. Follow step 2 to create a new Action ID and then step 3 to create jobs for that new action ID. Since we have already created an Action ID for the main Sonar when it fails, we do the same for the second Action ID but instead of "enabling" interfaces and routes, we want to "disable" them as the main Sonar becomes ping-able. Make sure you do not disable the secondary Sonar's primary IP however, as that still needs to remain available on the network.
- Once you have set up the action IDs, switch back to the "Events" tab and click "Add New". In the Add Event window, select "ping host" as the Event type, and in the field below, type in the IP of the server you want to ping. This will be the IP of the main Sonar server. The "Frequency" is how often you want the secondary Sonar to ping the first. For example, if you put "10", the secondary Sonar will ping the primary ever 10 seconds times the number of counts. If the Count is set to 1, it will ping every 10 seconds and in the event of failure, it will activate the Action Jobs. If the count is set to 2, it will ping every 10 seconds and in the event of failure twice, it will activate the Action Jobs. Select the Fail-Act ID number from the Actions you created earlier in the previous steps. "Fail-Act ID" indicates what you want the secondary Sonar to do in the event that it cannot ping the primary. "Success-Act ID" indicates what you want the secondary Sonar to do in the event that the main Sonar does come back up.
TESTING SERVICE MONITORING
If you have set up Service Monitoring as explained above, then you are ready to test if it works. The best time to do this will be after hours, during a period where you an afford some downtime. In order to test whether or not Service Monitoring works, you can simply pull the network cable out from the main Sonar (so it becomes un-pingable) and wait and see if the secondary Sonar takes over. If the interfaces on the secondary Sonar come up, Service Monitoring was a success.