0

I am monitoring witch Check-MK and i know how to get this skript as a service right into Check-MK.

I need just the skript: check the directory size and I want to get an alert if it didnt change after 1,5h

to check the folder size: folder_size=$(du -bs /backup/log |

after the "|" i want to check this with time am I right so far? thx for help <3

  • Do you want to detect changes in the folder size or a modification in the folder? – Fravadona Jul 22 '22 at 10:09
  • @Fravadona i have the directory /backup/log i just want to check like every 10sek if the size changed. if didnt change after 360 rounds (1hour) : "echo xyz" else : check again – r4vnjack Jul 22 '22 at 10:14

1 Answers1

0

You can write a simple local check, that does what you need, if Checkmk's built-in file age checks do not meet your requirement.

Thorian93
  • 252
  • 3
  • 12
  • i know about the local check and that u can add a service with that. But i dont know how to write the skript to check the date of the last ritten file und compare it again after 1h or 1,5 days. – r4vnjack Aug 03 '22 at 14:32