monit-general
[Top][All Lists]
Advanced

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

Re: daemon poll interval - monit 5.14 on CentOS 6


From: Geoff Goas
Subject: Re: daemon poll interval - monit 5.14 on CentOS 6
Date: Fri, 5 Aug 2016 11:43:23 -0400

Hello,

Thanks for the suggestions. In RHEL/CentOS 5 and 6, the default config
is /etc/monit.conf. User configs are ~/.monit.conf. This is the only
change to the source that is being applied by the package maintainer.

Package listing:

# rpm -ql monit
/etc/logrotate.d/monit
/etc/monit.conf
/etc/monit.d
/etc/monit.d/logging
/etc/rc.d/init.d/monit
/usr/bin/monit
/usr/share/doc/monit-5.14
/usr/share/doc/monit-5.14/COPYING
/usr/share/doc/monit-5.14/README
/usr/share/man/man1/monit.1.gz
/var/log/monit

>From an strace of monit starting up:

getcwd("/etc/monit.d", 4096)            = 13
stat("/root/.monit.conf", 0x7fff87cc7560) = -1 ENOENT (No such file or
directory)
stat("/etc/monit.conf", {st_mode=S_IFREG|0600, st_size=11346, ...}) = 0
open("/etc/monit.conf", O_RDONLY)       = 3
open("/etc/monit.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4

Showing that the set daemon directive is specified only once:

# grep 'set daemon' /etc/monit.conf
#set daemon  30              # check services at 30 seconds intervals

# grep 'set daemon' /etc/monit.d/*
/etc/monit.d/00base.conf:set daemon 50

Here is the monit log showing the 30 second interval even though it is
set to 50:

# grep 'Aborting event' /var/log/monit  | tail -n20
[EDT Aug  4 17:05:06] error    : Aborting event
[EDT Aug  4 17:05:36] error    : Aborting event
[EDT Aug  4 17:06:06] error    : Aborting event
[EDT Aug  4 17:06:37] error    : Aborting event
[EDT Aug  4 17:06:37] error    : Aborting event
[EDT Aug  4 17:07:07] error    : Aborting event
[EDT Aug  4 17:07:07] error    : Aborting event
[EDT Aug  4 22:18:13] error    : Aborting event
[EDT Aug  4 22:18:43] error    : Aborting event
[EDT Aug  4 22:19:13] error    : Aborting event
[EDT Aug  4 22:19:44] error    : Aborting event
[EDT Aug  4 22:20:14] error    : Aborting event
[EDT Aug  4 22:20:44] error    : Aborting event
[EDT Aug  4 22:21:15] error    : Aborting event
[EDT Aug  4 22:21:15] error    : Aborting event
[EDT Aug  4 22:21:45] error    : Aborting event
[EDT Aug  4 22:21:45] error    : Aborting event
[EDT Aug  5 11:19:40] error    : Aborting event
[EDT Aug  5 11:20:10] error    : Aborting event
[EDT Aug  5 11:23:53] error    : Aborting event

This behavior is occurring across multiple CentOS 6 hosts. All of the
CentOS 5 hosts running 4.11 and 5.2 with nearly identical
configurations ("alert...on restart" changed to "alert...on nonexist"
on the monit 5.x instances) do not have this issue.

I'm open to more suggestions but I feel as though I will end up having
to get some more debug out of monit.

Thanks,

On Aug 5, 2016 9:16 AM, "Martin Pala" <address@hidden> wrote:
>
> Monit's default configuration file is /etc/monitrc ... the /etc/monit.conf is 
> not used, unless it was added to the search path by 3rd party (for example 
> package maintainer).
>
> There could be also ".monitrc" file in your home directory ... the default 
> search sequence for monit configuration file:
>
>         ~/.monitrc
>         /etc/monitrc
>         @SYSCONFDIR/monitrc
>         /usr/local/etc/monitrc
>         ./monitrc
>
>
>
>
> > On 05 Aug 2016, at 15:07, Geoff Goas <address@hidden> wrote:
> >
> > I am setting it only in /etc/monit.conf. It is not being set in any other 
> > configuration within /etc/monit.d.
> >
> > On Aug 5, 2016 9:03 AM, "Martin Pala" <address@hidden> wrote:
> > Hello,
> >
> > you have most probably two configuration files - the one which you changed 
> > is different from the file used by monit.
> >
> > Best regards,
> > Martin
> >
> >
> >> On 05 Aug 2016, at 04:42, Geoff Goas <address@hidden> wrote:
> >>
> >> Hello,
> >>
> >> I'm having an issue with the CentOS 6 release of monit 5.14. I have set 
> >> the daemon interval to 5, 10, and 50 seconds - monit was fully restarted 
> >> for each adjustment of the interval - yet it still polls every 30 seconds 
> >> as if the configured value is being ignored. I also attempting passing the 
> >> interval using the -d switch to no avail.
> >>
> >> My testing consisted of having monit attempt to start a service that could 
> >> never possibly start, and without any timeout set. The log shows a 30 
> >> second interval between service checks, and so does an strace of the monit 
> >> process.
> >>
> >> I have monit 5.2 running on CentOS 5.2 with a nearly identical 
> >> configuration. On that host, I have the daemon interval set to 10 seconds, 
> >> and it is polling at that interval just fine.
> >>
> >> Do you have any recommendations on what to check next?
> >>
> >> Thanks,
> >>
> >> --
> >> Geoff Goas
> >> Systems Engineer
> >> --
> >> To unsubscribe:
> >> https://lists.nongnu.org/mailman/listinfo/monit-general
> >
> >
> > --
> > To unsubscribe:
> > https://lists.nongnu.org/mailman/listinfo/monit-general
> > --
> > To unsubscribe:
> > https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general



reply via email to

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