[Hinemos6.1] Executing Jobs on Redundant Servers
Recently, we hear from our users using an environment with server redundancy (e.g. Environment with Server A and Server B) whether there is a way to perform the following 3 operations individually.
- Execute a job for Server A only
- Execute a job for Server B only
- Execute a job for a Server configured with a virtual IP address
The above is easily possible by modifying the configuration file of Hinemos Agent and the information registered to Hinemos Client’s repository.
・Comment out the facilityId parameter in file “/opt/hinemos_agent/conf/Agent.properties”.
※ With this setting, Hinemos will resolve the FacilityId based on the hostname and IP address.
・Edit “/opt/hinemos_agent/conf/hinemos_agent.cfg” and change the HOSTNAME to any value. This time, we will set it to “hostX”.
※ By modifying the HOSTNAME, you can change the hostname which Hinemos Agent sends to Hinemos when resolving its facility ID to a different value than its actual hostname (the result of hostname command).
・Restart Hinemos Agent to reflect the configuration change.
・Apply the configurations made above to the other redundant server (Server A or B).
・Register the following 3 nodes to Hinemos Manager. For the names of the node, specify the value of the HOSTNAME in “hinemos_agent.cfg”.
- Node information of node A
Node Name: hostX
IP Address: Physical IP address of Server A
- Node information of node B
Node Name: hostX
IP Address: Physical IP address of Server B
- Node information of node X
Node Name: hostX
IP Address: Virtual IP address
With the setting above, the following operation will be possible.
・Run a job to node A → Job will be executed on Server A
・Run a job to node B → Job will be executed on Server B
・Run a job to node X → Job will be executed on the server with a virtual IP address
Now, let’s see whether we can actually execute jobs to the expected target servers.
First, confirm the IP addresses of Server A (node-013-077) and Server B (node-013-078).
(10.2.13.150 is the virtual IP address)
Next, execute the “hostname -I” command to the 3 nodes and check the result from the job history.
The job execution result for node A is 10.2.13.77 10.2.13.150
The job execution result for node B is 10.2.13.78
The job execution result for node X is 10.2.13.77 10.2.13.150
As expected, node A and node X executed the job on Server A, and node B has executed the job on Server B.
Next, let’s see what will happen again after switching the virtual IP address.
Execute the jobs in the same manner as before.
The job execution result for node A is 10.2.13.77
The job execution result for node B is 10.2.13.78 10.2.13.150
The job execution result for node X is 10.2.13.78 10.2.13.150
This time, we can see that node A executed the job on Server A, and node B and node X have executed the job on Server B.
Like we have shown above, by combining the configuration of Hinemos Agent and the repository setting, you can specify the target of job execution for servers where the virtual IP address is replaced regularly.
That is it for today! Thank you for reading!
If you are interested in using Hinemos in the enterprise environment, visit our online store Hinemos Store for information regarding our subscription packages of Hinemos. Various types of subscription are available with additional option features, support, etc., for enhancing the operation of Hinemos.
Note: Currently, our subscription is available only to customers located in the United States.
Follow our SNS accounts for updates and more!