...
Table of Contents
With Checkmk, you can monitor single files for pure existence, their age, size, etc. But it is also sometimes necessary to group several files into one service and impose those rules and thresholds on such a filegroup.
...
Configuration of the agent
First, we must tell the agent which files should be monitored. This can be done with the Checkmk agent bakery in Checkmk Enterprise, Enterprise Free, and managed service edition. In Checkmk RAW Edition, this needs to be done manually.
...
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:
...
Bake & Sign the agents to deploy the new agent configuration.
...
Without agent bakery (RAW edition):
In the file C:\ProgramData\checkmk\agent\check_mk.user.yml, create a fileinfo section like this:
...
Info |
---|
Please know that paths and files are case-sensitive, even in the Windows agent. |
...
Monitoring of single files
You can now rediscover your host, and you will find the single files that you configured in Step 1, and you can add them to monitoring:
...
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
...
Click on "Size, age, and count of file groups" to create a rule as desired.
For example like this:
...
Special case: file(s) does not exist during discovery
Sometimes you have a special use case where the single files or files that are part of file groups do not exist (during discovery). E.g., you want to monitor the quarantine directory of antivirus software, which should normally be empty.
...
By creating such an enforced rule, you can force Checkmk to create a service check, and you can monitor files that are not present during discovery.
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page Properties | ||
---|---|---|
| ||
|
...