Replacing an Enterprise Agent Using Agent Identity Files
Replacement Overview
ThousandEyes Enterprise Agents can be replaced by using one of the following methods:
Agent Clustering Method:
This method consists of deploying a new agent, clustering together the new agent with the old one, and then deleting the old agent from the cluster. The act of clustering transfers test associations and agent characteristics. Detailed instructions for this method are available in Replacing an Enterprise Agent Using the Agent Clustering Method)
Transferring Agent Identity Files:
During the installation of a replacement Enterprise Agent, identity files from an existing Enterprise Agent are transferred to the replacement system. The platform will make no distinction between the original agent and the replacement agent.
This document will demonstrate how to successfully transfer Enterprise Agent identity files from an existing to a newly deployed agent.
Enterprise Agent Identity Files
The Enterprise Agent software package is installed as a service named te-agent
onto a supported Linux operating system. The following three files are used by the te-agent
service during operation and must be transferred from the original agent to the replacement agent:
/etc/te-agent.cfg
This is the agent's main configuration file and contains account group information, logging, and proxy settings
During service start,
te-agent
reads this file and applies configuration settingsThis file is not unique to a specific agent and may be re-used to configure identical settings to multiple agents
/var/lib/te-agent/te-agent-config.sqlite
This file contains the agent ID, collector assignment, and current runtime configuration settings
Information within this file is used to authenticate with the ThousandEyes platform
WARNING: This file is unique to the agent and must not be used by two agents at the same time. DO NOT copy this file to more than one replacement Agent.
/var/lib/te-agent/te-agent.sqlite
This file contains the not-yet-submitted test and device layer data
WARNING: This file is unique to the agent and must not be used by two agents at the same time. DO NOT copy this file to more than one replacement Agent.
Obtaining Identity Files from the Original Agent
Disable the Original Enterprise Agent Using the ThousandEyes Web Application
Prior to obtaining Enterprise Agent identity files, it is recommended to temporarily disable the Enterprise Agent to be replaced:
Select Cloud & Enterprise Agents > Agent Settings within the left-hand navigation pane
1. Review the list of active Enterprise Agents for the name of the agent to be replaced 2. Click the options button in the right-hand side of the agent information row and select Disable
Stop and Disable the Original Enterprise Agent Service
ThousandEyes service must be stopped on your original agent before you may copy identity files. Disabling the service will prevent the decommissioned agent from communicating with the ThousandEyes platform in the event that the VM is restarted.
Operating systems using systemd (Ubuntu 16.04+, RHEL & CentOS 7+):
RHEL 6 & CentOS 6:
Ubuntu 14.04:
Copy Enterprise Agent Identity Files to a Single Directory
Copy identity files to a single directory for ease of management:
Compress the Directory Containing Your Original Agent Identity Files
Compress the directory containing copied identity files for ease of transfer
Delete the Agent Identity Files From Your Original Agent
While the original Identity files will be deleted when the VM is destroyed, it is always possible that the VM could be restarted prior to deletion. Removing these files safeguards from errors associated with two agents connecting to the platform with the same agent ID.
Transferring Identity Files
Use SCP to Transfer Files Between Agents
From your new replacement agent's terminal, you may use the following command to obtain files from your original agent (provided the original and the new Enterprise Agent can communicate with each other directly):
Alternatively, from your original agent's terminal you may use the following command to transfer files to your replacement agent:
NOTE: You only need to copy the .zip file once.
Installing a Replacement Agent Using Transferred Identity Files
Install the ThousandEyes Repository
You will use the ThousandEyes repository to download and install Enterprise Agent services:
Ubuntu:
RHEL 7:
CentOS 7:
Install the ThousandEyes Repository GPG Key
You must install the ThousandEyes repository GPG key in order to validate the authenticity of downloaded packages:
Ubuntu:
RHEL & CentOS 7:
Update Your Operating System's Package Manager
Pulling the repository metadata verifies that the ThousandEyes repository and corresponding GPG key are properly installed:
Ubuntu:
RHEL & CentOS 7:
Install the ThousandEyes Enterprise Agent Using Your OS's Package Manager
The te-agent
package and service are what constitutes the heart of an Enterprise Agent. The BrowserBot component (the te-browserbot
package and service) is a component that performs browser-based tests.
Ubuntu:
RHEL & CentOS 7:
Decompress the Original Agent Identity Files Within Your Replacement System
Once decompressed, a directory with the same name as the directory from your original agent will be available:
Copy the Agent Identity Files to the Target Directories Within Your Replacement System
Copy the agent identity files to their final location:
Start and Enable Enterprise Agent Services
Starting agent services will activate the ThousandEyes agent. Enabling a service ensures that it will start during system boot. To start and enable relevant services, execute the following commands:
Verifying Replacement
Once your replacement agent has been brought online, you may re-enable your agent within the ThousandEyes web application:
Select Cloud & Enterprise Agents > Agent Settings within the left-hand navigation pane and:
1. Review the list of active Enterprise Agents for the name of the agent that was replaced. 2. Click the options button in the right-hand side of the agent information row and select Enable.
Upon completion, review the Advanced Settings section to ensure that the agent information is correct:
Select the Advanced Settings tab of your Enterprise Agent information pane:
1. Verify that your Enterprise Agent is checking into the platform regularly 2. Verify that the IP address and listed Operating System are correct 3. Review the proxy settings (if applicable) to verify that they are correct
Troubleshooting
If you have any questions regarding the described agent replacement procedure or if you hit an obstacle while performing it, reach out to the ThousandEyes Customer Engineering team and we'll help you out.
Last updated