Munin is a tool for graphing all sorts of information about one or more servers and displaying it in a web interface. It uses the execellent RRDTool (written by Tobi Oetiker) and is written in Perl. Munin has a master/node architecture. The master connects to all the nodes at regular intervals, and asks them for data. It then stores the data in RRD-files, and (if needed) updates the graphs. One of the main goals has been ease of creating own "plugins" (graphs). I've created two separate ebuild files for the master, named munin and for the node named munin-node
Created attachment 47101 [details] Munin 1.0.4 master ebuild file munin-1.0.4.ebuild is the gentoo ebuild for Munin version 1.0.4. This ebuild will install required files for the Server/Master.
Created attachment 47102 [details, diff] gentoo patch for the munin server side ebuild Patch for gentoo munin server side ebuild
Created attachment 47103 [details] Munin node ebuild that should be installed on the client machines This ebuild provides munin node that should be installed on each of the client's computers.
Created attachment 47104 [details, diff] Gentoo patch for munin node Gentoo patch for munin node.
Created attachment 47523 [details, diff] Munin node ebuild that should be installed on the client machines
Created attachment 47524 [details] Munin node ebuild that should be installed on the client machines
Created attachment 47525 [details, diff] Gentoo patch for munin node
Created attachment 48310 [details] Munin 1.0.5 master ebuild file Munin 1.0.5 master ebuild file
Created attachment 48311 [details, diff] Munin 1.0.5 gentoo patch for the munin server side ebuild Munin 1.0.5 gentoo patch for the munin server side ebuild
Created attachment 48312 [details] Munin 1.0.5 node ebuild Munin 1.0.5 node ebuild
Created attachment 48314 [details, diff] Munin 1.0.5 node gentoo patch Munin 1.0.5 node gentoo patch
Hey Arhont, I was thinking someone should make an ebuild for Munin, as the source install is nasty. /etc/opt/munin? WTF. Gentoo replaced all your Slack/Debian boxes yet then? :) C
Not fair, Calum. Munin uses /opt/munin for application data and /etc/opt/munin for configuration exactly as mandated by the FHS. If you don't like it, please try to change the standard, instead of sniping at application developers who merely try to implement is as correctly as possible. Thanks. Tore (semi-upstream)
Tore - just checked out the FHS, and it does put config files for /opt in /etc/opt. I wasn't sniping, I just had never checked, but I thought the point of /opt was to keep everything in one place. You learn something new evry day. Apologies.
Maybe stupid, but why should munin install in opt ? FHS: /opt : Add-on application software packages If it gets in the tree, its not add-on is it ?
Ok, /opt should be avoided Please consult: http://www.firedrop.org.uk/devmanual//general-concepts/filesystem/ It is unofficial but *highly recommanded* still to conform to what's written here. On Gentoo, that is.
First off, thanks for creating an ebuild for this package. When I tried to generate the digest for the munin-node ebuild, I get the following error: !!! aux_get(): ebuild path for 'net-analyzer/munin-node-1.0.5' not specified: !!! None !!! aux_get(): ebuild path for 'net-analyzer/munin-node-1.0.5' not specified: !!! None doebuild(): aux_get() error reading net-analyzer/munin-node-1.0.5; aborting. The digest for the munin master ebuild works just fine. I'm fairly new to the whole portage overlay thing, so its probably something obvjous that I am missing, but I'd appretiate any help you can offer. Thanks
Created attachment 69364 [details] Munin 1.3.2 master ebuild file i have used the old ebuild and fixed many things. also added a patch to work with >=rrdtool-1.2 Fibbs
Created attachment 69365 [details, diff] Munin 1.3.2 gentoo patch for the munin server side ebuild added the patch to be able to use >=rrdtool-1.2
Created attachment 69366 [details] Munin 1.3.2 node ebuild fixed some things like dependencies and file permissions for version 1.3.2 of munin. Runs also fine on hppa here.
Created attachment 69367 [details, diff] Munin 1.3.2 node gentoo patch fixed some things to work with 1.3.2
1)I think better use /usr/lib/munin/plugins instead /usr/lib/plugins 2)Better use web-app config instead copy to /usr/var/www/localhost/htdocs/munin
I'd also like to see Munin in Portage :) Any idea when it will me merged into the tree? - Jakob
I too would like to see munin in the portage tree.
I would also be happy to see this in portage. I get the following error when using the ebuild and patch above: (Portage 2.1_pre10-r4 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.4-r2, 2.6.16-gentoo-r3 i686) <snip> >>> Source compiled. >>> Test phase [not enabled]: net-analyzer/munin-1.3.2 >>> Install munin-1.3.2 into /var/tmp/portage/munin-1.3.2/image/ category net-analyzer * 'enewgroup()' called from 'install()' which is not a pkg_* function. * Package fails at QA and at life. Please file a bug. !!! ERROR: net-analyzer/munin-1.3.2 failed. Call stack: ebuild.sh, line 1525: Called dyn_install ebuild.sh, line 1002: Called src_install munin-1.3.2.ebuild, line 37: Called enewgroup 'munin' eutils.eclass, line 648: Called die !!! Bad package! enewgroup is only for use in pkg_* functions! !!! If you need support, post the topmost build error, and the call stack if relevant. </snip>
Created attachment 86449 [details] munin-1.3.2-r1.ebuild New ebuild that fixes the bug I described earlier. enewgroup and enewuser are not allowed to be in the src_install() section. Moved these calls and the changes to the permissions into pkg_preinst(). I also added a delay after the message about adding munin to crontab.
Created attachment 86450 [details] munin-node-1.3.2-r1.ebuild New ebuild for munin-node that fixes the bug I described earlier. enewgroup and enewuser are not allowed to be in the src_install() section. Moved these calls and the changes to the permissions into pkg_preinst().
Created attachment 86453 [details, diff] munin-node-1.3.2.patch Updated patch for munin-node ebuild. The check for the munin user and group have to be disabled in the munin Makefile. The ebuild will create these users and perform this check anyway.
Created attachment 86454 [details, diff] munin-1.3.2-gentoo.patch Updated patch for munin ebuild. The check for the munin user and group have to be disabled in the munin Makefile. The ebuild will create these users and perform this check anyway (see munin-node patch above).
The patches have wrong names currently. If you add a -r1 to the ebuild the patches should reflect that as well. Tried to install it here. Some locations seem to be quite - evil. /usr/lib containing the perl scripts /usr/lib/plugins containing the plugins. I'd suggest moving all that stuff in /usr/lib/munin instead. The installation of cgi files to /usr/var/www/localhost/ is quite uncommon/evil as well. Otherwise: Nice effort. I'm still trying to make it work do the right thing (tm) here, but it looks promising so far.
I'm just reviewing the ebuilds here for Gentoo policies and accepted practices. - NAK on the seperate ebuilds for master/node. See Gentoo policy - if upstream provides it as a single tarball, then it should be a single gentoo package. - Use mirror://sourceforge/ for your SRC_URI. - Your KEYWORDS should indicate ~x86 to start, not stable. And did you really test on hppa? - ${D} and ${S} do NOT exist in the pkg_preinst context. ${S} is valid only in src_* stages, and ${D} is only valid in src_install. - fowners/fperms are only allowed in src_install. - calling munin-node-configure should be moved to pkg_config, as it is not cross-compile safe. - Your DEPEND/RDEPEND look fishy. Please check the items there, the perl modules should only be in both of them if perl code is run during src_compile, and otherwise should be in RDEPEND only. - app-text/html2text and app-text/htmldoc are used, unless these are using at runtime (unlikely), they should only be in DEPEND, as they are generally used for building documentation. - Please provide a cronjob file for /usr/share/doc/${PF} that has your cronjob stuff in it, to allow: "cat munin_crontab | crontab -u munin". Lastly, with munin as a webapp, it must use the webapp.eclass and framework, to allow proper installs.
Only to let you know, munin does not generate graphs with 1.3.2. I get this: And it seems I'm not the only one:Use of uninitialized value in scalar chomp at /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 262. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 264. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 269. readline() on closed filehandle LOCK at /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 187. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 188. http://munin.projects.linpro.no/ticket/218 This is my emerge --info Gentoo Base System version 1.6.14 Portage 2.1 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r3, 2.6.15-gentoo-r1 i686) ================================================================= System uname: 2.6.15-gentoo-r1 i686 AMD Athlon(tm) XP 1500+ dev-lang/python: 2.3.5-r2, 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://linuv.uv.es/mirror/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/di stfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 alsa apache2 apm avi bash-completion berkdb bitmap-fonts bzip2 cdr cli crypt cups dbus dri eds emboss encode foomaticdb fortran ftp gd gdbm gif gpm gstr eamer hal imap imlib ipv6 isdnlog java jpeg ldap libg++ libwww lm_sensors mad mbox mikmod mp3 mpeg mysql ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam p cre pdflib perl php png posgres pppd python quicktime readline reflection samba session spell spl ssl tcpd truetype truetype-fonts type1-fonts usb vorbis xml2 xm ms xorg xv zlib elibc_glibc kernel_linux userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS (In reply to comment #31) > I'm just reviewing the ebuilds here for Gentoo policies and accepted practices. > > - NAK on the seperate ebuilds for master/node. > See Gentoo policy - if upstream provides it as a single tarball, then it should > be a single gentoo package. > - Use mirror://sourceforge/ for your SRC_URI. > - Your KEYWORDS should indicate ~x86 to start, not stable. And did you really > test on hppa? > - ${D} and ${S} do NOT exist in the pkg_preinst context. ${S} is valid only in > src_* stages, and ${D} is only valid in src_install. > - fowners/fperms are only allowed in src_install. > - calling munin-node-configure should be moved to pkg_config, as it is not > cross-compile safe. > - Your DEPEND/RDEPEND look fishy. Please check the items there, the perl > modules should only be in both of them if perl code is run during src_compile, > and otherwise should be in RDEPEND only. > - app-text/html2text and app-text/htmldoc are used, unless these are using at > runtime (unlikely), they should only be in DEPEND, as they are generally used > for building documentation. > - Please provide a cronjob file for /usr/share/doc/${PF} that has your cronjob > stuff in it, to allow: "cat munin_crontab | crontab -u munin". > > Lastly, with munin as a webapp, it must use the webapp.eclass and framework, to > allow proper installs. >
I get the same problems... and no graphs. Here my munin page for example of the output: http://68.226.71.5:8080/munin/ I hope I can get this to work. I used the 1.3.2-r1 ebuild. I'm considering just using the 1.0.5 ebuilds (In reply to comment #32) > Only to let you know, munin does not generate graphs with 1.3.2. I get this: > > And it seems I'm not the only one:Use of uninitialized value in scalar chomp at > /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 262. > Use of uninitialized value in pattern match (m//) at > /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 264. > Use of uninitialized value in pattern match (m//) at > /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 269. > readline() on closed filehandle LOCK at /usr/lib/perl5/site_perl/5.8.8/Munin.pm > line 187. > Use of uninitialized value in pattern match (m//) at > /usr/lib/perl5/site_perl/5.8.8/Munin.pm line 188. > > > http://munin.projects.linpro.no/ticket/218 > > This is my emerge --info > > Gentoo Base System version 1.6.14 > Portage 2.1 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r3, > 2.6.15-gentoo-r1 i686) > ================================================================= > System uname: 2.6.15-gentoo-r1 i686 AMD Athlon(tm) XP 1500+ > dev-lang/python: 2.3.5-r2, 2.4.2 > dev-python/pycrypto: 2.0.1-r5 > dev-util/ccache: [Not Present] > dev-util/confcache: [Not Present] > sys-apps/sandbox: 1.2.17 > sys-devel/autoconf: 2.13, 2.59-r7 > sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 > sys-devel/binutils: 2.16.1-r2 > sys-devel/gcc-config: 1.3.13-r2 > sys-devel/libtool: 1.5.22 > virtual/os-headers: 2.6.11-r2 > ACCEPT_KEYWORDS="x86" > AUTOCLEAN="yes" > CBUILD="i686-pc-linux-gnu" > CFLAGS="-O2 -march=athlon-xp -pipe" > CHOST="i686-pc-linux-gnu" > CONFIG_PROTECT="/etc" > CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" > CXXFLAGS="-O2 -march=athlon-xp -pipe" > DISTDIR="/usr/portage/distfiles" > AUTOCLEAN="yes" > CBUILD="i686-pc-linux-gnu" > CFLAGS="-O2 -march=athlon-xp -pipe" > CHOST="i686-pc-linux-gnu" > CONFIG_PROTECT="/etc" > CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" > CXXFLAGS="-O2 -march=athlon-xp -pipe" > DISTDIR="/usr/portage/distfiles" > FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" > GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ > http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ > http://linuv.uv.es/mirror/gentoo/" > MAKEOPTS="-j2" > PKGDIR="/usr/portage/packages" > PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress > --force --whole-file --delete --delete-after --stats --timeout=180 > --exclude='/di > stfiles' --exclude='/local' --exclude='/packages'" > PORTAGE_TMPDIR="/var/tmp" > PORTDIR="/usr/portage" > PORTDIR_OVERLAY="/usr/local/portage" > SYNC="rsync://rsync.gentoo.org/gentoo-portage" > USE="x86 alsa apache2 apm avi bash-completion berkdb bitmap-fonts bzip2 cdr cli > crypt cups dbus dri eds emboss encode foomaticdb fortran ftp gd gdbm gif gpm > gstr > eamer hal imap imlib ipv6 isdnlog java jpeg ldap libg++ libwww lm_sensors mad > mbox mikmod mp3 mpeg mysql ncurses nls nptl nptlonly ogg oggvorbis opengl oss > pam p > cre pdflib perl php png posgres pppd python quicktime readline reflection samba > session spell spl ssl tcpd truetype truetype-fonts type1-fonts usb vorbis xml2 > xm > ms xorg xv zlib elibc_glibc kernel_linux userland_GNU" > Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, > LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
I had to make some modifications to the 1.0.5 ebuilds to get them to work (some functions need to be in preinst() rather than install()) but, after it was installed... I still am unable to get graphs made. I'm thinking it is just a perl 5.8.8 problem. I guess munin was made for older versions of perl???
Created attachment 90662 [details] fixed 1.0.5 munin ebuild Some functions needed to be moved from install() to preinst(). Also, some package names have changed, especially in the perl area.
Created attachment 90663 [details] fixed 1.0.5 munin-node ebuild Some package names have changed and some functions needed moved from install() to preinst().
Those 2 ebuilds were my first contributions. Sorry if I did anything incorrectly. Also note, the patches from the previous 1.0.5 ebuilds are still valid.
Created attachment 91329 [details] Munin 1.3.2 unfinished ebuild Cleanups, unification, other misc stuff, there's more to do, but i thought i'd share.
Created attachment 91330 [details] ${FILESDIR}/munin-init.d
Created attachment 91331 [details, diff] Makefile.config patch, not sure if it's the only patch that needs to be done yet.
Ok, munin-1.3.2 is now in the tree. Thanks to infowolfe for finally following my cleanup suggestions and posting those here. However on further review it seems that munin needed a fair bit of work to actually behave itself - DESTDIR, rrdtool syntax changes, and making the iostat_ios plugin actually work.
Closing this now.
(In reply to comment #42) > Closing this now. > What about munin node? It isn't in portage.
There will be no seperate munin-node package. The node portion needs a lot of the same perl modules (there is exactly one that it doesn't need - HTML-Template, which is an extremely light dependancy). The only difference you do is not install the provided cronjob via --config on your nodes.
we considered allowing a USE flag of "nodeonly" but chopping all the graphing stuff out doesn't really make a large difference when it comes down to it and would cause more work than it's really worth. HTH
(In reply to comment #45) > we considered allowing a USE flag of "nodeonly" but chopping all the graphing > stuff out doesn't really make a large difference when it comes down to it and > would cause more work than it's really worth. > > HTH > So, the node is built in. Alright, that works. Thanks!