Cannot add M/Monit as daemon

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot add M/Monit as daemon

Sorin Srbu
Hello all,

I'm trying to get M/Monit to automatically start at boot on a CentOS
6.9-server.
Assuming this is easiest done by demonizing M/Monit I tried and got the
below messages.

root@mach001 /etc/init.d/ [0]# chkconfig mmonit_init on
service mmonit_init does not support chkconfig

root@mach001 /etc/init.d/ [0]# service mmonit_init restart
Restarting mmonit: mmonitcat: /var/run/mmonit.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or
kill -l [sigspec]

 not running.
root@mach001 /etc/init.d/ [0]#

root@mach001 /var/run/ [0]# whereis mmonit.pid
mmonit: /usr/local/mmonit
root@mach001 /var/run/ [0]#

root@mach001 /usr/local/mmonit/ [0]# ls -al
total 16
drwxr-xr-x   4 root root 4096 Apr 19 07:31 ./
drwxr-xr-x. 13 root root 4096 Apr 19 07:29 ../
drwxr-xr-x  10 root root 4096 Apr 19 07:29 mmonit-3.7.0/
drwxr-xr-x  10 root root 4096 Apr 18 23:07 mmonit-3.7.1/
root@mach001 /usr/local/mmonit/ [0]#

I don't get this...

Now, the weird thing is that M/Monit _is_ running.
I just can't control it via the OS's own daemon system.

Is there any recommended practice to have M/Monit autostart on boot?

Thanks.

--
BW,
        Sorin
-----------------------------------------------------------
# Sorin Srbu, Sysadmin
# Uppsala University
# Dept of Medicinal Chemistry
# Div of Org Pharm Chem
# Box 574
# SE-75123 Uppsala
# Sweden
#
# Phone: +46 (0)18-4714482
# Visit: BMC, Husargatan 3, D5:512b
# Web: http://www.orgfarm.uu.se
-----------------------------------------------------------
# O<  ASCII ribbon campaign - Against html E-mail
# http://tinyurl.com/ascii-ribbon-campaign
#
# This message was not sent from an iProduct!
#
# Please consider the environment before printing this email.
# Join the campaign at http://thinkBeforePrinting.org
#
# MotD follows:
People are always available for work in the past tense.


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

smime.p7s (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cannot add M/Monit as daemon

martinp@tildeslash.com
Hello Sorin,

you can find recipes for automatic M/Monit startup here: https://mmonit.com/wiki/MMonit/Setup#autolaunch.

The easiest way is to register M/Monit as a service in Monit - it will also make M/Monit process visible in its own Reports.

Best regards,
Martin


On 27 Jun 2017, at 10:04, Sorin Srbu <[hidden email]> wrote:

Hello all,

I'm trying to get M/Monit to automatically start at boot on a CentOS
6.9-server.
Assuming this is easiest done by demonizing M/Monit I tried and got the
below messages.

root@mach001 /etc/init.d/ [0]# chkconfig mmonit_init on
service mmonit_init does not support chkconfig

root@mach001 /etc/init.d/ [0]# service mmonit_init restart
Restarting mmonit: mmonitcat: /var/run/mmonit.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or
kill -l [sigspec]

not running.
root@mach001 /etc/init.d/ [0]#

root@mach001 /var/run/ [0]# whereis mmonit.pid
mmonit: /usr/local/mmonit
root@mach001 /var/run/ [0]#

root@mach001 /usr/local/mmonit/ [0]# ls -al
total 16
drwxr-xr-x   4 root root 4096 Apr 19 07:31 ./
drwxr-xr-x. 13 root root 4096 Apr 19 07:29 ../
drwxr-xr-x  10 root root 4096 Apr 19 07:29 mmonit-3.7.0/
drwxr-xr-x  10 root root 4096 Apr 18 23:07 mmonit-3.7.1/
root@mach001 /usr/local/mmonit/ [0]#

I don't get this...

Now, the weird thing is that M/Monit _is_ running.
I just can't control it via the OS's own daemon system.

Is there any recommended practice to have M/Monit autostart on boot?

Thanks.

--
BW,
Sorin
-----------------------------------------------------------
# Sorin Srbu, Sysadmin
# Uppsala University
# Dept of Medicinal Chemistry
# Div of Org Pharm Chem
# Box 574
# SE-75123 Uppsala
# Sweden
#
# Phone: +46 (0)18-4714482
# Visit: BMC, Husargatan 3, D5:512b
# Web: http://www.orgfarm.uu.se
-----------------------------------------------------------
# O<  ASCII ribbon campaign - Against html E-mail
# http://tinyurl.com/ascii-ribbon-campaign
#
# This message was not sent from an iProduct!
#
# Please consider the environment before printing this email.
# Join the campaign at http://thinkBeforePrinting.org
#
# MotD follows:
People are always available for work in the past tense.

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

RE: Cannot add M/Monit as daemon

Sorin Srbu
> -----Original Message-----

> From: monit-general [mailto:monit-general-
> bounces+sorin.srbu=[hidden email]] On Behalf Of
> [hidden email]
> Sent: den 28 juni 2017 11:46
> To: This is the general mailing list for monit <[hidden email]>
> Subject: Re: Cannot add M/Monit as daemon
>
> Hello Sorin,
>
> you can find recipes for automatic M/Monit startup here:
> https://mmonit.com/wiki/MMonit/Setup#autolaunch.
>
> The easiest way is to register M/Monit as a service in Monit - it will
also make
> M/Monit process visible in its own Reports.
>
>
> On 27 Jun 2017, at 10:04, Sorin Srbu <[hidden email]
> <mailto:[hidden email]> > wrote:
>
> I'm trying to get M/Monit to automatically start at boot on a CentOS
6.9-server.


Hello!

That would be done only on the M/Monit server holding web-gui, right?

--
//Sorin


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

smime.p7s (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cannot add M/Monit as daemon

martinp@tildeslash.com
Yes.

If you need to automatically start Monit (the host agent), you can find the configuration here: https://mmonit.com/wiki/Monit/Starting

Best regards,
Martin


> On 28 Jun 2017, at 12:19, Sorin Srbu <[hidden email]> wrote:
>
>> -----Original Message-----
>> From: monit-general [mailto:monit-general-
>> bounces+sorin.srbu=[hidden email]] On Behalf Of
>> [hidden email]
>> Sent: den 28 juni 2017 11:46
>> To: This is the general mailing list for monit <[hidden email]>
>> Subject: Re: Cannot add M/Monit as daemon
>>
>> Hello Sorin,
>>
>> you can find recipes for automatic M/Monit startup here:
>> https://mmonit.com/wiki/MMonit/Setup#autolaunch.
>>
>> The easiest way is to register M/Monit as a service in Monit - it will
> also make
>> M/Monit process visible in its own Reports.
>>
>>
>> On 27 Jun 2017, at 10:04, Sorin Srbu <[hidden email]
>> <mailto:[hidden email]> > wrote:
>>
>> I'm trying to get M/Monit to automatically start at boot on a CentOS
> 6.9-server.
>
>
> Hello!
>
> That would be done only on the M/Monit server holding web-gui, right?
>
> --
> //Sorin
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

RE: Cannot add M/Monit as daemon

Sorin Srbu
> -----Original Message-----

> From: monit-general [mailto:monit-general-
> bounces+sorin.srbu=[hidden email]] On Behalf Of
> [hidden email]
> Sent: den 28 juni 2017 17:03
> To: This is the general mailing list for monit <[hidden email]>
> Subject: Re: Cannot add M/Monit as daemon
>
> Yes.
>
> If you need to automatically start Monit (the host agent), you can find
the

> configuration here: https://mmonit.com/wiki/Monit/Starting
>
> Best regards,
> Martin
>
>
> > On 28 Jun 2017, at 12:19, Sorin Srbu <[hidden email]> wrote:
> >
> >> -----Original Message-----
> >> From: monit-general [mailto:monit-general-
> >> bounces+sorin.srbu=[hidden email]] On Behalf Of
> >> [hidden email]
> >> Sent: den 28 juni 2017 11:46
> >> To: This is the general mailing list for monit
<[hidden email]>

> >> Subject: Re: Cannot add M/Monit as daemon
> >>
> >> Hello Sorin,
> >>
> >> you can find recipes for automatic M/Monit startup here:
> >> https://mmonit.com/wiki/MMonit/Setup#autolaunch.
> >>
> >> The easiest way is to register M/Monit as a service in Monit - it will
> > also make
> >> M/Monit process visible in its own Reports.
> >>
> >>
> >> On 27 Jun 2017, at 10:04, Sorin Srbu <[hidden email]
> >> <mailto:[hidden email]> > wrote:
> >>
> >> I'm trying to get M/Monit to automatically start at boot on a CentOS
6.9-server.
> >
> >
> > Hello!
> >
> > That would be done only on the M/Monit server holding web-gui, right?

Thanks Martin, I'll give it a go!


--
//Sorin

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

smime.p7s (8K) Download Attachment