Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to add services to the Service Monitor?

Discussion in 'General Discussion' started by spaceman, Dec 6, 2003.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    497
    Likes Received:
    3
    Trophy Points:
    318
    Hi,

    I've got some payment gateway merchant server software installed on my redhat linux 7.2 machine running latest versions of WHM+cPanel.

    This merchant server software needs to be running all the time (obviously) if it's always going to be available to process online payments from the various websites that use it.

    How do I

    a) Ensure that when (for whatever reason) my machine is restarted that the merchant server software is always started up along with all the other essential services, and
    b) Ensure that if (for any reason) the merchant software stops, then this failure is detected and the system attempts to 'automagicaly' restart it (and keeps on attempting/reporting until it does).

    I'm not sure if this is entirely a command line thing (which is fine) or whether some or all of it can be achieved via WHM.

    Thanks for any help or guidance. This is probably a bit of a newbie question for more experienced webserver admins.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    497
    Likes Received:
    3
    Trophy Points:
    318
    anyone? :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jphilipson

    jphilipson Well-Known Member

    Joined:
    Jan 8, 2003
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    156
    YOu can add it to the checkservd by adding a file for it in /etc/chkserv.d/

    you can look at the files in thier to get an idea of the format, but its basically ..

    #SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND

    so would possibly be something likethis (assuming it is running as a service)

    service[gateway]=x,x,x,/path/to/command/tostartgateway
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    497
    Likes Received:
    3
    Trophy Points:
    318
    Thanks! I'll take a look...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    497
    Likes Received:
    3
    Trophy Points:
    318
    At the risk of straining the friendship :), is there a way of testing a new file that I put in /etc/chkserv.d/ without actually rebooting the server and/or stopping the service in question?

    Also, assuming that I've correctly adding a new file in /etc/chkserv.d/, what are the characteristics of the chkserv daemon? For example, does it regularly check that the service in question is running (if so, how often) and attempts to re-start it if not - or does it only kick-in a server restart?

    Thanks - your guidance is very much appreciated.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. jphilipson

    jphilipson Well-Known Member

    Joined:
    Jan 8, 2003
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    156
    the checkservd runs every five minutes.. so kill the gateway script, then wait +/- 5 minutes and see if it gets restarted

    but if you leave the PORT, SEND and RESPONSE feilds blank, t won't test to see if its running, it will just restart the program
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    497
    Likes Received:
    3
    Trophy Points:
    318
    Brilliant! Thanks mate, you've been really helpful.

    P.S. Merry Xmas from Perth, Australia! It should be in high 30s celsius for Xmas Day so a white christmas looks unlikely :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    497
    Likes Received:
    3
    Trophy Points:
    318
    I've just noticed this directory:

    /etc/chkserv.d/not/

    What's the signficance of the 'not' directory within the chkserv.d directory?

    For example, both these files have the same content:

    /etc/chkserv.d/proftpd
    /etc/chkserv.d/not/proftpd

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice