The collection configuration in the infrastructure can remotely distribute the collection configuration to the categraf on the machine, enabling convenient centralized management of the collection. Below is an example of configuring MySQL collection to illustrate how to configure collection rules.
Parameter Description
1. Rule Name & Business Group
The corresponding rule name and business group will be displayed in the highlighted area on the front page.
2. Filtering Conditions
Only machines belonging to the business group of the current collection configuration will be filtered. Machines can be matched by tags and machine identifiers. After matching the conditions, you can use machine preview to confirm whether the matching rules are correct.
3. Component & Plugin Type
Select the component from the drop-down menu according to the collection requirements. The example here is MySQL.
4. Template Configuration
If you want to adjust the collection template of a component, you can edit it in the Template Center. Here, taking MySQL as an example, you can modify the specified fields according to the annotated prompts. For the MySQL plugin, you only need to modify the address, username, and password to collect common metrics.
5. Testing
After the configuration is completed, click Test to find the corresponding data. The collection distribution test function requires version ent-v0.3.125 or above.
Creating Collection Templates
- Integration Center - Template Center —> Create in the upper right corner
- Fill in the corresponding template name and select the template icon. Custom images can be placed in ../flashcat/integrations/$DIR/icon/$FILE.png
- Select the newly created template —> Collection Template —> Create —> Fill in the custom configuration template content
How to Use Collection Templates
Note: The plugin type of custom collection templates must be the input plugin type supported by the categraf collector. The plugin types provided by default in the Template Center are all supported. If needed, you can learn and use the plugins provided by default.
Here is an example. If we want to configure process monitoring for Nginx, Docker, and Prometheus, each time a process is added for collection using the default template, the process name in the collection template needs to be modified. At this time, we can create multiple process collection templates, write the process name in the template, and directly select the corresponding template later.
1. Create Process Monitoring Template
In the Custom Template Collection —> Create Collection Template
In the example below, services such as Nginx, Docker, and Prometheus need to be monitored. Replace the service names in the configuration below and create three different Procstat process collection configurations for different service names.
Finally, three different process monitoring collection templates are generated.
2. Custom Template Data Collection
Using the custom template configuration above, you can directly select the template of the corresponding process and save it when configuring data collection.
In addition to the process collection mentioned above, network devices can also be configured with different monitoring templates according to different network devices, achieving templated management in the same way.