Adjust mk_filestat rules to disregard one filetype in the same monitored folder

Hello,

i am using the mk_filestats plugin to monitor a file-import process:

After succesful import, the importer is supposed to convert mp3 file to mp3.ok, after not longer than 10 mins.

Like this: song.mp3 ->10 mins later. song.mp3.ok

mp3 file imported and converted.

here is the current regex pattertn that i am using:
“Filtern Sie Dateien, welche mit dem regulären Ausdruck übereinstimmen.”

.*\.mp3$

The service rule should only alert when the mp3 stays untouched for longer than 10 mins.

Anyone got an idea how to tune this in the right way ?

Best regards, Norman

You can use Service Rules to set limits for the oldest file. “Maximal age of oldest file” larger then 10 minutes should fulfill your demand and set service to critical if there is any *.mp3 which is older than 10min.

Hello,

thanks for your quick reply !

So we actually use a Linux host and file mounts to monitor SMBs on a central location.

There is another service rule applying to the host and it overwrites the second one, which i was trying to apply only to the file groups.

So the solution could be to apply every service rule to the particular file group ?

Thanks again and cheers !

Norman

Hi there,

I was able to fix it !

so the service rules and mk_filestats plugin were configured correctly, but the rules didn’t apply to the specific filegroups.

I fixed it with appliying each particular rule to the particular file group, and not to the entire host anymore.

Another surprise: at the first discovery run, the agent communication timed out.

Why ?

I saw over 1 Million files in one of the mounted cifs. :slight_smile:

The agent communication times out when gathering host data takes too long, so I excluded this file group.

You should always keep the rules as precise as possible to prevent them from overwriting each other.

A usual situation on data graveyards (aka fileserver) :grinning_face_with_smiling_eyes: