LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-14-2012, 07:23 AM   #1
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Rep: Reputation: Disabled
Upstart not working for Centos


Dear All,
I am using monit. So then I set upstart script based on this link http://mmonit.com/wiki/Monit/Upstart. There after I simulate the monit quit and thereafter I dont see it is being spawn again to run as normal. What could be the problem?
 
Old 05-15-2012, 01:24 AM   #2
es0teric
Member
 
Registered: Apr 2007
Distribution: Ubuntu
Posts: 105

Rep: Reputation: 19
How are you stopping monit, exactly? Would be interesting to see if it respawns in response to certain types or shutdowns but not others (e.g. kill -9 vs service stop)
 
Old 05-15-2012, 01:33 AM   #3
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Eosteric,
I did a start with /etc/init.d/monit start. I killed it monit quit. So what is your opinion about this? Thank you.
 
Old 05-20-2012, 09:44 AM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Which version of CentOS - arenít they using systemd now?
 
Old 05-20-2012, 09:45 AM   #5
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Reuti,
I am using centos 6.2 final.

Last edited by newbie14; 05-20-2012 at 09:49 AM.
 
Old 05-27-2012, 08:11 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by newbie14 View Post
I set upstart script
monit-5.2-1.el6.rf (the Monit RPM from Repoforge for Centos6) provides /etc/rc.d/init.d/monit. That is the SysV init script to use and nothing else.
 
Old 05-27-2012, 08:32 AM   #7
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear unSpawn,
I am taking from the EPEL repo now is it the same resource? Please confirm. But if you look through the monit details it method of starting does now ensure it will re-spawn if anything goes down?
 
Old 05-27-2012, 08:48 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by newbie14 View Post
I am taking from the EPEL repo now is it the same resource? Please confirm.
I don't know. Show the version with 'rpm -q monit'?


Quote:
Originally Posted by newbie14 View Post
But if you look through the monit details it method of starting does now ensure it will re-spawn if anything goes down?
Running 'rpm -ql monit' should show a similar init script. Provided Centos6 doesn't use 'systemd' you can check if Monit is set to run in the default runlevel with 'chkconfig --list monit'.
 
Old 05-27-2012, 10:51 AM   #9
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
There is no "upstart" (thats Ubuntu) nor "systemd" (newer distro's). You should just start in worst case using /usr/bin/monit or /usr/sbin/monit or something like that. Anyway if you have some default installation using an rpm package the init script is in /etc/init.d/monit

/etc/init.d/monit {start|stop|status}

NOTE: systemd is not upstart nor vice-versa. In CentOS you wont find any of this two, CentOS is Redhat clone which is the old fashion way.
 
Old 05-27-2012, 10:55 AM   #10
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Robert,
What is your opinion about this link on monit upstar http://mmonit.com/wiki/Monit/Upstart?
 
Old 05-27-2012, 11:02 AM   #11
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Yes, thats for Ubuntu based systems. It doesn't mean you should use it or follow it.
 
Old 05-27-2012, 11:10 AM   #12
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Robert,
So upstart is just a feature with ubuntu is it not with centos is it? So my problem now monit being a tool to monitor what if the tool it self goes down is there any possibility to re-spawn it automatically?
 
Old 05-27-2012, 11:22 AM   #13
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Well, you can always create a script which check's if monit works and put it in crontab or you can always put it in /etc/inittab, but I wouldn't advise that.
 
Old 05-27-2012, 11:24 AM   #14
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Robert,
So what is your best advice to go with crontab is it? The /etc/inittab wont function just like /etc/init is it?
 
Old 05-27-2012, 11:29 AM   #15
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
My advice would be to leave it alone, start monit and should be fine. There is not a lot of reason for which you should make sure monit doesn't die. I'm using monit for more then 4 years and it never died on me, but if you will think you wanna check if monit run, then a simple script added to crontab should do the trick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Overview of Upstart LXer Syndicated Linux News 0 12-01-2011 02:20 PM
[SOLVED] rsyslog upstart script not working as expected grail Ubuntu 3 03-23-2011 07:47 PM
Am I running Upstart? zigmo Ubuntu 1 09-17-2010 09:14 PM
Upstart vs SysVinit - which is better? BobNutfield Slackware 10 08-30-2010 05:37 PM
[SOLVED] upstart jobs newk Linux - Newbie 4 09-30-2009 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration