Hi

So the issue was due to monit running on the host and also on the container
which is running on the same host.

On the host, we run monit as /usr/bin/monit -c /etc/monit/monitrc and also
on the container (we run as root) we start monit (/usr/bin/monit -c
/etc/monit/monitrc), whenever monit starts on the container it was starting
on the host also.

Temp solution was to stop using monit inside the container.


On Wed, Jul 15, 2020 at 5:21 AM <[email protected]> wrote:

> Send monit-general mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.nongnu.org/mailman/listinfo/monit-general
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of monit-general digest..."
>
>
> Today's Topics:
>
>    1. Re: Duplicate Monit Process (Abhishek Patti)
>    2. Re: Duplicate Monit Proces (Abhishek Patti)
>    3. Re: Duplicate Monit Proces (Bernd Petrovitsch)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 14 Jul 2020 15:30:58 -0700
> From: Abhishek Patti <[email protected]>
> To: [email protected]
> Subject: Re: Duplicate Monit Process
> Message-ID:
>         <CAH=o+=0fLS1T=
> [email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> Hi
>
> Here is my configuration
>
> init.d
>
> #!/bin/sh
>
> ### BEGIN INIT INFO
> # Provides:          monit
> # Required-Start:    $remote_fs
> # Required-Stop:     $remote_fs
> # Should-Start:      $all
> # Should-Stop:       $all
> # Default-Start:     2 3 4 5
> # Default-Stop:      0 1 6
> # Short-Description: service and resource monitoring daemon
> # Description:       monit is a utility for managing and monitoring
> #                    processes, programs, files, directories and
> filesystems
> #                    on a Unix system. Monit conducts automatic maintenance
> #                    and repair and can execute meaningful causal actions
> #                    in error situations.
> ### END INIT INFO
>
> set -e
>
> . /lib/lsb/init-functions
>
> DAEMON=/usr/bin/monit
> CONFIG=/etc/monit/monitrc
> NAME=monit
> DESC="daemon monitor"
> MONIT_OPTS=
> PID="/run/$NAME.pid"
>
> # Check if DAEMON binary exist
> [ -f $DAEMON ] || exit 0
>
> [ -f "/etc/default/$NAME" ] && . /etc/default/$NAME
>
> MONIT_OPTS="-c $CONFIG $MONIT_OPTS"
>
> monit_not_configured () {
>   if [ "$1" != "stop" ]
>   then
>     printf "\tplease configure $NAME and then edit /etc/default/$NAME\n"
>     printf "\tand set the \"START\" variable to \"yes\" in order to
> allow\n"
>     printf "\t$NAME to start\n"
>   fi
>   exit 0
> }
>
> monit_checks () {
>   # Check if START variable is set to "yes", if not we exit.
>   if [ "$START" != "yes" ]
>   then
>     monit_not_configured $1
>   fi
> }
>
> case "$1" in
>   start)
>     log_daemon_msg "Starting $DESC" "$NAME"
>     monit_checks $1
>     if start-stop-daemon --start --quiet --oknodo --pidfile $PID --exec
> $DAEMON -- $MONIT_OPTS 1>/dev/null
>     then
>       log_end_msg 0
>     else
>       log_end_msg 1
>     fi
>     ;;
>   stop)
>     log_daemon_msg "Stopping $DESC" "$NAME"
>     if start-stop-daemon --retry TERM/5/KILL/5 --oknodo --stop --quiet
> --pidfile $PID 1>/dev/null
>     then
>       log_end_msg 0
>     else
>       log_end_msg 1
>     fi
>     ;;
>   reload)
>     log_daemon_msg "Reloading $DESC configuration" "$NAME"
>     if start-stop-daemon --stop --signal HUP --quiet --oknodo --pidfile
> $PID --exec $DAEMON -- $MONIT_OPTS 1>/dev/null
>     then
>       log_end_msg 0
>     else
>       log_end_msg 1
> fi
>     ;;
>   restart|force-reload)
>     log_daemon_msg "Restarting $DESC" "$NAME"
>     start-stop-daemon --retry TERM/5/KILL/5 --oknodo --stop --quiet
> --pidfile $PID 1>/dev/null
>     if start-stop-daemon --start --quiet --oknodo --pidfile $PID --exec
> $DAEMON -- $MONIT_OPTS 1>/dev/null
>     then
>       log_end_msg 0
>     else
>       log_end_msg 1
>     fi
>     ;;
>   syntax)
>     $DAEMON $MONIT_OPTS -t
>     ;;
>   status)
>     status_of_proc -p $PID $DAEMON $NAME
>     ;;
>   *)
>     log_action_msg "Usage: /etc/init.d/$NAME
> {start|stop|reload|restart|force-reload|syntax|status}"
>     ;;
> esac
>
> exit 0
>
>
>
>
> On Tue, Jul 14, 2020 at 9:01 AM <[email protected]> wrote:
>
> > Send monit-general mailing list submissions to
> >         [email protected]
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >         https://lists.nongnu.org/mailman/listinfo/monit-general
> > or, via email, send a message with subject or body 'help' to
> >         [email protected]
> >
> > You can reach the person managing the list at
> >         [email protected]
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of monit-general digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Duplicate Monit Process (Abhishek Patti)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 13 Jul 2020 15:56:11 -0700
> > From: Abhishek Patti <[email protected]>
> > To: [email protected]
> > Subject: Duplicate Monit Process
> > Message-ID:
> >         <CAH=o+=
> > [email protected]>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi everyone
> >
> > I have noticed that whenever system experiences high load, we see two
> monit
> > process
> >
> > root     12303     1  0 Jun03 ?        00:19:14 /usr/bin/monit -c
> > /etc/monit/monitrc
> > root     23446 22694  0 21:40 pts/0    00:00:00 grep monit
> > root     31792 31493  0 21:22 ?        00:00:00 /usr/bin/monit -c
> > /etc/monit/monitrc
> >
> > Once the load reduces on the machine, it goes back to a single process.
> >
> > The version of monit is This is Monit version 5.25.1
> >
> >
> > Thank You
> >
> > Abhi
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> >
> https://lists.nongnu.org/archive/html/monit-general/attachments/20200713/a613c3fe/attachment.html
> > >
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > monit-general mailing list
> > [email protected]
> > https://lists.nongnu.org/mailman/listinfo/monit-general
> >
> >
> > ------------------------------
> >
> > End of monit-general Digest, Vol 207, Issue 5
> > *********************************************
> >
>
>
> --
> abhishek
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.nongnu.org/archive/html/monit-general/attachments/20200714/9061b9e9/attachment.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 15 Jul 2020 03:11:10 -0700
> From: Abhishek Patti <[email protected]>
> To: [email protected]
> Subject: Re: Duplicate Monit Proces
> Message-ID:
>         <CAH=o+=
> [email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> Hi
>
> Was able to resolve the issue. Thank you
>
> On Tue, Jul 14, 2020 at 9:01 AM <[email protected]> wrote:
>
> > Send monit-general mailing list submissions to
> >         [email protected]
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >         https://lists.nongnu.org/mailman/listinfo/monit-general
> > or, via email, send a message with subject or body 'help' to
> >         [email protected]
> >
> > You can reach the person managing the list at
> >         [email protected]
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of monit-general digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Duplicate Monit Process (Abhishek Patti)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 13 Jul 2020 15:56:11 -0700
> > From: Abhishek Patti <[email protected]>
> > To: [email protected]
> > Subject: Duplicate Monit Process
> > Message-ID:
> >         <CAH=o+=
> > [email protected]>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi everyone
> >
> > I have noticed that whenever system experiences high load, we see two
> monit
> > process
> >
> > root     12303     1  0 Jun03 ?        00:19:14 /usr/bin/monit -c
> > /etc/monit/monitrc
> > root     23446 22694  0 21:40 pts/0    00:00:00 grep monit
> > root     31792 31493  0 21:22 ?        00:00:00 /usr/bin/monit -c
> > /etc/monit/monitrc
> >
> > Once the load reduces on the machine, it goes back to a single process.
> >
> > The version of monit is This is Monit version 5.25.1
> >
> >
> > Thank You
> >
> > Abhi
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <
> >
> https://lists.nongnu.org/archive/html/monit-general/attachments/20200713/a613c3fe/attachment.html
> > >
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > monit-general mailing list
> > [email protected]
> > https://lists.nongnu.org/mailman/listinfo/monit-general
> >
> >
> > ------------------------------
> >
> > End of monit-general Digest, Vol 207, Issue 5
> > *********************************************
> >
>
>
> --
> abhishek
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.nongnu.org/archive/html/monit-general/attachments/20200715/3b883a16/attachment.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Wed, 15 Jul 2020 12:21:07 +0000
> From: Bernd Petrovitsch <[email protected]>
> To: [email protected]
> Subject: Re: Duplicate Monit Proces
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> Hi all!
>
> On 15/07/2020 10:11, Abhishek Patti wrote:
> [...]
> > Was able to resolve the issue. Thank you
>
> And the solution was?
>
> MfG,
>         Bernd
> --
> There is no cloud, just other people computers.
> -- https://static.fsf.org/nosvn/stickers/thereisnocloud.svg
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: pEpkey.asc
> Type: application/pgp-keys
> Size: 3110 bytes
> Desc: not available
> URL: <
> https://lists.nongnu.org/archive/html/monit-general/attachments/20200715/d1f9b8cf/attachment.key
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> monit-general mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> ------------------------------
>
> End of monit-general Digest, Vol 207, Issue 6
> *********************************************
>


-- 
abhishek

Reply via email to