monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monit NFS share


From: Lutz Mader
Subject: Re: Monit NFS share
Date: Tue, 17 Sep 2019 23:50:53 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello Josu,
are you using Monit 5.25 or 5.26 (use "monit -V" to check this)?

You are right, the filesystem check doesn't support "does not exist",
but check directory does.

> check filesystem tvdata with path /mnt/tvdata
>   if not exist then exec "/bin/mount -a"

Based on you snipped, the directory check should do the job.

check directory tvdata path "/mnt/tvdata"
  start program "/bin/mount -a"
  if not exist then start

A suggestion only,
Lutz

p.s.
I use dependencies to prevent endless recovery.

check host Nfs_Host with address your.host
# Prevent status "Online with all services" immediate after startup.
  every 5 cycles
  if failed port 2049 with timeout 30 seconds for 10 cycles then alert
#
check directory tvdata path /mnt/tvdata
  start program "/bin/mount -a"
  if not exist then start
  depends on Nfs_Host

As long as the address "your.host" port "2049" (the nfsd port) is not
available, the directory check hung in state "Initializing" or
"Connection Failed" and the directory check will not start the mount
command.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]