Munin on an ISPConfig3 server

Discussion in 'Installation/Configuration' started by Hans, Jan 29, 2010.

  1. Hans

    Hans Moderator Moderator

    I try to get munin up and running on a new Debian/Xen ISPConfig3 server.

    Munin can write data into the default htmldir, which is /var/www/munin. So that's ok.

    However after changing the htmldir within /etc/munin/munin.conf, munin can't write it's data into the directory i've defined. Here is the output of my current /etc/munin/munin.conf:

    cat /etc/munin/conf

    dbdir /var/lib/munin
    htmldir /var/www/www.example.com/web/munin
    logdir /var/log/munin
    rundir /var/run/munin

    After defining the new htmldir, i did:

    mkdir -p /var/www/example.com/web/munin
    chown munin:munin /var/www/example.com/web/munin
    /etc/init.d/munin-node restart

    I also did:
    chmod 755 /var/www/example.com/web/munin
    But no luck.

    Is there something i miss here?
    Do i need to create a specific setting in ISPConfig3 for the website?


    ***EDIT *** Here are some outputs of the munin log files:

    cat munin.graph.log

    Unable to graph /var/lib/munin/localdomain/localhost.localdomain-vmstat-sleep-g.rrd: Could not save png to '/var/www/www.example.com/web/munin/localdomain/localhost.localdomain-vmstat-week.png'

    cat munin-html.log

    Jan 29 16:25:05 - processing domain: localdomain
    Jan 29 16:30:06 - Starting munin-html, checking lock
    Jan 29 16:30:06 - could not copy style.css into htmldir
    Jan 29 16:30:06 - could not copy logo.png into htmldir
    Jan 29 16:30:06 - could not copy definitions.html into htmldir
    Jan 29 16:30:06 - processing domain: localdomain
     
    Last edited: Jan 29, 2010
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /var/www/www.example.com/web/munin/
    ?
     
  3. Hans

    Hans Moderator Moderator

    Hi Falko,
    thanks for your reply.
    The output is:

    drwxr-xr-x 2 munin munin 4096 2010-01-30 13:33 .
    drwx--x--- 6 web2 client1 4096 2010-01-30 14:00 ..
     
  4. edge

    edge Active Member Moderator

    Hans,

    Try using the true paths ( /var/client/clients...... )
    I have munning up and running, and used the above paths
     
  5. Hans

    Hans Moderator Moderator

    Thanks for your reply Edge, but i tried that also already.
    Munin can only put its data in /var/www/munin which is the default directory on Debian...:confused:
     
    Last edited: Jan 30, 2010
  6. edge

    edge Active Member Moderator

    This is how my working munin.conf looks like:

    As you can see. For me it's working also working in /var/clients/client1/web1/web/monitoring
     
    Last edited: Jan 31, 2010
  7. Hans

    Hans Moderator Moderator

    Hi Edge, thanks for your help.
    I think in principle the true paths are better indeed, so i changed it again.
    After changing, my configuration file, i did: /etc/init.d/munin-node restart

    Within /etc/munin/munin.conf, now i have:

    dbdir /var/lib/munin
    htmldir /var/www/clients/client1/web2/web/munin
    logdir /var/log/munin
    rundir /var/run/munin

    Short after that a message appears in /var/mail/root, which says:

    Message-Id: <[email protected]>
    Date: Sun, 31 Jan 2010 08:05:06 +0000 (UTC)

    cp: accessing `/var/www/clients/client1/web2/web/munin/': Permission denied
    cp: accessing `/var/www/clients/client1/web2/web/munin/': Permission denied
    cp: accessing `/var/www/clients/client1/web2/web/munin/': Permission denied
    Cannot mkdir /var/www/clients/client1/web2/web/munin/example.com: Permission denied at /usr/share/munin/munin-html line 184.

    The output of:
    ls -la /var/www/clients/client1/web2/web/munin is:

    drwxr-xr-x 2 munin munin 4096 2010-01-30 13:33 .
    drwx--x--- 6 web2 client1 4096 2010-01-30 14:00 ..

    I don't understand why munin can't write its data into my htmldir. :confused:
    As far as i see it has to do something with the permissions, but what can i do?
    Maybe it has nothing to do with it, but did you also installed Jailkit or not?
     
    Last edited: Jan 31, 2010
  8. edge

    edge Active Member Moderator

    Yes I do have Jailkit on my system.

    My ls -la /var/clients/client1/web1/web/monitoring
    Code:
    drwxr-xr-x  3 munin munin    4096 2009-03-04 21:40 .
    drwxrwxrwx 28 web1  client1  4096 2010-01-30 17:46 ..
    -rw-r--r--  1 munin munin    2555 2009-03-04 21:40 definitions.html
    -rw-r--r--  1 munin munin    1677 2010-01-31 09:25 index.html
    drwxr-xr-x  2 munin munin   12288 2009-10-27 23:25 xxxx.info
    -rw-r--r--  1 munin munin     473 2009-03-04 21:40 logo.png
    -rw-r--r--  1 munin munin    3472 2009-03-04 21:40 style.css
     
  9. Hans

    Hans Moderator Moderator

    Ok, then both we have Jailkit installed.

    For munin:munin we have the same, which is: drwxr-xr-x
    For web1:client1 you have drwxrwxrwx (chmod 777), while i have: drwx--x--- which was generated automaticly by ISPConfig 3.

    As far as i see, this is the only difference, isn't it ?
    I hope there is another solution, because i try to avoid chmod 777.

    I also would like to know, which options did you enable for your website in ISPConfig 3?
     
    Last edited: Jan 31, 2010
  10. edge

    edge Active Member Moderator

    No.. It's 755 (created and owned by Munin)

    All I have set for that site is PHP to Fast-CGI, and site is Active.
     
    Last edited: Jan 31, 2010
  11. Hans

    Hans Moderator Moderator

    Hi Edge,

    I found the solution!
    I did: chmod 755 /var/www/clients/client1/web2/web which makes the way open to the subdirectory munin. Now it works. :)

    So after executing the command ls -la /var/www/clients/client1/web2/web i have the following output:

    drwxr-xr-x 3 munin munin 4096 Jan 31 13:20 .
    drwxr-xr-x 5 web2 client1 4096 Jan 31 13:14 ..
    -rw-r--r-- 1 munin munin 2555 Jan 31 13:20 definitions.html
    -rw-r--r-- 1 munin munin 1700 Jan 31 13:20 index.html
    drwxr-xr-x 2 munin munin 12288 Jan 31 13:20 localdomain
    -rw-r--r-- 1 munin munin 473 Jan 31 13:20 logo.png
    -rw-r--r-- 1 munin munin 3472 Jan 31 13:20 style.css

    As you can see drwxr-xr-x stands for chmod 755.
    I still think that you're mistaken, because i'm sure that drwxrwxrwx means chmod 777. So i I think it is better for you to chown te directory web also to chmod 755, because it's more secure!
     
  12. edge

    edge Active Member Moderator

    Good that you got it working.

    My FTP program and putty both show me that the directory is set to 755.

    I've no clue what's going on here.
     
  13. ustoopia

    ustoopia Member

    thanks a bunch for this! setting persmissions on the /web/ folder to 755 also did the trick for me and now it works.
     
  14. clip

    clip New Member

    Yeah for it it works also finally 6 ours searching and messing around with settings in the conf file. Im on debian 6 with munin version 1.4.5

    In the munin.conf

    dbdir /var/lib/munin
    htmldir /var/www/clients/client1/web1/web/monitoring
    logdir /var/log/munin
    rundir /var/run/munin
    # Where to look for the HTML templates
    tmpldir /etc/munin/templates

    Give munin acces

    mkdir -p /var/www/clients/client1/web1/web/monitoring

    
chown munin:munin /var/www/clients/client1/web1/web/monitoring

    /etc/init.d/munin-node restart

    Make sure to set the /web folder to: 755 then

    /etc/init.d/apache2 restart
     

Share This Page