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.

Display Munin Outside WHM

Discussion in 'cPanel Developers' started by UniSol, May 2, 2007.

  1. UniSol

    UniSol Active Member

    Joined:
    Mar 5, 2004
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Is there anyway to show Munin graphs and information outside WHM?

    Kind regards

    Uni
     
  2. ivankovalenko

    ivankovalenko Active Member

    Joined:
    Jul 19, 2005
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Of course. You can install munin on any other box outside and force it refresh data from cpanel boxes. We're now preparing a standard box with munin, nagios, billing integration for managing several cpanel boxes.
     
  3. Keegan

    Keegan Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    And your references for this is where?

    What is the point of this?
     
  4. ivankovalenko

    ivankovalenko Active Member

    Joined:
    Jul 19, 2005
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    see docs =). they're handy

    a small bit of ad and to show that you can do almost anything with cpanel from outside without too much effort. In our case its just goes to install rpm, edit config, restart daemon.
     
  5. UniSol

    UniSol Active Member

    Joined:
    Mar 5, 2004
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    I've made a simple CRON job.
    Code:
    cp /usr/local/cpanel/whostmgr/docroot/munin/domain.com/* /home/useracc/public_html/munin/
     
  6. boatdesign

    boatdesign Well-Known Member

    Joined:
    Sep 13, 2003
    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    16
    Thanks Unisol.

    It seems inefficient to keep copying the directory every 5 minutes (or whatever interval) but I suppose this is the only way; permissions will prevent creating a symlink of any kind?
     
  7. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Possible to do? You betcha. You need a bit of experience with php, to figure out how to handle authentication (and image display),and you're there.

    I personally have munin collecting stats for all servers I monitor (except for one client who has requested JUST monitoring), and display the information in my client area. The purpose? So that they can view anomalies, see what's happened when, and they can have 'pretty' historical graphs (haven't played with alert handling quite yet).


    Each client is assigned an ip address, and if they try to view graphs for an ip address they're not assigned, the system won't let them. Pretty basic authentication there.

    You don't actually need to 'move' anything, this is kind of silly. All you need to do is tell php to read the png files (in html), and display them as appropriate. The image below is a perfect example of that.

    Again, is it possible to do? Yup. This is something that is 100% possible to do, WITHOUT moving a single file. I currently have the html stuff stored in /home/user/ , but it should be just as easily done with Cpanel's setup.
     

    Attached Files:

  8. dragon2611

    dragon2611 Well-Known Member

    Joined:
    Nov 30, 2003
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    Could always add the read and excute permisson to the directory containging the graphs, providing apache is setup to follow symlinks

    As far as I could see there was only html , Png and a css file there so providing you only change the permissons for the munin folder and not the whole WHM docroot i can't see it doing much harm.
     
  9. McDuck

    McDuck Member

    Joined:
    Dec 15, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Suggested solution

    Quick way to see Munin outside of WHM;


    nano /etc/munin/munin.conf
    Change: htmldir /usr/local/cpanel/whostmgr/docroot/munin
    To: htmldir /usr/local/apache/htdocs/munin

    then:
    chown -R munin:munin /usr/local/apache/htdocs/munin
    service munin-node restart
    rm -rf /usr/local/cpanel/whostmgr/docroot/munin

    Your munin page will now be accessable from:

    http://yourmainiporserver.name/munin

    Note, this will disble viewing munin in WHM. You might also want to setup a .htaccess to restrict access.
     
  10. rankris

    rankris Member

    Joined:
    Jan 9, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    where to find it default

    I guess I have successfully installed Munin in whm , but where to find the application now :( sorry to sound as a dump :(
     
  11. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Go into WHM, at the bottom, you'll see a plugins section, and in that section, Munin Service Manager. That is where you'll see munin.
     
  12. Dennisb1

    Dennisb1 Active Member

    Joined:
    Aug 16, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    The Netherlands
    When you search the forum you will find that i had the same quistion.
    Just search and you will find the answer in that topic.
    You just need to create a symbolic link and change the chmod rights of the folder and your done:)
     
  13. stefano_ts

    stefano_ts Member

    Joined:
    Aug 13, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    italy
    cPanel Access Level:
    Root Administrator
    I hope that this solution can help someone with the same question:

    help.serversaustralia.com.au/hc/en-us/articles/202768230-How-to-make-Munin-Web-Accessable-with-Password-Protection-on-cPanel-WHM
     
    #13 stefano_ts, Sep 19, 2015
    Last edited by a moderator: Sep 20, 2015

Share This Page