Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2007
    Posts
    2

    Default XML API Callback's for bandwidth and disk quota exceeded/warning it will exceed

    We'd like cPanel servers to callback to a particular URL (eg http://core.hostroute.com/cpanelcallbacks) when an account goes over (or within pre-defined percentags) of:

    - Disk quota
    - Email space quota
    - Bandwidth quota

    This doesn't seem to be present currently, judging from the documentation we've reviewed thus far.

    Help appreciated. Thanks.

    Jordan
    Cheap PHP Web Hosting and Domain Name Registration | Hostroute US

  2. #2
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    At the present time we do not provide functionality that is like what you've described. The end goal might still be possible but it is dependent upon creating a custom script that performs the requested functions, including checking for the desired information and passing it on (in a "call-back"); a cron entry could be used to automate the process of having the custom script perform its checks at predefined intervals.

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    4

    Lightbulb

    I have actually been told by two separate cPanel staff that this is being looked into. Is this actually in the roadmap, or not? If not, can this be entered as a feature request? I think I can clarify what Jordan is asking a bit better...

    Ideally, I envision an area in cPanel where an administrator could enter a callback URL, let's say http://remote.application/callbacks/cpanel.json, with which cPanel would send a POST request on a few configurable actions. A couple that come to mind are:

    - When a user goes over their bandwidth limit
    - When a user is suspended
    - When a user is unsuspended
    - When a user is terminated
    - etc.

    Basically, it is hard for developers to build software applications which need to call to cPanel every hour or more to get this type of information, or build a separate cron task for every server... not to mention costly in terms of load required to perform the actions. The alternative, which is what I am proposing, would send a simple XML/JSON string in a POST request letting the remote application know that something happened. Here is an example:

    Code:
    <cpanel>
      <notification>
        <type>suspension</type>
        <created-at>Sun Oct 18 00:22:23 BST 2009</created-at>
        <attributes>
          <username>seeddata09</username>
          <reason>Bandwidth overage</reason>
          ...
        </attributes>
      </notification>
    </cpanel>
    Attributes pertaining specifically to the notification would go inside the attributes node. This would be a much less resource intensive way to gather data from a server when events occur, it would make tonnes of developers ecstatic, and I have a feeling it would not be that hard to implement.

    What do you guys think?

  4. #4
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    At this point, this feature is not on our roadmap, we agree that a feature like this may be useful, however there are some ways to get (some) of the information that you are talking about. Please open a feature request in the feature request forum so that other users can comment on this idea and we can see the demand/public discussion of a feature like this.

    If you look at our functionhooks feature it does something very similiar to this, however this only exists for the cPanel interface and not the WHM interface.

    For some of the actions you are talking about, script hooks do exist (please review ScriptHooks < DevHooks < TWiki )

    These can be used to create a callback like what you are describing.

    As for things like bandwidth notifications, nothing is able to hook into that system at this time, I am adding a feature request (for review by our development to decide of feasibility, roadmap, etc) to add in hooks for bandwidth & diskspace processing.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

Similar Threads & Tags
Similar threads

  1. Allow bandwidth overuse on some accounts (no suspension when exceed quota)
    By mikelegg in forum Feature Requests for cPanel/WHM
    Replies: 9
    Last Post: 03-30-2011, 07:19 AM
  2. Disk quota exceeded problem
    By SACHIN in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-13-2007, 03:43 AM
  3. disk quota and bandwidth exceeded warning
    By anand in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-20-2004, 09:16 AM
  4. User has managed to exceed their disk quota
    By studentwebhosting in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 06-21-2003, 08:34 AM
  5. Disk quota exceeded
    By AlaskanWolf in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 10-19-2001, 04:43 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube