LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Recommendations for reactive monitoring

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2007, 12:45 PM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
Default Recommendations for reactive monitoring

Hey guys,
Just see if there is a recommendation for reactive monitoring. Ive used monit in the past for monitoring Mongrel webservers. Is there a preferred programs that can make sure that litespeed is always happy and healthy?
Reply With Quote
  #2  
Old 08-02-2007, 01:10 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You can use our caccti integration, tutorial is in our wiki.
Reply With Quote
  #3  
Old 08-02-2007, 08:17 PM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
ah yes cacti. Ive been using it for a week now to graph my litespeed servers. but cacti ,correct me if im wrong, does not react, if a litespeed server goes down. Cacti is simply there to graph. Can cacti react if a litespeed server goes down?
Reply With Quote
  #4  
Old 08-02-2007, 08:21 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
LSWS has built-in watch dog process, unless there are hardware problem or mis-configuration, LSWS will never go down.
Reply With Quote
  #5  
Old 08-03-2007, 08:30 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
run "/opt/lsws/bin/lswsctrl reload" five times fast.
Thats crashes my litespeed servers everytime. They do not comeback on their own. I have to manually issue "/opt/lsws/bin/lswsctrl start".
Reply With Quote
  #6  
Old 08-03-2007, 08:45 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
How often do you need to restart LSWS five times in a row within 5 seconds period? Why do you need to do that?
It could be a problem if all rails applications are set to "run on startup", so you got 20 rails frameworks to be initialized at start up.

We probably will add a feature to let user to restart each individual application instead of starting the whole server.
We could do something to make it run smoother.
Reply With Quote
  #7  
Old 08-03-2007, 09:28 AM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
No I dont need to restart lsws 5 times in a row. It was simply a response to "LSWS will never go down."

I will probably use monit to make sure that the web server can recover from things like the above.

Quote:
Originally Posted by mistwang View Post
We probably will add a feature to let user to restart each individual application instead of starting the whole server.
We could do something to make it run smoother.
Thats is great! We need that feature. Right now, anytime a user changes their apps, we have to pragmatically reload each of the webservers so that the users can have their rails app restarted. So far there is a mild performance impact on all of the rails apps.
Reply With Quote
  #8  
Old 08-03-2007, 02:54 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
No I dont need to restart lsws 5 times in a row. It was simply a response to "LSWS will never go down."
There are definitely a few other ways to break things intentionally.
Reply With Quote
  #9  
Old 08-03-2007, 03:12 PM
PSS PSS is offline
Senior Member
 
Join Date: Jun 2007
Posts: 126
I check if memcached is up with this small script I made (I'm not daily bash coder, feel free to improve), I run it every minute with cron. If you do the same for LS main process you can have reasonably good kickstarter in case all LS processes die.

Code:
#!/bin/sh
pid=`ps --user=nobody | grep memcached | awk '{print $1}'` 

if kill -0 $pid 2> /dev/null ; then
    exit 0
else
    echo memcached process not found, restarting...
    /usr/local/bin/memcached -u nobody -d -m 128 -l 127.0.0.3 -p 11211
    sleep 2
    pid=`ps --user=nobody | grep memcached | awk '{print $1}'`
    if kill -0 $pid 2> /dev/null ; then
      echo process $pid ok
    fi
fi
exit 0
Reply With Quote
  #10  
Old 08-03-2007, 07:29 PM
nathanc nathanc is offline
Senior Member
 
Join Date: Jun 2007
Posts: 55
Quote:
Originally Posted by PSS View Post
I check if memcached is up with this small script I made (I'm not daily bash coder, feel free to improve), I run it every minute with cron. If you do the same for LS main process you can have reasonably good kickstarter in case all LS processes die.

Code:
#!/bin/sh
pid=`ps --user=nobody | grep memcached | awk '{print $1}'` 

if kill -0 $pid 2> /dev/null ; then
    exit 0
else
    echo memcached process not found, restarting...
    /usr/local/bin/memcached -u nobody -d -m 128 -l 127.0.0.3 -p 11211
    sleep 2
    pid=`ps --user=nobody | grep memcached | awk '{print $1}'`
    if kill -0 $pid 2> /dev/null ; then
      echo process $pid ok
    fi
fi
exit 0



Awesome scripting foo!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:00 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.