The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding another httpd to chkservd

Discussion in 'General Discussion' started by NiN, Oct 20, 2008.

  1. NiN

    NiN Active Member

    Joined:
    Apr 30, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Braga, Portugal
    I'm having trouble setting up chkservd to check for an alternate httpd (lighttpd) running on a reserved ip address...

    I wanna check the response of lighttpd and restart it if necessary... The way I configured /etc/chkserv.d/lighttpd to:

    service[lighttpd]=(the reserved ipaddr):80,GET / HTTP/1.0,HTTP/1..,/etc/restart_lighttpd

    (/etc/restart_lighttpd: does a killall & restart)

    But it seems that chkserv actually only expects the PORT and doesn't accept an IP:PORT protocol...

    Any way around this?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Rather than using connection based monitoring, have you considered using the command based monitoring supported by chkservd?

    The parameters are as follows:

    service[serviceName] = ,,,restart,command,owner

    serviceName = Name of the Service
    restart = Full path + command to restart the service
    command = Perl Regex of what to look for in the process list
    owner = Process Owner (useful for separating user processes from system processes).
     
  3. NiN

    NiN Active Member

    Joined:
    Apr 30, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Braga, Portugal
    Thanks David, that solved it!

    I assumed it would be better to do a connection monitor in case it hanged or something, but this works fine.
     
Loading...

Share This Page