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.

Custom Service in Service Manager

Discussion in 'General Discussion' started by kbisignani, Jan 2, 2015.

  1. kbisignani

    kbisignani Member

    Joined:
    Jan 29, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Good afternoon,

    I'm looking to add a new service to WHM's Service Manager. I've dug through the forums and found some helpful posts, namely:

    * http://forums.cpanel.net/f5/how-add-services-monitored-tailwatch-128829.html
    (But the PDF doesn't exist, but I found it here: http://web.archive.org/web/20120518...esources/TrainingSlides08/Troubleshooting.pdf)

    * http://forums.cpanel.net/f5/how-add-services-service-monitor-17721.html

    I've added a file to the directory as instructed "/etc/chkserv.d" named cwirkinit with the following contents:

    Code:
    service[cwirkinit]=x,x,x,/root/cwirk/cwirkinit,cwirkinit,root


    It looks like everything is working except for two things:

    1. If I go to WHM > Service Configuration > Service Manager, I see cwirkinit under Additional Services (yay!) but when I hit Save, I get the following:
    This looks good...
    This does not...

    2. If I kill off the process, the service never gets restarted.

    // edit - added this
    I've also just noticed under Server Status > Service Status that I have cwirkinit showing up there (pretty cool - didn't expect it there, but I'll gladly take it) but it shows as running, even though I know it really isn't. I've even checked ps -A and confirmed that the process really isn't there.
    // end edit

    I'm assuming I've done something wrong here, but just not sure what. Any thoughts?

    Thank you,
    ~ Kyle
     
    #1 kbisignani, Jan 2, 2015
    Last edited: Jan 2, 2015
  2. kbisignani

    kbisignani Member

    Joined:
    Jan 29, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Just to follow up...

    The error when saving the Service Manager continues to show up. I'm assuming something new needs to be configured that either hasn't been documented or is located in documentation I cannot find. But the functionality does work. Just this morning I killed off the service "cwirkinit" I created in order to update the program. After about 5 minutes, I got notification that the service had failed, and within another 5 minutes I got notification that the service was successfully restarted.

    So I'm not sure what that error means and what the impact is, current or future, but for the time being it still seems to be doing it's job.

    Thank you,
    ~ Kyle
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The following thread is a more recent example of how to setup monitoring for a custom service:

    Monitoring with Chkservd

    Internal case number 148429 is open to address the issue where the service manager generates an error when saving if third party services are installed. The resolution is currently scheduled for cPanel version 11.48.

    Thank you.
     
Loading...

Share This Page