You can install or uninstall an agent on a VM using a script.
- Ensure that the end point is available in vRealize Operations Cloud.
- Ensure that you have completed all the prerequisites. For more information, see Prerequisites.
- Ensure that the unzip package is available on the VM.
- Ensure that the user has access permissions to the download folder.
- Ensure that the guest IP is properly configured and is unique across vCenter Servers. If more than one VM with the same IP across vCenter Servers is monitored, the script cannot resolve and subscribe to application monitoring.
- Ensure that the cloud account is configured for the vCenter Server to which the VM belongs. The application monitoring adapter that is mapped to the vCenter Server is created if it does not exist.
- Ensure that the vRealize Operations Cloud Gateway and vRealize Operations Cloud CSP Authentication URLs are reachable from the VMs.
- Only IPv4 is supported at present.
- Log in to the VM on which you want to install/uninstall the agent and download the sample script from cloud proxy from the following location: https://<CloudProxy>/downloads/salt/download.sh. Run one of the following commands:
wget --no-check-certificate “https://<CloudProxy>/downloads/salt/download.sh” curl -k “https://<CloudProxy>/downloads/salt/download.sh” --output download.shNote: Use the relevant cloud proxy IP address/FQDN for <CloudProxy> in the preceding commands and location specified.
- Make the script executable by running the following command:
chmod +x download.sh
- Create the user's refresh token associated with the current organization from the following location in the Cloud Service portal: User/Organization Settings > My Account > API Tokens > Generate a New API Token
- To execute the script and install/uninstall the agent, run the following command:
./download.sh -o <operation> -t <refreshToken> [-d download_tmp_dir] Description of arguments: operation - Bootstrap operation. values: install, uninstall. refresh_token - Refresh token of the user that was generated in the previous step. download_tmp_dir - Temporary directory to download agent related bits. It is an optional parameter. Default value: current directory.
To verify the bootstrap status, verify the uaf-bootstrap-results file.
If the script is successful, the agent status will be updated in the Manage Agents tab after one collection cycle that takes 5–10 minutes.Note: When you use an automation script, concurrent agent installation with a batch size of 20 is supported.