0

Is there a possibility to run checks on all files in a directory with monit, Without mention every file in this directory by itself?

For example:

/etc/configurations-to-monitor/

config1

config2

config3

By now I use this in /etc/monit/conf.d/myconfigs:

check directory myconfigs path /etc/configurations-to-monitor/

if changed timestamp then alert

But there are some bypass possibilities to this construct. So I would like, to run timestamp and checksum-checks on this directory. The goal is to add more configurations to this directory, without touching the monit configuration again.

Thanks in advance

xshadow
  • 81
  • 3

2 Answers2

2

The solution for all missing features in monit is creating a script which will do the job and monit will just check its return code.

rindeal
  • 993
  • 11
  • 16
1

From monit-general@nongnu.org on 19.11.2014

  Hello, using pattern for multiple files monitoring is not supported currently.
  We plan to add this feature.
xshadow
  • 81
  • 3