8.6.2 Upgrade installation of JP1/IM - Agent (for UNIX)
Install JP1/IM - Agent on the local disks of the primary server and the secondary server.
-
Shut down JP1/IM - Agent servicing.
Shut down JP1/IM - Agent of logical host from the cluster software. If physical host is also used, JP1/IM - Agent of physical host is stopped.
-
Upgrade and install JP1/IM - Agent.
For details about how to install the software, see 2.3.1(2) Procedure of JP1/IM - Agent installation.
This command is executed for both the primary server and the secondary server.
-
Add the contents of the share directory. (When upgrading from 13-01 or earlier to 13-10 or later)
1. Create the following directorys in the shared directory.
Go to the shared directory at the command prompt, and then execute the following command.
mkdir -m 700 jp1ima/logs/vmware_exporter/
2. Copy the added definition files (with extension ".model" and ".update" file) to a shared directory.
Copy files with the extensions ".model" and ".update" in /opt/jp1ima/conf of the primary server to the shared-directory/jp1ima/conf.
When copying, assume the owner, owner group, and permissions.
At the command prompt, execute the following command:
cp -a /opt/jp1ima/conf/jpc_file_sd_config_vmware.yml.model shared-directory/jp1ima/conf cp -a /opt/jp1ima/conf/jpc_vmware_exporter.yml.model shared-directory/jp1ima/conf cp -a /opt/jp1ima/conf/jpc_vmware_exporter.service.model shared-directory/jp1ima/conf cp -a /opt/jp1ima/conf/jpc_product_deffile_list.json.update shared-directory/jp1ima/conf
3. Removes ".model" or ".update" from file name of the definition file.
For the definition files that you copied to the shared-directory/jp1ima/conf, remove ".model" or ".update" that is granted to the end of file name.
At the command prompt, execute the following command:
rename .model '' shared-directory/jp1ima/conf/*.model mv -f shared-directory/jp1ima/conf/jpc_product_deffile_list.json.update shared-directory/jp1ima/conf/jpc_product_deffile_list.json
4. Modify the variables listed in the added definition file.
The definition files copied to shared-directory/jp1ima/conf contains the variable names listed in the table below. Search for each variable name and rewrite all corresponding parts as shown in the table below.
Variable name
Value to be rewritten
@@hostname@@
Replace with logical host name.
@@installdir1@@
Replace with "/opt".
@@installdir2@@
Replace with the path of the shared directory.
5. Change the binding method of the added service to the IP binding method.
Both physical host and logical host must be setup.
For physical host, both nodes require setup. For physical host, restart of the service is required after changing setup.
In physical host, physical host name is setup to the changes in the definition file as shown below.
Service
Target file
Change point
vmware_exporter
/usr/lib/systemd/system/jpc_vmware_exporter.service
Add the command line option --address to the command line as follows.
ExecStart = /bin/sh -c '"/opt/jp1ima/bin/vmware_exporter" \
--address="physical-host-name" \
...
In logical host, logical host is named setup to the changes in definition file below.
Service
Target file
Change point
vmware_exporter
shared-directory/jp1ima/conf/jpc_vmware_exporter.service
Add the command line option --address to the command line as follows.
ExecStart = /bin/sh -c '"/opt/jp1ima/bin/vmware_exporter" \
--address="logical-host-name" \
...
6. Add a logical host name to the Description of the added unit definition file.
For the added unit definition files under shared-directory/jp1ima/conf, add the logical host name to the Description listed in the file.
File name of the unit definition file: jpc_service-name.service
Please implement this procedure for services that are not in use.
Target file
Before change
After change
shared-directory/jp1ima/conf/jpc_vmware_exporter.service
Description = JP1/IM3-Agent VMware metric collector
Description = JP1/IM3-Agent VMware metric collector logical-host-name
7. Add a logical host name to the file name of the added unit definition file.
Add a logical host name to the file name of the unit definition file under the shared-directory/jp1ima/conf.
File name before change: jpc_service-name.service
File name after change: jpc_service-name_logical-host-name.service
Please implement this procedure for services that are not in use.
At the command prompt, execute the following command:
rename .service _logical-host-name.service shared-directory/jp1ima/conf/*.service
8. Copy the added unit definition file to /usr/lib/systemd/system.
Copy the unit definition files (File renamed in step 7) in the shared-directory/jp1ima/conf to /usr/lib/systemd/system of both the primary server and the secondary server.
Be sure to copy it to /usr/lib/systemd/system. If the file is moved, the appropriate context may not be set in the unit definition file in the case of SELinux, and systemd may not recognize it.
In the copied unit definition file, set permission 644, owner root:root.
Please implement this procedure for services that are not in use.
At the command prompt, execute the following command:
cp shared-directory/jp1ima/conf/jpc_vmware_exporter_logical-host-name.service /usr/lib/systemd/system chmod 644 /usr/lib/systemd/system/jpc_vmware_exporter_logical-host-name.service /usr/lib/systemd/system chown root:root /usr/lib/systemd/system/jpc_vmware_exporter_logical-host-name.service
If you modify the contents of the unit definition file after placing it in /usr/lib/systemd/system, execute the following command to reload systemd.
systemctl daemon-reload
9. Delete the added unit definition file in the shared directory.
Delete the unit definition files (Copy source files in step 8) in the shared-directory/jp1ima/conf because it is not required.
Please implement this procedure for services that are not in use.
At the command prompt, execute the following command:
rm -f shared-directory/jp1ima/conf/jpc_vmware_exporter_logical-host-name.service
10. Disable services for logical hosts if you do not want to use the added service.
For services used on logical hosts, disable services for logical hosts that are not used on both the running and standby servers.
To disable services on a logical host, use the following command:
/opt/jp1ima/tools/jpc_service -off jpc_vmware_exporter -h logical-host-name
Also, for services not used by logical hosts, move the following discovery configuration file from the shared-directory/jp1ima/conf directory to the shared-directory/jp1ima/conf/jpc_file_sd_config_off directory:
At the command prompt, execute the following command:
mv shared-directory/jp1ima/conf/jpc_file_sd_config_vmware.yml shared-directory/jp1ima/conf/jpc_file_sd_config_off
11. Verify that the added service is registered with systemd.
On both the primary server and the secondary server, display the service list of systemd to confirm that the service for logical host has been registered.
The name of the service for logical host is file name of the unit definition file.
At the command prompt, execute the following command:
systemctl list-unit-files -t service
12. Perform the required setup for the added add-on program.
When using the added add-on program, see 2.19.2 (14) Setting up VMware exporter and 2.19.2(3)(i) Add a VMware exporter scrape job (for Linux) (optional) to make the necessary settings.
13. Reister the service for logical host in the cluster software.
Register the service for the logical host in the cluster software.
The following service is covered: registered only the services to use with the clusters.
jpc_vmware_exporter
-
Start
Start the service with the following command:
/opt/jp1ima/tools/jpc_service_start -s jpc_vmware_exporter -h logical-host-name
-
Stop
Stop the service with the following command:
/opt/jp1ima/tools/jpc_service_stop -s jpc_vmware_exporter -h logical-host-name
-
Forced stop
Stop the service forcibly with the following command:
/opt/jp1ima/tools/jpc_service_stop -s jpc_vmware_exporter -h logical-host-name -f
-
Operational monitoring
Check the status of the service with the following command:
systemctl is-active jpc_vmware_exporter_logical-host-name
14. Check for problems in operation.
-
Start the service from the cluster software.
-
Causes a failover.
-
-
Start JP1/IM - Agent servicing.
Start JP1/IM - Agent of logical host service from the cluster software.
If you are also using physical host, start JP1/IM - Agent service of physical host.