monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Monitor mounts with monit


From: Roman
Subject: Re: [monit] Monitor mounts with monit
Date: Fri, 31 Jul 2009 12:48:57 +0300

Hi Martin,

Thank you for your reply, yes this was the problem, I have monit v4.
And how do I add the statement to start the device if it was unmounted
accidentally?
Right now I have the following statements in my config file:

check device HardExtern with path /dev/sdd1
    start = "/bin/mount /dev/sdd1 /backup"
    stop = "/bin/umount /dev/sdd1"
    if space usage > 95% then alert
    if space usage > 98% then stop
    if inode usage > 90% then alert
    if inode usage > 98% then stop
    alert address@hidden

This statement will mount the hard drive if it is unmounted?

Thank you.

2009/7/30 Martin Pala <address@hidden>:
> Hello,
>
> which Monit version do you use and can you show the configuration?
>
> The "check filesystem ..." test was added in Monit-5.0 (we have renamed
> "check device" to "check filesystem" since word "device"  was confusing).
> Monit-5.0 supports "check device" as alias for "check filesystem" for
> backward compatibility.
>
> If you use Monit < 5.0, you should use "check device".
>
> Martin
>
>
> On Jul 30, 2009, at 4:02 PM, Roman wrote:
>
>> Hello Andrew,
>> Thank you for reply, so the configuration I need has to look like this:
>>
>> check file usbextern with path /media/usb/UnMounted
>>  start = "/bin/mount /dev/sdd1"
>>  stop = "/bin/umount /des/sdd1"
>>  alert address@hidden
>>
>> ?
>>
>> But what do you say about "check filesystem" statement? It does not
>> work, it recognize it like "check file system" so it checks the file
>> system which is not correct.
>>
>> 2009/7/30 Andrew Holt <address@hidden>:
>>>
>>> Hi,
>>>
>>> A simple is this.  Lets say you have two mount points /media/nfs &
>>> /media/usb
>>>
>>> Before you mount the device create an empty file at the mount point (I
>>> useually use UnMounted).
>>>
>>> The test for unmounted is if file /media/nfs/UnMounted exists.
>>>
>>> It's lighter than using mount and grep|sed|awk|perl
>>>
>>> HTH,
>>> Andrew
>>>
>>> On 30 Jul 2009, at 13:47, Roman wrote:
>>>
>>>> Hello,
>>>>
>>>> I have a nfs mount and also an external USB hard drive, both of this
>>>> resources are mounted. Sometimes it unmounts for I don't know what
>>>> reason. How can I check with monit if it is mounted or not, and then
>>>> take an action?
>>>>
>>>> I have tried with check filesystem, but monit gives me an error, it
>>>> recognizes the check file statement and considers "system" as a file
>>>> name, which is very incorrect, it may be a bug.
>>>> Can someone help me please?
>>>>
>>>> Thank you.
>>>>
>>>>
>>>> --
>>>> To unsubscribe:
>>>> http://lists.nongnu.org/mailman/listinfo/monit-general
>>>>
>>>
>>> =============================
>>> Andrew Holt
>>> Managing Director
>>> 4A Solutions Ltd
>>>
>>> M: +44(0) 7841 340608
>>> P: +44(0)1257 268351
>>>
>>> Email: address@hidden
>>>
>>> De Omnibus Dubitandum
>>> =============================
>>>
>>>
>>>
>>>
>>>
>>> --
>>> To unsubscribe:
>>> http://lists.nongnu.org/mailman/listinfo/monit-general
>>>
>>
>>
>>
>> --
>> --
>> regards, mit freundlichen Grüßen, cu stima,
>> Roman Doroschevici
>>
>> System Administrator
>> ______________________________
>>
>> epoint -  the technology partner
>>
>> Vacarescu 7
>> 300182 Timisoara
>> Romania
>>
>> email: address@hidden
>> skype: roman.doroschevici
>> mobile: +40 / 745/ 560 332
>> fax: +40 / 256 / 407 147
>> www.epoint.ro
>>
>> "reliable solutions. delivered."
>>
>> This message and any attached files are confidential and intended
>> solely for the addressee(s). Any publication, transmission or other
>> use of the information by a person or entity other than the intended
>> addressee is prohibited. If you receive this in error please contact
>> the sender and delete the material. The sender does not accept
>> liability for any errors or omissions as a result of the transmission.
>>
>>
>> --
>> To unsubscribe:
>> http://lists.nongnu.org/mailman/listinfo/monit-general
>
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
>



-- 
--
regards, mit freundlichen Grüßen, cu stima,
Roman Doroschevici

System Administrator
______________________________

epoint -  the technology partner

Vacarescu 7
300182 Timisoara
Romania

email: address@hidden
skype: roman.doroschevici
mobile: +40 / 745/ 560 332
fax: +40 / 256 / 407 147
www.epoint.ro

"reliable solutions. delivered."

This message and any attached files are confidential and intended
solely for the addressee(s). Any publication, transmission or other
use of the information by a person or entity other than the intended
addressee is prohibited. If you receive this in error please contact
the sender and delete the material. The sender does not accept
liability for any errors or omissions as a result of the transmission.




reply via email to

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