[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alert if file contents are greater than 40
From: |
Dimitri Yioulos |
Subject: |
Re: Alert if file contents are greater than 40 |
Date: |
Fri, 11 Jan 2013 13:03:23 -0500 |
User-agent: |
KMail/1.9.9 |
On Friday 11 January 2013 11:32:23 am Jenny Hopkins wrote:
> On 11 January 2013 12:35, Michael Johnson - MJ
<address@hidden> wrote:
> > I think you are trying to accomplish something that
> > monit simply was not intended to do, that being said,
> > here is a work around that will absolutely work given
> > the documentation
> >
> > * Modify your script slightly to to initially write out
> > the new data into /path/to/file.new
> >
> > * Once the file is written, have your script move the
> > file to /path/to/file (the intended location.
> >
> > This will have the side effect of ensuring the inode is
> > updated each time new data is available and thus monit
> > will reread the file. Additionally, this also will
> > ensure that the full contents of the file are in place
> > before monit reads the file because a move is an atomic
> > operation. This may not be of concern to you nor
> > terribly important for this particular task, but it is
> > worth noting as it can be very important.
> >
> > Long term I would suggest you look at handlng this
> > differently. For short term, this will get you going
> > and if you decide to keep it around, you may want to
> > revisit the methodology in the future.
>
> Hooray! Creating a new inode each time has worked.
> As Dimitri said in the first place, it would have been a
> lot simpler to write it in to the bash script. The
> benefits of having it done by monit, however, are 1) I
> have a tendency to ignore sysadmin emails and not notice
> the alert, but I do usually have the monit web page open,
> and 2) the script can be called for different
> users/programs/max-mem-usage from monit just by editing
> monitrc.
>
> Sorry to bother you all trying to get monit to do
> un-monity things, and thanks for the help!
>
> Jenny
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
Hey, in the end, it's all about finding a solution. So,
good on ya!
Dimitri
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
- Re: Alert if file contents are greater than 40, (continued)
- Re: Alert if file contents are greater than 40, Dimitri Yioulos, 2013/01/10
- Re: Alert if file contents are greater than 40, Callum Macdonald, 2013/01/10
- Re: Alert if file contents are greater than 40, Jenny Hopkins, 2013/01/11
- Re: Alert if file contents are greater than 40, Callum Macdonald, 2013/01/11
- Re: Alert if file contents are greater than 40, Jenny Hopkins, 2013/01/11
- Re: Alert if file contents are greater than 40, Callum Macdonald, 2013/01/11
- Re: Alert if file contents are greater than 40, Jenny Hopkins, 2013/01/11
- Re: Alert if file contents are greater than 40, Prajwal Manjunath, 2013/01/11
- Re: Alert if file contents are greater than 40, Michael Johnson - MJ, 2013/01/11
- Re: Alert if file contents are greater than 40, Jenny Hopkins, 2013/01/11
- Re: Alert if file contents are greater than 40,
Dimitri Yioulos <=
Re: Alert if file contents are greater than 40, Jenny Hopkins, 2013/01/11