Collect Logs from ECS Instances

<p class="shortdesc">This article describes how to collect and view ECS logs and how to configure alarm rules. When an alarm is triggered, the system informs you of the exception by email.</p> <section class="section prereq" id="ECS_Log__prereq_n22_5rb_vmb"><div class="tasklabel"><h2 class="doc-tairway">Before you begin</h2></div> <ul class="ul" id="ECS_Log__ul_gdq_5rb_vmb"> <li class="li">You have opened Log Service. For more information, see<a class="xref" href="/ssr/help/middleware/LogCloud/Pricing.Buy" target="_blank">Purchase Process</a>。</li> <li class="li">You have purchased one or multiple ECS instances.</li> </ul> </section> <section class="section limitation" id="ECS_Log__xkx_qrb_vmb"><div class="tasklabel"><h2 class="doc-tairway">Limitation</h2></div> <p class="p">The region where you create an index must be the same as the region of the ECS instances whose logs are to be collected.</p> </section> <section><div class="tasklabel"><h2 class="doc-tairway">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand" id="ECS_Log__step_jpn_kqy_wmb"> <span class="ph cmd"> Log in to the<a class="xref" href="/console/logcloud/indexed/list" target="_blank">Log Service Console</a>。</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the left navigation pane, click<span class="ph uicontrol">Indexed</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the page that opens, select the target region.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the upper-right corner of the page, click <span class="ph uicontrol">Create Indexed</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the page that opens, create an index. For more information, see <a class="xref" href="/ssr/help/middleware/LogCloud/User_Guide.Collect.Indexed.Create_Index" target="_blank">Create an Index</a>.</span> <div class="itemgroup info"> <img class="image" id="ECS_Log__image_kmx_3sb_vmb" src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20210106133705-12b651799088.png" width="830"> </div> </li><li class="li step stepexpand"> <span class="ph cmd">In the left navigation pane, click <span class="ph uicontrol">Project Management</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Project Management</span> page, select the target region.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the upper-right corner of the page, click <span class="ph uicontrol">Create Project</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Create Project</span> page, create a project. For more information, see <a class="xref" href="/ssr/help/middleware/LogCloud/User_Guide.Collect.Project.Create_Project" target="_blank">Create a Project</a>. </span> <div class="itemgroup info"> <img class="image" id="ECS_Log__image_qjj_b4y_wmb" src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20210106133705-102a2e2595c8.png" width="830"> </div> </li><li class="li step stepexpand"> <span class="ph cmd">In the left navigation pane, click <span class="ph uicontrol">Project Management</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Project Management</span> page, select the target region.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Click the target project name.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Click the <span class="ph uicontrol">AGENT GROUP</span> tab.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the upper-right corner of the tab, click<span class="ph uicontrol"> Create Groups</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Create Groups</span> page, create a host group. For more information, see <a class="xref" href="/ssr/help/middleware/LogCloud/User_Guide.Collect.Agent_Group.Create_Agent_Group" target="_blank">Create a Host Group</a>. </span> <div class="itemgroup info"> <img class="image" id="ECS_Log__image_emh_h4y_wmb" src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20210106133705-150c3bbc95a7.png" width="830"> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Click the <span class="ph uicontrol">AGENT</span> <span class="ph uicontrol">CONFIG </span>tab.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the upper-right corner of the page, click <span class="ph uicontrol">Create Config</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Create Config</span> page, create a general collection policy. For more information, see <a class="xref" href="/ssr/help/middleware/LogCloud/User_Guide.Collect.Agent_Group.Create_Agent_Group" target="_blank">Create a General Collection Policy</a>. </span> <div class="itemgroup info"> <img class="image" id="ECS_Log__image_lmk_l4y_wmb" src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20210106133706-1d3bc9989698.png" width="830"> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Query Logs.</span> <div class="itemgroup info"> <ol class="ol" type="a" id="ECS_Log__ol_unp_44y_wmb"> <li class="li">In the left navigation pane, click <span class="ph uicontrol">Log</span> <span class="ph uicontrol">Search</span>.</li> <li class="li">On the <span class="ph uicontrol">Log Search</span> page, enter the query criteria and then click the query icon. For more information, see<a class="xref" href="/ssr/help/middleware/LogCloud/User_Guide.Search.Search_Log" target="_blank">Query Logs</a> .</li> </ol> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Create an Alarm Rule.</span> <div class="itemgroup info"> <ol class="ol" type="a" id="ECS_Log__ol_itn_s4y_wmb"> <li class="li">In the left navigation pane, click <span class="ph uicontrol">Alarm Management</span>.</li> <li class="li">On the <span class="ph uicontrol">Alert List</span> page, select the target region.</li> <li class="li">In the upper-right corner of the page, click <span class="ph uicontrol">Create Alert</span>.</li> <li class="li">On the <span class="ph uicontrol">Create Alert</span> page, create an alarm rule. For more information, see <a class="xref" href="/ssr/help/middleware/LogCloud/User_Guide.Alarm.Create_Alarm" target="_blank">Create an Alarm Rule</a>.<img class="image" id="ECS_Log__image_o5q_54y_wmb" src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20210106133703-1bf475ac958d.png" width="830"></li> </ol> </div> </li></ol></section>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products