Splunk AppDynamics

Install php agent on Elastic Beanstalk

CommunityUser
Splunk Employee
Splunk Employee

How can I install the PHP agent on AWS elastic Beanstalk?

Labels (1)
0 Karma

Sajna_Sreenivas
Path Finder

Hi Gamer,

I would like to understand the requirement better. Are you trying to instrument PHP application deployed on  AWS beanstalk?

If that is the case, you may refer the following for the steps

https://docs.appdynamics.com/display/PRO45/Install+the+PHP+Agent

Let me know whether we are on the same page here.

Thanks,

Sajna Sreenivasan

CommunityUser
Splunk Employee
Splunk Employee

Dear sajna,

Thanks for prompt answer.

Actually, In order to Install the app dynamics PHP application agent on  AWS beanstalk, I guess I should add appropriate commands on a config file inside my projects .ebextensions folder.

I would appretiate if you could provide the list of commands which I need to put there.

Thanks,

Gamer.

0 Karma

Benjamin_Walker
Engager

Hi Gamer - The easiest way to get the agent up-and-running is to use .ebextensions to configure your environment to install the agent for you on startup. I've attached a sample appdynamics.config for you below to look at. It will probably work for you as is, but you will need to update line 24 (06install), replacing the following elements with the details for your controller/app and save:

<ACCOUNT_NAME>

<ACCESS_KEY>

<CONTROLLER_URL>

<CONTROLLER_PORT>

<APPLICATION_NAME>

<APPLICATION_TIER>

Cheers,

-Benjamin

AppDynamics.config:

files:
    "/tmp/appdynamics-php-agent-linux_x64-phpagent-4.4.1.343.tar.bz2":
        mode: "000444"
        owner: ec2-user
        group: ec2-user
        source: https://packages.appdynamics.com/php/phpagent-4.4.1.343/appdynamics-php-agent-linux_x64-phpagent-4.4.1.343.tar.bz2

# commands are executed in alphabetical order
commands:
    01reset:
        command: "rm -rf /opt/AppDynamics/phpagent"
        ignoreErrors: true
    02makedir:
        command: "mkdir -p /opt/AppDynamics/phpagent"
    03unzip:
        command: "tar -xvjf /tmp/appdynamics-php-agent-linux_x64-phpagent-4.4.1.343.tar.bz2"
        cwd: /opt/AppDynamics/phpagent
    04owner:
        command: "chown -R webapp:webapp phpagent"
        cwd: /opt/AppDynamics
    05logperms:
        command: "chmod 777 /opt/AppDynamics/phpagent/appdynamics-php-agent-linux_x64/logs"
    06install:
        command: "./install.sh -s -a=<ACCOUNT_NAME>@<ACCESS_KEY> <CONTROLLER_URL> <CONTROLLER_PORT> <APPLICATION_NAME> <APPLICATION_TIER> $HOSTNAME"
        cwd: /opt/AppDynamics/phpagent/appdynamics-php-agent-linux_x64
    07cleanup:
        command: "rm /tmp/appdynamics-php-agent-linux_x64-phpagent-4.4.1.343.tar.bz2"
    08restart:
        command: "service httpd restart"
Tags (1)
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...