This topic explains the first step of creating a custom monitoring job: configuring a data source.
After preparing a data source, you must configure the data source on the ARMS console as follows:
In the left-side navigation pane of the console, choose Custom Monitoring > Jobs , and click Create Monitoring Job in the upper-right corner.
Select a creation mode from the Create Monitoring Job drop-down list. Currently, the following creation modes are supported:
If you select Custom Monitoring Job, you must select a job region, enter a monitoring job name, and click Create and Configure. The following example is based on this case.
If you select Standard Template Monitoring Job, you must select a job region and template configuration, enter a monitoring job name and the interactive dashboard name, and then click Create and Configure.
If you select Import Custom Template, you must first export a template from an existing monitoring job.
On the Instance List page, find the monitoring job from which a template is to be exported.
Choose More > Export Template next to the monitoring job, and copy the job template from the displayed dialog box.
Return to the Create Export Template Job dialog box, select a region, enter a monitoring job name and template configuration, and click Create and Configure.
After selecting a monitoring type, configure the data source. The following description assumes that the custom monitoring type is selected.
On the Log Source Configuration page, select a log source type, add the corresponding log source, and set the encoding mode.
- Log Source Type: ARMS supports ECS, SLS LogHub, SDK, and more data sources. For more information about how to select a log source, see Ｄata source overview. The ECS log is taken as an example in the following description.
Select Log Source: Click Add Log Source. In the displayed dialog box, select the ECS or ECS group that generates logs, and enter the log path.
Note: Make sure that you enter the absolute log path, such as
/apps/arms.log. If multiple files are configured, separate them by commas (,), for example,
Encoding Setting: The Automatic Detection mode is selected by default. You can also select an encoding mode based on the encoding format of your logs. Select a specific encoding mode whenever possible because automatic detection may result in gibberish code.
After setting is completed, click Log Capturing Preview in the upper-right corner to capture logs.
ARMS captures part of data (up to 20 records) from the selected ECS logs. A temporary pre-capturing channel must be set up, and therefore the capturing time is generally about 30 seconds. If logs fail to be pre-captured, check the configured log path and selected log source. After logs are pre-captured successfully, proceed with the next step.
Note: The following constraints are imposed on the ECS data source:
- A file can be consumed by only one job at a time.
- The directory of captured files can accommodate up to 200 files.
After the log source is configured, you can proceed with the next step Log cleansing.