Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on 07-30-2024 03:56 PM
Gone are the days of point-and-click monotony – we're going full CLI commando! Whether you're managing a lone server or herding a flock of hosts, this guide will transform you from a nervous newbie to a confident commander of the AppDynamics realm. So grab your favorite caffeinated beverage, fire up that terminal, and let's turn those command-line frowns upside down!
Before we can conquer the world of application monitoring, we need to arm ourselves with the right tools. Let's start by installing the AppDynamics Smart Agent CLI with Python 3.11, our trusty sidekick in this adventure.
Before we start spreading the Smart Agent love to multiple hosts, let's set up a local web server to host our package. We'll use Python's built-in HTTP server because, let's face it, who doesn't love a bit of Python magic?
cd /path/to/smartagent/package/
python3 -m http.server 8000
Your package is now available at http://your-control-node-ip:8000/smartagent-package-name.rpm
Verify with:
curl http://your-control-node-ip:8000/smartagent-package-name.rpm --output /dev/null
Keep this terminal window open – it's the lifeline for our installation process!
First, let's make sure Python 3.11 is ready and waiting:
which python3.11
You should see something like:
/usr/bin/python3.11
If Python 3.11 is playing hide and seek, you'll need to find and install it before proceeding.
Now, let's summon the Smart Agent CLI using the magical incantation below (adjust the RPM filename to match your version):
sudo APPD_SMARTAGENT_PYTHON3=/usr/bin/python3.11 yum install appdsmartagent_cli_64_linux_24.6.0.2143.rpm
Let's make sure our new CLI friend is ready to party:
appd --version
If you see the version number, congratulations! You've just leveled up your AppDynamics game.
Let's start small and install the Smart Agent on a single host. Baby steps, right?
[default] controller_url: "your-controller-url.saas.appdynamics.com" controller_port: 443 controller_account_name: "your-account-name" access_key: "your-access-key" enable_ssl: true
Feeling confident? Let's scale up and install the Smart Agent across multiple hosts like a boss!
Before we unleash our Smart Agent army, we need to create an inventory of our target hosts. Here are a couple of examples to get you started:
[targets] 54.221.141.103 ansible_user=ec2-user ansible_ssh_pass=ins3965! ansible_python_interpreter=/usr/bin/python3.11 ansible_ssh_common_args='-o StrictHostKeyChecking=no'
Let's break down the provided hosts.ini file:
[targets] 54.221.141.103 ansible_user=ec2-user ansible_ssh_pass=ins3965! ansible_python_interpreter=/usr/bin/python3.11 ansible_ssh_common_args='-o StrictHostKeyChecking=no'
Several variables are defined for the host 54.221.141.103:
ansible_user=ec2-user:
ansible_ssh_pass=ins3965!:
ansible_python_interpreter=/usr/bin/python3.11:
ansible_ssh_common_args='-o StrictHostKeyChecking=no':
This hosts.ini file defines a single host (54.221.141.103) in the targets group with specific SSH and Python interpreter settings. Here's a summary of what each setting does:
[managed_nodes] managed1 ansible_host=192.168.33.20 ansible_python_interpreter=/usr/bin/python3 managed2 ansible_host=192.168.33.30 ansible_python_interpreter=/usr/bin/python3
Save your file named hosts respectively. You can adjust the hostnames, IP addresses, and other parameters to match your environment.
We can install on our local host by using the following command.
sudo ./appd install smartagent -c config.ini -u http://your-control-node-ip:8000/smartagent-package-name.xxx --auto-start -vvvv
Now that we have our targets lined up, let's fire away:
sudo ./appd install smartagent -c config.ini -u http://your-control-node-ip:8000/smartagent-package-name.xxx -i hosts -q ssh --auto-start -vvvv
Replace with hosts if you're using the multiple managed nodes setup.
Let's make sure our Smart Agents are alive and kicking:
Check the service status:
sudo systemctl status appdynamics-smartagent
Look for new nodes in your AppDynamics controller UI under Infrastructure Visibility.
Troubleshooting
If things go sideways, don't panic! Check the verbose output, verify SSH connectivity, double-check your config file, and peek at those Smart Agent logs. Remember, every IT pro was once a beginner – persistence is key!
There you have it, intrepid AppDynamics adventurer! You've now got the knowledge to install, host, and deploy Smart Agents like a true CLI warrior. Go forth and monitor with confidence, knowing that you've mastered the art of the AppDynamics Smart Agent CLI. May your applications be forever performant and your alerts be always actionable!
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form