tencent cloud

Feedback

Practical Tutorial of Container Service

Last updated: 2024-10-16 16:43:53

    Prerequisites

    Assets should be synchronized and audit permissions are enabled for the agent configuration to monitor assets correctly.

    Directions

    1. Download the agent from the Agent Management Page.
    2. Decompress the agent to the directory CapAgent.
    3. Place the decompressed agent directory CapAgent in the Dockerfile directory of the business container.
    4. In the Dockerfile of the business container, add the following agent startup command. The agent's startup directory supports customization. In this document, it is set to /data/dbagent.
    RUN mkdir -p /data/dbagent
    COPY ./CapAgent /data/dbageent/CapAgent
    COPY ./start_agent.sh /etc/kickStart.d/
    RUN chmod +x /etc/kickStart.d/start_agent.sh
    5. start_agent.sh is a script for the agent. Pay attention to the agent's startup directory. The content is as follows:
    #! /bin/bash
    cd /data/dbagent/CapAgent/bin/
    nohop ./start.sh 1>/dev/null 2>/dev/null
    6. Create an image.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support