From 8932aaf4ef3d24b7009419c89cbf7919627680ee Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 13 Jan 2016 23:55:45 -0500 Subject: [PATCH] needed libcgi-fast-perl and chown log files --- management/daemon.py | 19 +++---------------- setup/munin.sh | 7 ++++++- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/management/daemon.py b/management/daemon.py index bc19e2ec..bd917692 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -514,33 +514,20 @@ def munin(filename=""): @authorized_personnel_only def munin_cgi(filename=""): """ Relay munin cgi dynazoom requests - /usr/lib/munin/cgi/munin-cgi-graph is a perl cgi script in the munin package that is responsible for generating binary png images _and_ associated HTTP headers based on parameters in the requesting URL. All output is written to stdout which munin_cgi splits into response headers and binary response data. - - munin-cgi-graph reads environment variables as well as passed input to determin + munin-cgi-graph reads environment variables as well as passed input to determine what it should do. It expects a path to be in the env-var PATH_INFO, and a querystring to be in the env-var QUERY_STRING as well as passed as input to the command. - - munin-cgi-graph has several failure modes. Some write HTTP 404 Status headers - and others return nonzero exit codes. munin_cgi has some basic handling, and - logs errors to app.logger. - - = Reasoning = + munin-cgi-graph has several failure modes. Some write HTTP Status headers and + others return nonzero exit codes. Situating munin_cgi between the user-agent and munin-cgi-graph enables keeping the cgi script behind mailinabox's auth mechanisms and avoids additional support infrastructure like spawn-fcgi. - - = Configuration = - A single configuration change is all that is required to enable the - functionality of munin_cgi. In the munin.conf file (/etc/munin/munin.conf) add - the following line above your server listings: - `cgiurl_graph /admin/munin/cgi-graph` - This will tell munin to override the default path for dynazoom requests. """ COMMAND = 'su - munin --preserve-environment --shell=/bin/bash -c "/usr/lib/munin/cgi/munin-cgi-graph \'%s\'"' diff --git a/setup/munin.sh b/setup/munin.sh index 0f2dec04..b1c5c8ba 100755 --- a/setup/munin.sh +++ b/setup/munin.sh @@ -7,7 +7,8 @@ source /etc/mailinabox.conf # load global vars # install Munin echo "Installing Munin (system monitoring)..." -apt_install munin munin-node +apt_install munin munin-node libcgi-fast-perl +# libcgi-fast-perl is needed by /usr/lib/munin/cgi/munin-cgi-graph # edit config cat > /etc/munin/munin.conf <