This project automates the process of updating ThousandEyes endpoint agents by reading hostnames from a CSV file, mapping them to their respective agent IDs, updating their license type, and then logging the results in both JSON and CSV formats.
- Jorge Banegas
- ThousandEyes API
To get started with this project, follow these steps:
- Clone the repository to your local machine.
- Ensure you have Python installed. This project is tested with Python 3.8+.
- Install the required Python packages:
pip install -r requirements.txt
- Update the
config.py
file with your ThousandEyes API access token:access_token = 'YOUR_ACCESS_TOKEN_HERE'
- Prepare a CSV file named
data.csv
in the project's root directory with the following format, where each line contains the hostname of an endpoint agent you wish to update:A template CSV file is provided in the repository for reference.Hostname agent1.example.com agent2.example.com
To update your ThousandEyes endpoint agents, follow these steps:
- Ensure you have completed the installation/configuration steps.
- Run the script from the terminal:
$ python main.py
- The script will read the hostnames from
data.csv
, match them to agent IDs via the ThousandEyes API, update the license type for each agent, and log the results inupdate_results.json
andupdate_results.csv
files in the project directory.
This project is provided under the Cisco Sample Code License. For details, see LICENSE.
Our code of conduct is available here.
See our contributing guidelines here.
Please note: This script is meant for demo purposes only. All tools/scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. We are not responsible for any damage or data loss incurred with their use. You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.