Count files / folders - automatically generate folder checks using patterns?

Hi there,

we’re currently on to migrate an icinga installation to CheckMK.

On that Icinga instance we have hundrets of thousand file/folder checks. It all is regarding an FTP system containing a structure like the shown below:


Every in and out folder should be checked for old files, splitt by customer. So what should come out is something like this:

FileGroup CustomerA in -> OK
FileGroup CustomerA out -> OK
FileGroup CustomerB in -> OK
FileGroup CustomerB out -> OK
FileGroup CustomerC in -> OK
FileGroup CustomerC out -> OK

In Icinga every service has been created with a single config in the past.

I wonder if it’s possibly somehow to create the services automatically for each customer usging special patterns, in regards what folders have been found, to avoid that new folders need to be added manually when they are created.

Is that possible currently?


do you mean something like this?

  1. You need to create a config file for File Info. You can use the bakery for that:
    WATO - CONFIGURATION -> Monitoring Agents -> Rules -> Count, size and age of files (Linux, Windows
    -> Here you can define the pattern

  2. Now you need the grouping rule
    WATO - CONFIGURATION -> Host & Service Parameters -> File Grouping Patterns
    -> The config could look like this:

This is a very simple example. I hope you can use it for your use case.



this is very good and easy information to start folder/file monitoring. i need few more information
do we need to modify or change anything on server where we installed the agent? or its just two rule enough. is it possible as same way in latest checkmk raw version as we have 2.0.0p cre. i see lot of post suggesting modify agent with some .ini file in to installation directory of windows where agent installed . and we cant find that in latest agent installation directory

Hi @hemant-cmk

The first rule mentioned will be baked into the agent as the agent needs to know which files to report on. If you use cre you will need to deploy the plugin/configuration yourself to the agent. There is an example configfile to start of with for writing the required config.

Regards Marius