Description of problem: The recently released munin-2.x updates do not work "out of the box" without a number of ugly hacks. Version-Release number of selected component (if applicable): 2.0.6-2 Additional details: munin-2.x advertises itself as have real, mature cgi support ( http://munin-monitoring.org/wiki/CgiHowto2 ) for generating all the web content (HTML+images). Unfortunately, the recently released 2.x munin RPM flat out doesn't work to support any cgi driven content generation without a number of hacks. I've gotten this working after making the following changes: yum install mod_fcgid spawn-fcgi # perhaps this needs to be a dependency for the munin-2.x RPMs ? systemctl start munin-fcgi-graph.service munin-fcgi-html.service # this seems like a documentation issue, as I'm not sure how anyone would ever know that these services even exist chgrp apache /var/log/httpd/munin/munin-cgi-* && chmod g+w /var/log/httpd/munin/munin-cgi-* # tons of permission denied errors in the apache error log for every munin web content page load until I fixed this mkdir -p /var/lib/munin/cgi-tmp/munin-cgi-graph && chown -R munin.apache /var/lib/munin/cgi-tmp && chmod -R u+g /var/lib/munin/cgi-tmp # tons of "Unable to graph ..." random png file errors in the /var/log/munin/munin-cg-graph.log * add to munin.conf: # shouldn't these at least be commented out in the default file, so that people know they exist? html_strategy cgi cgiurl_graph /munin/cgi/munin-cgi-html * add to /etc/httpd/conf/httpd.conf #perhaps there's a way to get this working inside of /etc/httpd/conf.d/munin.conf but I couldn't, and ran out of patience RewriteEngine On ScriptAlias /munin/cgi/munin-cgi-graph /var/www/html/munin/cgi/munin-cgi-graph <Location /munin-cgi/munin-cgi-graph> Options +ExecCGI SetHandler fcgi-script </Location> ScriptAlias /munin/cgi/munin-cgi-html /var/www/html/munin/cgi/munin-cgi-html <Location /munin-cgi/munin-cgi-html> Options +ExecCGI SetHandler fcgi-script </Location> Perhaps I'm doing something wrong somewhere, but I couldn't locate any useful, accurate documentation anywhere that was specific to Fedora.
munin-2.0.7-5.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/munin-2.0.7-5.fc18
munin-2.0.7-5.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/munin-2.0.7-5.fc17
munin-2.0.7-5.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/munin-2.0.7-5.fc16
munin-2.0.7-5.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/munin-2.0.7-5.el6
munin-2.0.7-5.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/munin-2.0.7-5.el5
I'm pleased to see this bug getting attention. The new munin-cgi RPM references http://munin-monitoring.org/wiki/CgiHowto2 but that page doesn't have any fedora specific information. Can you comment (either here or the wiki) on what needs to be done after installing these RPMs to get cgi generated content working correctly? thanks!
Package munin-2.0.7-5.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing munin-2.0.7-5.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-17591/munin-2.0.7-5.fc18 then log in and leave karma (feedback).
I installed all the 2.0.7-5 RPMs and I'm trying to get CGI working, and still no love: # systemctl start munin-fcgi-graph.service Job failed. See system logs and 'systemctl status' for details. # tail /var/log/messages Nov 4 11:58:43 hal systemd[1]: Reloading. Nov 4 11:58:47 hal spawn-fcgi[21517]: spawn-fcgi: child exited with: 2 Nov 4 11:58:47 hal systemd[1]: munin-fcgi-graph.service: control process exited, code=exited status=2 Nov 4 11:58:47 hal systemd[1]: Unit munin-fcgi-graph.service entered failed state. # systemctl status munin-fcgi-graph.service munin-fcgi-graph.service - Munin FastCGI Graph Loaded: loaded (/lib/systemd/system/munin-fcgi-graph.service; enabled) Active: failed since Sun, 04 Nov 2012 11:58:47 -0800; 3min 14s ago Process: 21517 ExecStart=/usr/bin/spawn-fcgi -s /run/munin/fcgi-graph.sock -U apache -u munin -g munin /var/www/html/munin/cgi/munin-cgi-graph -P /run/munin/fcgi-graph.pid (code=exited, status=2) CGroup: name=systemd:/system/munin-fcgi-graph.service That path to munin-cgi-graph is completely wrong, and that's hard coded wrong in /lib/systemd/system/munin-fcgi-graph.service. Similar problem with munin-fcgi-html.service . I made a copy of the service, fixed the incorrect path (/var/www/cgi-bin/munin-cgi-graph), and then it started. But CGI still didn't work. Looking in the apache error log, I saw tons of: munin-cgi-graph: Can't open /var/log/munin/munin-cgi-graph.log (Permission denied) at /usr/share/perl5/vendor_perl/Log/Log4perl/Appender/File.pm line 103. Fixed/hacked by chgrp'ing /var/log/munin to 'apache', and making it group writable as well: chgrp apache munin-cgi-graph.log && chmod g+w munin-cgi-graph.log I can't tell if I'm doing it wrong, or if the bug isn't fixed. On top of that, I still can't figure out exactly what munin-fcgi-graph.service is intended to accomplish. Whether or not its running, cgi graphing works (after all the hacking detailed above). Additionally, in munin.conf I see: # HTML files are normally generated by munin-html, no matter if the # files are used or not. You can change this to on-demand generation # by following the instructions in http://munin-monitoring.org/wiki/CgiHowto2 # # Notes: # - moving to CGI for HTML means you cannot have graph generated by cron. # - cgi html has some bugs, mostly you still have to launch munin-html by hand # html_strategy cron What does "cgi html has some bugs, mostly you still have to launch munin-html by hand" mean exactly? Running some command manually? Setting html_strategy=cron ? Something else?
munin-2.0.8-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/munin-2.0.8-1.fc17
munin-2.0.8-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/munin-2.0.8-1.fc16
munin-2.0.8-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/munin-2.0.8-1.el6
munin-2.0.8-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/munin-2.0.8-1.el5
munin-2.0.8-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
munin-2.0.8-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
munin-2.0.8-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
munin-2.0.8-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
Lack of expected functionality continues to exist with munin-2.0.8, specifically munin-2.0.8-1.el6 that has been pushed to the Fedora EPEL 6 stable repository. Namely, no graph is displayed on zooming page (only ? in square). Have been following Lonni J Friedman posts here and on the Munin Sourceforge list on manual hacks. Unfortunately, files like munin-fcgi-graph.service don't seem to exist in the munin-2.0.8-1.el6 RPM so its not clear what hacks might get zoom working on EL6. Otherwise, munin operates "as expected" (minus graph zooming ability).
agreed, re-opening. The fact that the maintainer of these packages doesn't even acknowledge or respond to the feedback is incredibly frustrating.
Lonni: There is not a way to auto-use cgi. This will always require manual intervention due to how many options there are available. Halocaridina: you will likely want the munin-cgi sub-package.
Sorry, but I don't understand why there isn't a way to make cgi work automatically. At a minimum you should update the /etc/munin/munin.conf and /etc/httpd/conf.d/munin.conf to include the necessary configuration commented out so that people can simply uncomment it if they wish to use cgi. As I've noted above, CGI is the *default* for munin-2.x. You should be shipping a configuration that has CGI enabled by default. There's absolutely nothing in the munin setup to use CGI which requires any per-user customization. I even went so far as to document everything that I needed to do to get CGI working with your RPMs here: http://netllama.linux-sxs.org/llamaland/?p=1484 If you don't think this can be enabled by default, I'd like to hear an explanation why.
Changing your existing config files is against FPO policy. This will not happen. CGI is not the default for munin-2.0. It was for a single point release, and rolled back. The default is cron updates. The "yum install" packages should already be required via munin-cgi. That was rectified several releases ago. The config file changes are known, and will not change post-install, as above.
I wasn't suggesting that pre-existing installed config files be changed. I was noting that for a new munin installation, what ships should include the CGI specific configuration.
Lonni and d. johnson, Between information and comments supplied by both of you, I am happy to say that my implementation of munin 2.0.8 on EL6 now has graph zooming ability. Thank you again. I document here what had to be done on a fully updated Scientific Linux 6.1 system for future reference. Hope it proves useful to others on EL6. 1) yum --enablerepo=epel install mod_fcgid spawn-fcgi munin-cgi (already had installed mod_fcgid spawn-fcgi from previous attempts to get this to work, but was missing munin-cgi) 2) uncomment the two options in /etc/sysconfig/spawn-fcgi in order to be able to start spawn-fcgi via: /etc/init.d/spawn-fcgi start I'll need to go back and tweak /etc/sysconfig/spawn-fcgi based on possible options 3) chkconfig --level 2345 spawn-fcgi on (so spawn-fcgi starts on boot) The below either comes directly from the link Lonni provided in Comment #20 above or is a slight modification) 4) touch /var/log/munin/munin-cgi-graph.log && touch /var/log/munin/munin-cgi-html.log 5) chgrp apache /var/log/munin/munin-cgi-* && chmod g+w /var/log/munin/munin-cgi-* 6) mkdir -p /var/lib/munin/cgi-tmp/munin-cgi-graph && chown -R munin.apache /var/lib/munin/cgi-tmp && chmod -R ug+w /var/lib/munin/cgi-tmp (note in above that chmod -R ug+w is corrected relative to Lonni's documentation). 7) uncommented contents of /etc/munin/munin.conf are: includedir /etc/munin/conf.d html_strategy cgi graph_strategy cron cgiurl_graph /cgi-bin/munin-cgi-graph html_strategy cron [fully-qualified hostname] address 127.0.0.1 use_node_name yes 8) create /etc/httpd/conf.d/munin-cgi.conf as specified in Lonni's post with following content: Alias /static /etc/munin/static/ RewriteEngine on RewriteRule ^/cgi-bin/munin-cgi-html(\/.*?)*/static/(.*) /static/$2 [R,L] # Uncomment the following to redirect old, static URLs to the CGI-HTML RewriteRule ^/munin/(.*) /cgi-bin/munin-cgi-html/$1 [R,L] RewriteRule ^/cgi-bin/munin-cgi-html$ /cgi-bin/munin-cgi-html/ [R,L] ScriptAlias /cgi-bin/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph <Location /cgi-bin/munin-cgi-graph> Options +ExecCGI SetHandler fcgid-script </Location> ScriptAlias /cgi-bin/munin-cgi-html /var/www/cgi-bin/munin-cgi-html <Location /cgi-bin/munin-cgi-html> Options +ExecCGI SetHandler fcgid-script </Location> 9) /etc/init.d/httpd restart 10) /etc/init.d/munin-node stop && /etc/init.d/munin-node start
Sorry for the noise, but one addition to the above Comment #23 is: 6.5) cp -R /var/www/cgi-bin/ /var/www/html/munin/cgi/
Much of what you ran is no longer required. Step 1 should read: 1) yum --enablerepo=epel install munin-cgi The rest is already Required. 2 and 3 are known and will remain as-is. Steps 4,5,6.5 and half of 6 are not needed. (Half of 6 because there is may be a bug regarding cgitmpdir: it should already be using /var/tmp/ by default.) Your 7 appears to be odd. I will have to verify what this actually uses because you have both cron and cgi listed for the same task.
d. johnson, Thank you for the clarification. #4 and #5 come from my previous attempts to get CGI/zooming ability working under 2.0.6. Without touching and changing permissions on those files, munin-logs were filled with "couldn't write to log file" errors (something also reported by Lonni). #6 needed to be done since 1) these directories did not exist after installing munin-cgi and 2) the system was logging errors to /var/log/munin/munin-cgi-graph.log like: [WARNING] Could not draw graph "/var/lib/munin/cgi-tmp/munin-cgi-graph/DOMAIN/HOSTNAME/entropy-pinpoint=1354111513,1354219513.png?&lower_limit=&upper_limit=&size_x=800&size_y=400": /var/lib/munin/cgi-tmp/munin-cgi-graph/DOMAIN/HOSTNAME/entropy-pinpoint=1354111513,1354219513.png?&lower_limit=&upper_limit=&size_x=800&size_y=400 when attempting to zoom on a graph. These errors disappeared once #6 was done. I need to look further into whether #6.5 is really needed. As for #7, that is odd. I need to see whether commenting out "html_strategy cron" in munin.conf breaks things. Right now, everything is working as I would expect and there are no errors being printed to any of the logs.
Two items: 1) 2.0.8-2 has the fix for the cgi-tmp bug. It was patched and not rebuilt. Should appear shortly in -testing repo. 2) Setup should look something like this: yum --enablerepo=epel,epel-testing install munin-cgi sed -i 's/\(.*\)_strategy.*/\1_strategy cgi/' /etc/munin/munin.conf cp --backup /etc/sysconfig/spawn-fcgi-munin /etc/sysconfig/spawn-fcgi for svc in spawn-fcgi httpd munin-node; do service $svc stop chkconfig $svc on service $svc start done Except for the --enablerepo flag, the rest can be found in 'yum info munin-cgi' (after -2 pushes; because there is a copy of the upstream wiki httpd munin-cgi.conf found there as well sans vhost.) Look for it, and provide karma when available.
munin-2.0.8-2.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/munin-2.0.8-2.fc18
munin-2.0.8-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/munin-2.0.8-2.fc17
munin-2.0.8-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/munin-2.0.8-2.fc16
munin-2.0.8-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/munin-2.0.8-2.el6
munin-2.0.8-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/munin-2.0.8-2.el5
Package munin-2.0.8-2.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing munin-2.0.8-2.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-19431/munin-2.0.8-2.fc18 then log in and leave karma (feedback).
munin-2.0.9-2.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/munin-2.0.9-2.fc18
munin-2.0.9-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/munin-2.0.9-2.fc17
munin-2.0.9-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/munin-2.0.9-2.fc16
munin-2.0.9-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/munin-2.0.9-2.el6
munin-2.0.9-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/munin-2.0.9-2.el5
munin-2.0.9-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
munin-2.0.9-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
munin-2.0.9-3.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/munin-2.0.9-3.el6
munin-2.0.9-3.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/munin-2.0.9-3.el5
munin-2.0.9-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
munin-2.0.9-3.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
munin-2.0.9-2.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.