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.

Show Cpanel Service Status On External PHP Page

Discussion in 'cPanel Developers' started by Drewley, Jul 17, 2007.

  1. Drewley

    Drewley Member

    Joined:
    Oct 30, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Has it been done?
    Is it possible?

    If so could someone point me in the right direction?

    thanks in advance.
     
  2. CoreISP.net

    CoreISP.net Active Member

    Joined:
    May 25, 2006
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    Well...

    I did that once a couple of years back by including the script using PHP, making it login to cPanel and obtain the info with a POST command.

    I do think however, that there are way more better ways then this option :P
    I thought cPanel even had a function included for this somewhere.
     
  3. Drewley

    Drewley Member

    Joined:
    Oct 30, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    well i have looked, but not yet found a solution =/

    any other ideas? anyone?
     
  4. 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
    AFAIK, there's no entry in the XML API or API2 (which you can use via the XML API) to access service status via cPanel/WHM.

    What we do have is the ability to add services to chkservd to be checked routinely by cPanel/WHM.

    Creating your own script to do this would not be difficult, especially with connection-based monitoring. Just attempt to open a socket to a port and send some data and if the data you get back is what you expected then your server is online. You'll have to figure out the code for that yourself ;).

    Check out /etc/chkserv.d/ for the data chkservd sends and expects on connection-based monitoring. Of course you can also do command-based monitoring like chkservd supports.

    For details on the syntax of that file, you can refer to my Customizing cPanel presentation (PDF) from the 2007 cPanel Training Seminar. Information on this begins at slide/page 41.
     
  5. Drewley

    Drewley Member

    Joined:
    Oct 30, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    thanks very much David :)
     
  6. MarcelB

    MarcelB Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
Loading...

Share This Page