You can use ARMS to monitor the topology, API requests, abnormal and slow transactions, and SQL analysis of applications on ECS instances. This topic describes how to access applications on ECS instances with one click in the ARMS console.

Prerequisites

Procedure

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Applications.
  2. On the Applications page that appears, click Create Application in the upper-right corner.
  3. On the Create Application page that appears, click the Batch Install for ECS tab. When ARMS accesses the ECS instance for the first time, you need to grant ARMS the permission to access the ECS instance. Perform the following steps with the primary account:
    1. In the dialog box that appears, click Go to RAM to Authorize.



    2. On the Cloud Resource Access Authorization page, select AliyunARMSAccessingECSRole and then click Confirm Authorization Policy.


    3. On the Sync ECS page, click Close.

      Note If you want to access ECS applications through a custom monitoring job, synchronize the ECS instance according to the document ECS management and ARMS Agent deployment.
      1. </div>
      2. </li>
      3. </ol>
      4. <p class="p">After performing authorization, go to the <span class="keyword wintitle">Batch Install for ECS</span> tab page. All ECS instances under this primary account are displayed on the <span class="keyword wintitle">ECS
      5. Batch Install</span> tab page.
      6. </p>
      7. </li>
      8. <li class="li">On the <span class="keyword wintitle">Batch Install for ECS</span> tab page, locate the row that contains the target ECS instance, and click <span class="ph uicontrol">Install Probe</span> in the <span class="ph uicontrol">Actions</span> column. In the <span class="ph uicontrol">Note</span> dialog box that appears, click <span class="ph uicontrol">OK</span>.
      9. <figure class="fig fignone" id="fig-arp-bhj-ygb">
      10. <br><img class="image" id="image-bm1-chj-ygb" src="images/43121_en-US.png"><br>
      11. </figure>
      12. <p class="p">After ARMS Agent is installed on the ECS instance, ARMS Agent obtains all the processes
      13. that run on the ECS instance and displays the processes in the process list below
      14. the target ECS instance.
      15. </p>
      16. <figure class="fig fignone" id="fig-fkf-hfq-dhb"><br><img class="image" id="image-vrr-gfq-dhb" src="images/43122_en-US.png"><br>
      17. </figure>
      18. <div class="p">
      19. <div class="note note note-note">
      20. <div class="note-icon-wrapper"><i class="icon-note note"></i></div>
      21. <div class="note-content"><strong>Note</strong> If processes that run on the ECS instance are incorrect after ARMS Agent is installed,
      22. click <strong class="ph b">-</strong> and then <strong class="ph b">+</strong> at the left of the ECS instance to refresh the page. If ARMS Agent cannot be installed,
      23. see <a title="" href="#section-wqk-sxc-zgb">FAQ</a> for the solution.
      24. </div>
      25. </div>
      26. </div>
      27. </li>
      28. <li class="li">After ARMS Agent is installed, in the following dialog box, locate the row that contains
      29. the target process, edit the application name, and then click <span class="ph uicontrol">Start Application Monitoring</span> in the <span class="ph uicontrol">Actions</span> column.
      30. <figure class="fig fignone" id="fig-dns-fhj-ygb">
      31. <br><img class="image" id="image-lzh-hhj-ygb" src="images/43123_en-US.png"><br>
      32. </figure>
      33. <div class="note note note-note">
      34. <div class="note-icon-wrapper"><i class="icon-note note"></i></div>
      35. <div class="note-content"><strong>Note</strong> When the application names of multiple processes are the same, they appear as multiple
      36. instances under the same application monitoring job.
      37. </div>
      38. </div>
      39. </li>
      40. </ol>
      41. <p class="p">After one minute, if your application is displayed in the application list and has
      42. data reported, your application has been connected to ARMS.
      43. </p>
      44. </section>
      45. <section class="section" id="section-l2f-wvc-zgb">
      46. <h2 class="title sectiontitle" id="h2-url-3">Uninstall ARMS Agent</h2>
      47. <p class="p">When you no longer need to monitor applications on an ECS instance, you can uninstall
      48. ARMS Agent from the ECS instance. After ARMS Agent is uninstalled, ARMS stops monitoring
      49. all the processes of the ECS instance. You can uninstall ARMS Agent as follows:
      50. </p>
      51. <ol class="ol" id="ol-w13-4vd-zgb">
      52. <li class="li">
      53. <p class="p">On the ECS instance in which ARMS Agent is installed, run the <code class="ph codeph">jps -l</code> command to view all the processes. In the results returned, locate
      54. <code class="ph codeph">com.alibaba.mw.arms.apm.supervisor.daemon.Daemon </code>
      55. and view the process number.
      56. </p>
      57. <p class="p">In this example, the process number is 62857.</p>
      58. <figure class="fig fignone" id="fig-s4l-qvd-zgb">
      59. <br><img class="image" id="image-xwf-svd-zgb" src="http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/152233/156022868743111_en-US.png"><br>
      60. </figure>
      61. </li>
      62. <li class="li">
      63. <p class="p">Run the command <code class="ph codeph">kill -9 process number</code>, for example, <code class="ph codeph">kill -9 62857</code>.
      64. </p>
      65. </li>
      66. <li class="li">Restart your application.</li>
      67. </ol>
      68. </section>
      69. <section class="section" id="section-wqk-sxc-zgb">
      70. <h2 class="title sectiontitle" id="h2-url-4">FAQ</h2>
      71. <p class="p">What should I do when ARMS Agent cannot be installed?</p>
      72. <ol class="ol" id="ol-kzc-byc-zgb">
      73. <li class="li">Make sure that your ECS instance
      74. can access the ARMS Agent download link in the region of your instance.<pre class="pre codeblock"><code>Make sure that your ECS instance can access the Internet and download ARMS Agent on the One-click Access to Java Applications page.

      China (Hangzhou)

      http://arms-apm-hangzhou.oss-cn-hangzhou.aliyuncs.com/install.sh

      China (Shanghai)

      http://arms-apm-shanghai.oss-cn-shanghai.aliyuncs.com/install.sh

      China (Qingdao)

      http://arms-apm-qingdao.oss-cn-qingdao.aliyuncs.com/install.sh

      China (Beijing)

      http://arms-apm-beijing.oss-cn-beijing.aliyuncs.com/install.sh

      China (Shenzhen)

      http://arms-apm-shenzhen.oss-cn-shenzhen.aliyuncs.com/install.sh

      Singapore

      http://arms-apm-ap-southeast.oss-ap-southeast-1.aliyuncs.com/cloud_ap-southeast-1/install.sh

      1. <li class="li">Make sure that your ECS instance
      2. can access the ARMS console.<pre class="pre codeblock"><code>

      Mainland China

      https://arms.console.aliyun.com/

      Singapore

      https://arms-ap-southeast-1.console.aliyun.com

      1. <li class="li">Log on to the <a title="" href="https://ecs.console.aliyun.com/#/home">ECS console</a> and check the following items.
      2. <ol class="ol" type="a" id="ol-d2s-q1d-zgb">
      3. <li class="li">In the left-side navigation pane, choose <span class="ph uicontrol">Cloud Assistant</span>.
      4. </li>
      5. <li class="li">On the <span class="keyword wintitle">Cloud Assistant</span> page that appears, enter the command <code class="ph codeph">InstallJavaAgent</code>
      6. in the search box.
      7. <figure class="fig fignone" id="fig-dgv-c1d-zgb">
      8. <br><img class="image" id="image-mg2-d1d-zgb" src="images/43124_en-US.png"><br>
      9. </figure>
      10. <div class="note note note-note">
      11. <div class="note-icon-wrapper"><i class="icon-note note"></i></div>
      12. <div class="note-content"><strong>Note</strong> If no result is returned, contact Customer Services of ARMS.
      13. </div>
      14. </div>
      15. </li>
      16. <li class="li">In the <span class="ph uicontrol">Tasks</span> section, enter the ID of the command <code class="ph codeph">InstallJavaAgent</code>
      17. in the search box.
      18. In the result that is returned, locate the row that contains the target record and
      19. click <span class="ph uicontrol">View Results</span> in the <span class="ph uicontrol">Actions</span> column to
      20. check whether the <code class="ph codeph">InstallJavaAgent</code> command has run. If it has failed to run, troubleshoot the problem according to the
      21. execution result details.
      22. If the problem is caused because the ECS disk is full or ARMS Java Agent is not installed,
      23. you can clear the disk or install ARMS Java Agent to solve the problem. If you cannot
      24. solve the problem by yourself, send the detailed execution results to ARMS
      25. Customer Services.
      26. <figure class="fig fignone" id="fig-r2s-2cd-zgb">
      27. <br><img class="image" id="image-o21-fcd-zgb" src="images/43125_en-US.png"><br>
      28. </figure>
      29. </li>
      30. </ol>
      31. </li>
      32. </ol>
      33. </section>
      34. <section class="section" id="section-gr2-ds2-zgb">
      35. <h2 class="title sectiontitle" id="h2-url-5">References</h2>
      36. <ul class="ul" id="ul-qkh-2s2-zgb">
      37. <li class="li"><a title="This topic lists FAQ about installing ARMS Agent for applications in EDAS with one click, and provides solutions." href="~~109300#concept-109300-zh~~">Install ARMS Agent for applications on ECS instances with one click</a></li>
      38. </ul>
      39. </section>
      40. </div>
      41. </article>
      42. </main>