Appdynamic Machine Agent Installation and Verification

What is appdynamics?
The AppDynamics Business tool helps build dashboards that automatically correlate application performance to business outcomes. The ability to derive an in-depth understanding of the impact of technical issues on business objectives allows IT teams to prioritize their work in a way that ultimately improves ROI.

What is appdynamics agent?
AppDynamics agents are plug-ins or extensions that monitor the performance of your application code, runtime, and behavior. They’re deployed to every corner of your application environment, from devices, to containers and hosts, to applications.


1) Create directory to download and run the appdynamic agent installation,
mkdir -p /opt/appdynamics/machine-agent

2) Get into the directory and download the agent,
cd /opt/appdynamics/machine-agent

3) From this link download the required agent version which match with your OS.
https://accounts.appdynamics.com/downloads#
Example:
curl -L -O -H “Authorization: Bearer <Token_ID>” “https://download.appdynamics.com/download/prox/download-file/machine-bundle/21.12.1.3206/machineagent-bundle-64bit-linux-21.12.1.3206.zip&#8221;

4) Unzip the agent file,
unzip machineagent-bundle-64bit-linux-21.12.1.3206.zip

5) Open the conf file and edit the following parameters,
vi conf/controller-info.xml
Parameters to be changed,
<controller-host>test.appdynamics.com</controller-host>
<controller-port>443</controller-port>
<controller-ssl-enabled>true</controller-ssl-enabled>
<account-access-key>abcdefgh</account-access-key>
<account-name>test</account-name>


6) Lets start the machine agent and get it to be monitored from appdynamics,
<machine-agent-home-dir>bin/machine-agent -d -p pidfile

!!!!!!!!!! Hurray we done the installation and verify the server under appdynamics SERVERS list !!!!!!!!!!!!!!


APPDynamics PHP-Agent isntallation and verification:

What is PHP Agent?
The PHP agent component discovers and monitors business transactions, application services, and backends in your PHP application. It injects AppDynamics instrumentation into the application at runtime. The AppDynamics agent proxy is a Java process that handles the communication between the PHP agent and the Controller.

Steps to install PHP agent:
1) In the download page instead of choosing machine agnet select PHP agent and download the required file.

Example:
For centos you can choose RPM file and directly installed it by,
-> rpm -ivh <Downloaded-RPM-file>

2) If you have downloaded zip file then just unzip it by,
unzip appdynamics-php-agent.x86_64-21.7.0.4560.zip
3) Edit the installvars file,
cd appdynamics-php-agent-linux_x64
Replace your parameters like this,
#### cat installvars ####
APPD_CONF_ACCOUNT_NAME=’test’
APPD_CONF_ACCESS_KEY=’aaaaa’
APPD_CONF_CONTROLLER_HOST=’test.appdynamics.com’
APPD_CONF_CONTROLLER_PORT=’443′
APPD_CONF_SSL_ENABLED=’true’
APPD_CONF_APP=’test-app’
APPD_CONF_TIER=’app’

4) Now run the script named ‘runme.sh’.
bash runme.sh
5) You check check the agent installation by listing the process,
ps -ef |grep php

Thats it you have installed the php agent sucessfully……….

Monitoring multiple virtualhost from web server

  1. For monitor multiple virtual host from web server add below lines in all the virtual host definition in /etc/httpd/conf/httpd.conf

    <VirtualHost *:80>
    ServerName test.com
    DocumentRoot /var/www/html
    php_value agent.applicationName test-app
    php_value agent.tierName web
    php_value agent.nodeName test-app
    php_value agent.controller.hostName test.appdynamics.com
    php_value agent.controller.port 443
    php_value agent.accountName test
    php_value agent.accountAccessKey abcdefgh
    </VirtualHost>

    <VirtualHost *:443>
    ServerName test.io
    DocumentRoot /var/www/html
    php_value agent.applicationName test-app
    php_value agent.tierName web
    php_value agent.nodeName test-app
    php_value agent.controller.hostName test.appdynamics.com
    php_value agent.controller.port 443
    php_value agent.accountName test
    php_value agent.accountAccessKey abcdefgh
    </VirtualHost>

    IMPORTANT:
    *** Both installvars and httpdconf value should be same.

Appdynamics Pyhotn agent Installation and Verification

What is Python agent?

The Python Agent discovers, and maps and tracks metrics for business transactions, app services, and backends in your web application by injecting instrumentation into the Python application at runtime. The agent operates from inside the WSGI server that contains the instrumented application.

Lets see how to agent installation from Dockerfile,

1) Add below thing to your existing docker file, this includes ENV variables and staring agent by “pyagent”

####Docker file for python agent####

FROM python:3.9-bullseye
LABEL Environment=”Dev”
MAINTAINER kalaivani

ENV APPDYNAMICS_TCP_COMM_PORT=9091
ENV APPDYNAMICS_AGENT_APPLICATION_NAME=dev-app
ENV APPDYNAMICS_AGENT_TIER_NAME=web-external-api
ENV APPDYNAMICS_AGENT_REUSE_NODE_NAME=true
ENV APPDYNAMICS_AGENT_REUSE_NODE_NAME_PREFIX=test_api
ENV APPDYNAMICS_AGENT_ACCOUNT_NAME=test
ENV APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY=abcdef
ENV APPDYNAMICS_CONTROLLER_HOST_NAME=test.appdynamics.com
ENV APPDYNAMICS_CONTROLLER_PORT=443
ENV APPDYNAMICS_CONTROLLER_SSL_ENABLED=true
ENV APPD_AGENT_VERSION=21.12.2.4693

ENV APPDYNAMICS_DEBUG_LOG=on
ENV APPDYNAMICS_LOGGING_LEVEL=debug

RUN pip install -U appdynamics==${APPD_AGENT_VERSION}

ENTRYPOINT [“/bin/bash”, “-c”, “/usr/local/bin/pyagent run — /usr/local/bin/python3.9 /opt/application/main.py”]

IMPORTANT:
Entrypoint line should replace with your application start command.

Once you done this check for the Aplication name in appdynamics dashboard!!!!!

Leave a comment