Inspection plugins

Updated at:

Inspection plugins are the foundation of the inspection platform. The platform includes pre-configured routine inspection plugins, and you can also add new plugins in the console.

Plugin overview

In the navigation pane on the left, click Routine Inspection > Inspection Plugins to open the plugin list page. This page displays all plugins in the current environment. You can filter plugins by type and status, or search for a plugin by entering its name.

Click a plugin name to view its details, which include basic information (such as plugin ID, name, type, status, and tags), parameter settings, and script content. The script content varies based on the plugin type.

Routine Inspection supports the following types of plugins:

  • Shell/Python script: This type of plugin runs on the target machine or container specified by the rule to which the plugin is attached. Use this plugin for basic inspections on the target machine or container, such as checking disk capacity or verifying whether a process exists.

  • Automated testing image: This plugin automatically activates Yunyou test images. You must configure the test images on Yunyou in advance to use them for inspection tasks.

  • Page liveness check: This plugin opens an inspection page in a browser to check whether the page is live. The High Availability Management Platform supports liveness checks for static pages that do not require a logon and for pages that require an active logon session. It also supports matching page content or elements to verify successful rendering. You can configure page liveness checks as inspection tasks to inspect pages on a schedule.

Create a plugin

You can create custom inspection plugins by navigating to Routine Inspection > Inspection Plugins.

Procedure

  1. Log on to the High Availability Management Console.

  2. In the navigation pane on the left, click Routine Inspection > Inspection Plugins.

  3. Click Create. In the Create Plugin panel, configure the following parameters.

    Parameter

    Required

    Description

    Plugin Name

    Required

    Enter a name for the plugin.

    Description

    Optional

    Enter a description for the plugin.

    Plugin Type

    Required

    Select PYTHON script or Shell script.

    Tags

    Optional

    Select one or more tags for easy search and statistics.

  4. Click OK.

Import a plugin

You can use the import feature to quickly create or apply an inspection plugin. For example, you can import and apply inspection plugins developed by the Ant Group technical risk team for specific scenarios. These plugins are based on their experience in cross-domain risk control.

Procedure

  1. In the navigation pane on the left, click Routine Inspection > Inspection Plugins.

  2. On the Inspection Plugins page, click Import Plugin.

  3. Select the inspection plugin from your local machine to import it.

Export a plugin

You can use the export feature to back up an inspection plugin to your local machine.

Procedure

  1. In the navigation pane on the left, click Routine Inspection > Inspection Plugins.

  2. Click Export Plugin.

  3. In the Batch Export Plugins dialog box, select the plugins that you want to export and click OK.

Parameter constraints

The Inspection Plugins module of the High Availability Management Platform supports parameter injection. This feature lets you input custom parameters when a plugin is instantiated. Incorrect input parameters can severely damage the application. Therefore, you must strictly control and constrain the incoming parameters.

Prerequisites

A plugin has been created.

Procedure

  1. In the navigation pane on the left, click Routine Inspection > Inspection Plugins.

  2. On the Inspection Plugins page, click the name of the created plugin.

  3. Add a parameter setting.

    1. In the Parameter Settings section of the plugin details page, click Add.

    2. In the dialog box that appears, configure the following parameters and click Save.

      Parameter

      Description

      Parameter Name

      Required.

      The name of the parameter. It must be unique.

      Parameter Constraint

      Required.

      A regular expression. The default value is ^[0-9a-zA-Z.]+$.

      Parameter Description

      Required.

      A description of the parameter.

      Parameter Example

      Required.

      The value of the parameter.

      Encrypt Information

      Optional.

      Select whether to encrypt the parameter.

Other operations

  • Add a parameter setting: To add another parameter constraint, click Add.

  • Delete a parameter setting: Click the delete icon on the right. In the confirmation dialog box that appears, click Yes.

View liveness check pages

On the High Availability Management Platform, you can configure page liveness checks as inspection tasks to inspect pages on a schedule. The liveness check pages in Routine Inspection are pre-configured. You cannot add new liveness check pages in the console.

Procedure

  1. In the navigation pane on the left, click Routine Inspection > Inspection Plugins.

  2. On the Inspection Plugins page, click the Page Management tab.

  3. The page lists all liveness check pages in the current environment.

  4. In the list of liveness check pages, click a page name to open its details page.

    On this page, you can view the configuration details for the liveness check page. The details include the page name, URL, corresponding product code, whether content matching is enabled, the content to match (if enabled), whether a logon is required, cookie information, and the custom liveness check duration (if a custom duration is set).