Upgrade of Monitor-JVM
Upgrade of Monitor-JVM in Configure HEAL Modules.
Upgrade of Monitor-JVM#
Follow the steps below to upgrade monitor-jvm:
1. Capability: The install script can upgrade the libhealagent to specified versions, provided the library file exists.
2. If the libhealagent is not enabled, then the below command will directly install libhealagent to the appropriate version provided to the script.
sh install_libhealagent_linux.sh agent_path=<Agent_install_dir> lib_version=<ver_number>
For example:
Upgrade the existing monitor-jvm version from 1.0.20 to 1.0.21
sh install_libhealagent_linux.sh agent_path=/opt/Heal/Agents lib_version=1.0.21
Expected Output:
05-02-2024:15:21:56: [INFO] Running as user: root
05-02-2024:15:21:56: [INFO] User has sufficient privileges to proceed.
05-02-2024:15:21:56: [INFO] PLATFORM : Linux. Script will proceed.
05-02-2024:15:21:56: [INFO] Finding OS architecture
05-02-2024:15:21:56: [INFO] OS is 64 Bit
05-02-2024:15:21:56: [INFO] Fetching libhealagent Status...
05-02-2024:15:21:56: [INFO] Libhealagent Installation Status: Installed
05-02-2024:15:21:56: [INFO] /lib64/libhealagent.so link already exists.
05-02-2024:15:21:56: [INFO] Updating /lib64/libhealagent.so version to 1.0.21..
05-02-2024:15:21:56: [INFO] Removed /$LIB/libhealagent.so entry from /etc/ld.so.preload.
05-02-2024:15:21:56: [INFO] /lib/libhealagent.so link already exists.
05-02-2024:15:21:56: [INFO] Updating /lib/libhealagent.so version to 1.0.21..
05-02-2024:15:21:56: [INFO] ld.so.preload already exists.
05-02-2024:15:21:56: [INFO] Creating a backup of /etc/ld.so.preload...
05-02-2024:15:21:56: [INFO] Backup created successfully: /etc/ld.so.preload_healbackup_20240205152156
05-02-2024:15:21:56: [INFO] Adding /$LIB/libhealagent.so to /etc/ld.so.preload...
05-02-2024:15:21:56: [INFO] LDPRELOAD entry /$LIB/libhealagent.so added successfully.
Install the necessary version of the library when there are multiple versions of library files available.
For example:
./install_libhealagent_linux.sh agent_path=/opt/Heal/AgentInstaller/Agent lib_version=1.0.21
Expected Output:
05-02-2024:15:23:19: [INFO] Running as user: root
05-02-2024:15:23:19: [INFO] User has sufficient privileges to proceed.
05-02-2024:15:23:19: [INFO] PLATFORM : Linux. Script will proceed.
05-02-2024:15:23:19: [INFO] Finding OS architecture
05-02-2024:15:23:19: [INFO] OS is 64 Bit
05-02-2024:15:23:19: [INFO] Fetching libhealagent Status...
05-02-2024:15:23:19: [INFO] Libhealagent Installation Status: Not installed
05-02-2024:15:23:19: [INFO] ### Creating 64 Bit Library Link ###
05-02-2024:15:23:19: [INFO] /lib64/libhealagent.so symbolic link not found. Creating link as /lib64/libhealagent.so
05-02-2024:15:23:19: [INFO] /opt/heal/AgentInstaller/Agent/utils/monitor-jvm/lib/64/libhealagent.so.1.0.21 found.
Proceeding with library installation..
05-02-2024:15:23:19: [INFO] /lib64/libhealagent.so link created successfully.
05-02-2024:15:23:19: [INFO] /lib/libhealagent.so symbolic link not found. Creating link as /lib/libhealagent.so
05-02-2024:15:23:19: [INFO] /opt/heal/AgentInstaller/Agent/utils/monitor-jvm/lib/32/libhealagent.so.1.0.21 found.
Proceeding with library installation..
05-02-2024:15:23:19: [INFO] /lib/libhealagent.so link created successfully.
05-02-2024:15:23:19: [INFO] ### Creating config file Link ###
05-02-2024:15:23:19: [INFO] /etc/heal.conf symbolic link not found. Creating symbolic link..
05-02-2024:15:23:19: [INFO] Symbolic link created successfully.
05-02-2024:15:23:19: [INFO] ### Adding Library Entry in preload file ###
05-02-2024:15:23:19: [INFO] ld.so.preload already exists.
05-02-2024:15:23:19: [INFO] Creating a backup of /etc/ld.so.preload...
05-02-2024:15:23:19: [INFO] Backup created successfully: /etc/ld.so.preload_healbackup_20240205152319
05-02-2024:15:23:19: [INFO] Adding /$LIB/libhealagent.so to /etc/ld.so.preload...
05-02-2024:15:23:19: [INFO] LDPRELOAD entry /$LIB/libhealagent.so added successfully.
05-02-2024:15:23:20: [INFO] ### Validating loader config ###
05-02-2024:15:23:20: [INFO] Library is found loaded in the loader. Loader configuration is proper. Proceeding..
05-02-2024:15:23:20: [INFO] ### Validating libhealagent Status ###
05-02-2024:15:23:20: [INFO] Fetching libhealagent Status...
05-02-2024:15:23:20: [INFO] Libhealagent Installation Status: Installed
Rollback of Monitor-JVM#
1. Current Status: Not available.
2. Alternative Method: Manually uninstall and reinstall to the desired version.
Uninstallation of Monitor-JVM#
To uninstall or remove monitor-jvm, execute the following command:
sh install_libhealagent_linux.sh -uninstall
Precautions#
Follow the below precautions before uninstalling monitor-jvm:
1. Do not remove the monitor-jvm folder or any of its contents without correctly uninstalling it.
2. Do not modify the heal.conf file until the configuration details table is understood.
3. Do not remove or manually update the file.
/<path-to>/Agent/utils/monitor-jvm/data/.portData.dat
This could result in the skipping of JMX arguments being added to application servers during their restart.
4. Do not remove or manually update the file.
/<path-to>/Agent/utils/monitor-jvm/config/extraArgs.properties
This could result in the skipping of JMX arguments being added to the JBoss process if its version is below 7.
5. Do not remove or manually update the file.
/<path-to>/Agent/utils/monitor-jvm/config/jimConfig.properties
This could result in the skipping of JIM arguments being added to application servers during their restart.
- Do not remove or manually update any of the following files,
agent-cache.properties
from the directory below:
JIMAgent/config/
This could result in the skipping of JIM arguments being added to application servers during their restart.