This topic uses the Ngnix monitoring job template as an example to explain how to configure a monitoring job.
Compared to a custom monitoring job, a job created from a standard template has predefined data cleansing, dataset, and alarm configurations. You only need to take care of the data source and other custom requirements.
On the Instance List page, click Edit on the right of a monitoring job to go to the Nginx standard template job editing page. In the red box, it describes the data source of the template job. You can set the data source as instructed.
To ensure consistency between real logs and logs on the template, you are advised to click Log Capturing Preview to make sure the log data is accurate.
On the data cleansing page, the system generates fields to be split based on the standard template. For example, an Ngnix template needs to monitor PVs, UVs, call return values, clients, and other information, and therefore, the system must split the data into the following fields:
- remote_addr: Remote call address, which is denoted by
$remote_addrin the nginx.conf file.
- time_local: Time stamp, which is denoted by
$time_localin the nginx.conf file.
- status: Call return value, which is denoted by
$statusin the nginx.conf file.
- body_bytes_sent: Return byte length, which is denoted by
$body_bytes_sentin the nginx.conf file.
- http_referrer: Navigated original HTTP field, which is denoted by
$http_referrerin the nginx.conf file.
- user_agent: Client version, which is denoted by
$user_agentin the nginx.conf file.
You must customize the splitting rules for related fields according to how your logs are used.
On the Dataset and Alarm Configuration page, you can view the rules configured in the standard template. Confirm the following items:
- If any required fields are missing in the dataset and alarm function configurations. Generally, if the related data cleansing fields are missing in the previous step, an error message will be displayed on this page.
- If the alarm function meets your business requirements, for example, if an alarm is generated when the 500 error occurs during a service call.
After the configurations are confirmed to be correct, you can start the job and view data on the interactive dashboard.