...
With agent bakery (Enterprise editions):
- To create a new rule, go to Setup → Agents → Windows, Linux, Solaris, AIX → Agent rules → Count, size, and age of files and specify which files to be included:
Take a look at the inline help for possible patterns. - Bake & Sign the agents to deploy the new agent configuration.
Without agent bakery (RAW edition):
Note |
---|
Paths and files are case-sensitive, even in the Windows agent. |
In the file C:\ProgramData\checkmk\agent\check_mk.user.yml, create a fileinfo section like this:
Code Block language powershell theme RDark fileinfo: enabled: true path: - c:\temp\*.txt - c:\path\to\file.dat
- And restart the Checkmk agent.
Info |
---|
Please know that paths and files are case-sensitive, even in the Windows 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 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,
For example, this is with a threshold for the maximum age.
Monitoring of file groups
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 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
...
To circumvent this issue, you have to create the "Size and age of single files" and "Size, age, and count of file groups" rules from above not in the "Discovery rule" section of the setup menu but in the "Enforced services" part of the setup. So the
The rules can be found here:
- Setup → Services → Enforced services → Size and age of single files
- Setup → Services → Enforced services → Size, age, and count of file groups
...