Actions
Howto Munin Fastcgi¶
External Docs: http://munin-monitoring.org/wiki/CgiHowto
- Install CGI::Fast, on Debian/Ubuntu it's in libcgi-fast-perl.
- You don't have to set/change cgiurl_graph, just use the same value in the lighttpd config (the munin fastcgi script doesn't care). The default value is "/cgi-bin/munin-cgi-graph".
- Set "graph_strategy cgi" in munin.conf
- spawn the munin-fastcgi-graph FastCGI application (See recommended way to supervise it):
/usr/bin/spawn-fcgi -n -s /var/run/lighttpd2/munin-fastcgi-graph.sock -u munin -U www-data -- /usr/lib/cgi-bin/munin-fastcgi-graph
- setup your munin vhost for lighttpd2
if req.path =^ "/cgi-bin/" { core.wsgi ( "/cgi-bin/munin-cgi-graph", { fastcgi "unix:/var/run/lighttpd2/munin-fastcgi-graph.sock"; } ); } else { docroot "/var/cache/munin/www"; # or whatever your htmldir is index ( "index.html" ); expire "modification 5 minutes"; }
You need some basics for this if you don't already have them:setup { module_load ( "mod_expire", "mod_fastcgi", "mod_lua" ); lua.plugin "core.lua"; }
- example munin.conf snippet
htmldir /var/cache/munin/www graph_strategy cgi cgiurl_graph /cgi-bin/munin-cgi-graph
Updated by stbuehler over 12 years ago · 3 revisions