Creating a Plug-in
You can customize a script to create a plug-in and use it to collect metric data.
Procedure
- Log in to the AOM 2.0 console.
- In the navigation pane, choose Collection Management.
- In the navigation pane, choose Plug-in Market and click Create Plug-in.
- On the displayed page, set related parameters.
- Plug-in information
Table 1 Plug-in parameters Parameter
Description
Plug-in Name
Name of a custom plug-in. Enter a maximum of 32 characters starting with a letter. Only letters, digits, and underscores (_) are allowed.
Plug-in Type
Type of a plug-in. The default value is Custom.
Description
Description of the plug-in to be created. Enter a maximum of 10,000 characters.
- Plug-in configuration
Table 2 Plug-in configuration parameters Parameter
Description
Plug-in Version
Version number of the custom plug-in.
Plug-in Script
Custom plug-in script. Options: Linux and Windows.
Linux: Shell or Python script.
Example:
#!/bin/bash #Examples echo "metric_name{label_name=\"label_value\"} 100"
Windows: BAT script
Example:
::Examples @echo off echo metric_name{label_name="label_value"} 100
Default Script Parameter
Custom script parameter template. Only letters, digits, and underscores (_) are allowed. The rules are as follows:
- Letter: For example, -a.
- Character combination: For example, http://10.0.0.1:80. The following special characters are not allowed: &|><;`!()$-
- ${Parameter}: Enter a maximum of 64 characters starting with a letter. Only letters, digits, and underscores (_) are allowed. For example, ${a_b}.
You can combine parameters as required and separate them with spaces. The total length of these parameters cannot exceed 250 characters.
Script Parameter
Parameters in the default script parameters. After you enter the default script parameters, the system automatically identifies script parameters based on your settings.
Script parameter description:
- Mandatory: If this option is enabled, the parameter value in the plug-in debugging area is mandatory. If this option is disabled, the parameter value in the plug-in debugging area is optional.
- Parameter: name of a script parameter.
- Default Value: default value of the script parameter.
- Description: description of the parameter.
- Plug-in information
- Click Save.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot