Creating a Custom Collection Template
Collection templates allow users to configure, reuse, and deploy collection configurations conveniently, improving monitoring efficiency at work. Configuring custom collection templates offers more flexibility to adapt to tailored monitoring needs. This article provides an example using the mtail plugin monitoring scenario.
Use Case: Deploying batch collection rules for different application logs in different directories during work.
Select Template Center —> Mtail Plugin —> Collection Template
In the upper right corner, select Create —> Fill in the custom monitoring collection configuration.
Here’s a brief explanation of the collection configuration below, monitoring the occurrence of the keyword aerror
in the /opt/a.log
file.
Next, create another collection configuration for /opt/b.log
.
Using the Collection Template
Select the collection template to use —> Choose Create Collection from the drop-down menu on the right.
Select the effective business group for the collection.
Enter the collection configuration page, filter the collection deployment nodes, and click Save.
You will soon be able to query the corresponding indicator values. This article only deployed log collection for one server; in practice, you can deploy application log collection for a batch of application hosts. After configuring another type of log collection according to the above process, you can achieve batch monitoring of logs in different directories for different applications.