Check number and age of files in folder


Hi all

My check_mk skills are not the best, excuse me if I ask dumb questions. Some stuff seems a little overcomplicated to me as a new user.

I use check_mk Enterprise 1.2.8p26 over WATO.

I have 20-50 Windows Servers (2008, 2012r2) where I should check if there are any files in Error folders and if there are files in transfer folders older than 10min (stuck in there, not beeing transfered).

For the Error Folder:
I created a file grouping pattern like this:
Name of Group: group_A D:\bla\blabla*.*
Name of Group: group_B D:\bla\blabla\Error*.*

Explicit hosts…
Specify explicit host names hostname1

No more settings made in here.

I created a file Size, age and count of file groups like this
Maximal file count 0 , 0

Explicit hosts…
Specify explicit host names x

File Group Name…
Specify explicit values x

The check is not beeing applied to the server, it does not show up.

What am I missing?


(Philipp Näther) #2

Did you add the fileinfo patterns in the check_mk.ini on the hosts?


hi @cmk_usr
there are no dump questions :slight_smile: we are all here to help each other.

check this link: Help with WATO and file count fileinfo.groups

path = C:\inetpub\mailroot\Badmail*.eml



The entries for my checks are missing, there is one entry done by the person who used to manage check_mk before.
Do I need to add all fileinfo patterns by hand to the check_mk.ini by hand? Can I do this with WATO?
I have 20-50 Servers with 6 checks. This will take me forever to add.

(Philipp Näther) #5

You are using the enterprise edition. In the EE there is the so called “agent bakery”. There you can “bake” your host agents with all the plugins and configs via WATO. I won’t give support for EE features tho. But I guess the docs will be sufficient for you:


Back to the process of implementing this task by hand. Do I have to add this by hand in the ini file and in WATO?

I know the Agent Bakery but I have no knowlegdge to use it. I will see in the manual.

(Philipp Näther) #7

If you want to deploy it manually you have to add the fileinfo patterns to every check_mk.ini of your hosts by hand, yes. But you might not need a rule for every single host in WATO. Hosts that check the same files and should get the same filegroups aswell as the same parameters (levels) are using the same rule.


Thank you a lot!

I used the agent Bakery to bake a new Agent with the settings and it worked. Im not 100% sure if it was nesecary to reinstall the agent on the server with the freshly baked agent or if the settings went into the ini file only by baking a new agent.

And yes, other hosts seem to get the same filegroups.

Now all the checks apeared and work just fine.

Btw. until now somebody checked this by hand (horror job).


All my older checks are working just fine, but I am unable to get new file checks on new servers to work.
What is the correct way to implement new file check. Im sure I am missing something.

  1. Hosts & Service Parameter => File Grouping Pattern => Create new pattern
  2. Hosts & Service Parameter => Count, size and age of files (Linux, Windows) => Add new roule
  3. Manual Checks => Size, age and count of file Groups => Add roule refering to file group
  4. Save all changes and apply
  5. Monitoring Agents => Bake Agents

What am I missing? Am I doing unnecessary work?

The check Shows up under the server, but ist output is not correct (“Output of check plugin OK - age_oldest is 0 sec, age_newest is 0 sec, count is 0, size is 0 B”). There are files in de directory.

(Philipp Näther) #10

For the New Servers you need of course the fileinfo entries to let the agent know which files to include.


The check_mk Service has to be restarted on the server to read the new FileInfo entries in the ini. I push the entries to the servers with the Agent Bakery. Now the checks seem to work fine.

If you bake the Agents the entries go into the ini file imediatly. Its a really nice feature.