Help Docs

Install PHP Agent in AWS Beanstalk

The following instructions will guide you through the installation of PHP Agent in AWS Beanstalk environment.

  1. Download PHP agent from the Site24x7 client
  2. Extract the agent, this will create a directory called zpa
  3. Create a file called zpa.config and copy the below given script into it
  4. files:
      mode: "000755"
      owner: root
      group: root
      content: |
        APM_KEY=$(/opt/elasticbeanstalk/bin/get-config environment -k MONITORING_APM_LICENSE 2>&1)
        APM_NAME=$(/opt/elasticbeanstalk/bin/get-config environment -k MONITORING_APM_NAME 2>&1)
        cd /opt/
        rm -f
        wget -O
        unzip -o
        cd /opt/zpa/bin
        rm instance.out
        sh stop
        sh ${APM_KEY} ${APM_NAME}
        sh start
    "bash /opt/elasticbeanstalk/hooks/appdeploy/post/"
  5. Copy zpa.config file in .ebextensions directory
  6. Edit your EBS application configuration and add 2 keys, MONITORING_APM_LICENSE (mandatory, give your site24x7 license key) and MONITORING_APM_NAME (optional-if not given application will appear under PHP-Application name in APM dashboard) as shown in the following image
  7. Restart application server from Action menu on the right side of your beanstalk console.

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.

We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.

Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!