Updated on 2024-06-28 GMT+08:00

Custom Plug-in Access

Application Scenario

Use a custom plug-in to create a collection task to monitor specified metrics. In addition, use Exporter to report database metrics for exception detection and Grafana dashboard display.

Prerequisites

Procedure

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Collection Management > Collection Tasks. On the displayed page, click Create Collection Task.
  3. On the collection task configuration page, set parameters by referring to the following table.

    Figure 1 Configuring a collection task
    Table 1 Parameters for creating a collection task

    Operation

    Parameter

    Description

    Select Instance

    Prometheus Instance

    Select a Prometheus instance for ECS to store collected data.

    A collection task will be associated with the Prometheus instance to mark and classify collected data. If no Prometheus instance is available, create one.

    Set Plug-in

    OS

    Operating system of the host. Options: Linux and Windows.

    NOTE:
    • If Linux is used, you can select a middleware or custom plug-in.
    • If Windows is used, you can only select a custom plug-in.

    Collection Plug-in

    Click Add Plug-in. On the displayed page, choose Custom and then select a custom plug-in.

    Plug-in Version

    Select a plug-in version.
    NOTE:

    Plug-in versions that have not been released are dimmed and cannot be selected.

    Set Collection Task

    Collection Task Name

    Name of a collection task. Enter 1 to 50 characters and start with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed.

    Host

    Click Add Host and select a host.

    Specify host: Select a host that has been connected.

    • On the Specify host page, search for and select a host by the host name, IP address, or Agent status.
    • On the Specify host page, click in the upper right corner to deselect the host.
    • Ensure that the UniAgent of the selected host is running. Otherwise, no data can be collected.
    NOTE:

    If you select a custom plug-in, you can select multiple hosts.

    Advanced Settings

    Includes Collection Period (s) and Timeout Period (s).

    • Collection Period (s): O&M data collection period, in seconds. Options: 10s, 30s, and 60s (default).
    • Timeout Period (s): the maximum time for executing a collection task, in seconds. Options: 10s, 30s, and 60s (default).
      NOTE:

      The timeout period must be shorter than or equal to the collection period.

    • Executor: user who executes the collection task, that is, the user of the selected host. Default: root. Enter the name of the user who executes the collection task. Recommended: root.

  4. Click Create.
  5. On the displayed collection task page, click the target collection task to view its details.