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:

D:\FTP_DATA\CustomerA\in
D:\FTP_DATA\CustomerA\out
D:\FTP_DATA\CustomerB\in
D:\FTP_DATA\CustomerB\out
D:\FTP_DATA\CustomerC\in
D:\FTP_DATA\CustomerC\out

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?

Hi,

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.

BR
Anastasios

2 Likes