...
In the file C:\ProgramData\checkmk\agent\check_mk.user.yml, create a fileinfo section like this:
And restartCode Block language powershell theme RDark fileinfo: enabled: true path: - c:\temp\*.txt - c:\path\to\file.dat
.
- Restart the Checkmk agent.
Monitoring of single files
- Rediscover your host, and you will find the single files that you configured in Step 1, and you can add them to monitoring:
After that, you can create rules to specify how to monitor those files.
. - Go to Click on the "hamburger" menu of that service and click "Parameters for this service."
. - Click on "Size and age of single files" to create a rule as desired,
...
Sometimes it is desired not to monitor the individual files but a file group instead. To do this, you need to create a rule on the type "File Grouping Patterns" There, you have to specify a name for the group, "Include Patterns," and optionally "Exclude Patterns."
- Go to Setup → Services → Service monitoring rules → Grouping Patterns → Add rule
. - After a Re-Discovery, the single file services will vanish, and the file group will appear, and you can add the new service to the monitoring.
. - After that, you can create Create a rule by clicking on the "hamburger menu" / Parameters for this service.
. - Click on "Size, age, and count of file groups" to create a rule as desired.
Example
Special case: file(s) does not exist during discovery
...