Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    5

    Default Adding Bandwidth Meter to CMS

    Hi,

    I'm new to all this, so please don't think that I'm stupid or anything... Hopefully I'll learn.

    I have a CMS that my clients use to update their website, and I would love to have the Bandwidth meter (And possibly also the disc space usage meter) showing in my CMS, so that my clients can see how much of their limits they have used.

    How would I go about doing this? I feel that it's probably an easy task, but I have only just started using cPanel and WHM so i'm not too sure how to do it.

    Cheers,
    Brad

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Adding Bandwidth Meter to CMS

    How do the clients update their cPanel sites via that CMS? Are you using the API to plug into something? Without more details on how the CMS is working to get an idea of how it pulls information, it would be difficult to answer this question.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Member
    Join Date
    Jul 2011
    Posts
    5

    Default Re: Adding Bandwidth Meter to CMS

    Hi,

    Thanks for replying. The CMS is very basic; the page content is stored in a database, there's no API or anything that connects directly to cPanel.
    My clients generally have no need to log in to cPanel as I look after all of that for them, which is why I would love to get the meters showing in my CMS, so that information is all in one place.

    Cheers,
    Brad

  4. #4
    Member
    Join Date
    Jul 2011
    Posts
    5

    Default Re: Adding Bandwidth Meter to CMS

    I've worked it out cheers, after much trial and error.

  5. #5
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,893
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Adding Bandwidth Meter to CMS

    Quote Originally Posted by inspyre View Post
    I've worked it out cheers, after much trial and error.
    Do tell, I'd like to hear more about how you accomplished this.
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  6. #6
    Member
    Join Date
    Jul 2011
    Posts
    5

    Default Re: Adding Bandwidth Meter to CMS

    Haha, well this may not be the best way to do it, but it surely works.

    (and it is only in a password protected area, so hopefully any security issues using the 2082 port won't be a problem)

    I loaded an array from
    www.mywebsite. com:2082/xml-api/cpanel?cpanel_xmlapi_module=StatsBar&cpanel_xmlapi_func=stat&cpanel_xmlapi_apiversion=2&display=bandwidthusage|diskusage

    then just used that array to display the details.

    If you can see anything that might pose a potential problem with that, then please let me know; as I said, I'm new to all of this!
    Last edited by inspyre; 07-21-2011 at 06:16 PM.

  7. #7
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default Re: Adding Bandwidth Meter to CMS

    Hi inspyre,

    That's the correct why to get that information.

    I would still recommend using port 2083 if possible. The reason why is that unless you're explicitly using the loopback (ie, localhost/127.0.0.1) or a private network, it's possible for someone to sniff the packets on the network transmission (which will contain plain text data). At the least, you'd probably be exposing the packets to other boxes that share the same switch as you in the datacenter, but it could also include the various other places along the route from the originating server to the cPanel box itself (this might even happen if the origin and destination live on the same box...that is, you make yourself vulnerable if the request is broadcasted on an external network interface).

    IMHO, non-ssl ports are only a valid choice if your request is being sent on an internal network (for which the cPanel box has a dedicated interface to), i,e your CMS only calls cPanel on a private network address that you direct/physically control.

    Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  8. #8
    Member
    Join Date
    Jul 2011
    Posts
    5

    Post Re: Adding Bandwidth Meter to CMS

    Hi DavidN

    Thanks for your reply.

    I now have it set up to use port 2083

    Cheers,
    Brad

Similar Threads & Tags
Similar threads

  1. cPanel Password Strength Meter
    By lvt in forum cPanel Developers
    Replies: 5
    Last Post: 03-11-2012, 06:08 PM
  2. Bandwidth page - adding days
    By SupermanInNY in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-07-2004, 12:08 AM
  3. speed meter?
    By chadi in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-04-2004, 09:39 PM
  4. speed meter?
    By chadi in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 07-17-2004, 11:36 AM
  5. Bandwith meter not working
    By gloverkarl in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-10-2004, 11:53 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube