Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
8932aaf4
Commit
8932aaf4
authored
Jan 13, 2016
by
mike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
needed libcgi-fast-perl and chown log files
parent
6d6f3ea3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
daemon.py
management/daemon.py
+3
-16
munin.sh
setup/munin.sh
+6
-1
No files found.
management/daemon.py
View file @
8932aaf4
...
...
@@ -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
\'
"'
...
...
setup/munin.sh
View file @
8932aaf4
...
...
@@ -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
<<
EOF
;
...
...
@@ -32,6 +33,10 @@ contact.admin.command mail -s "Munin notification ${var:host}" administrator@$PR
contact.admin.always_send warning critical
EOF
# The Debian installer touches these files and chowns them to www-data:adm for use with spawn-fcgi
chown
munin. /var/log/munin/munin-cgi-html.log
chown
munin. /var/log/munin/munin-cgi-graph.log
# ensure munin-node knows the name of this machine
tools/editconf.py /etc/munin/munin-node.conf
-s
\
host_name
=
$PRIMARY_HOSTNAME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment