Difference between revisions of "Munin"
(Created page with "Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" problems. Munin implements a master and sla...") |
(→Emerge) |
||
| Line 22: | Line 22: | ||
=== Emerge === | === Emerge === | ||
| + | First we must install the base package {{Package|net-analyzer/munin}} | ||
{{Emerge|params=--ask --verbose| net-analyzer/munin}} | {{Emerge|params=--ask --verbose| net-analyzer/munin}} | ||
| + | |||
| + | You may also need to install {{Package|media-fonts/corefonts}} | ||
| + | {{Emerge|params=--ask --verbose| media-fonts/corefonts}} | ||
=== Configuration === | === Configuration === | ||
Revision as of 16:14, 1 May 2012
Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" problems.
Munin implements a master and slave node structure; one master node with many slave nodes. The master node gathers data from the slave nodes, and produces HTML output. Generally these will be placed in the directory accessible via a web server, however you could view them locally with a web browser.
Contents |
Installation
USE flags
| USE flag | Default | Recommended | Description |
|---|---|---|---|
| asterisk | No | installs deps for monitoring Asterisk | |
| doc | No | Adds extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally | |
| irc | No | installs deps for monitoring IRC | |
| java | No | Adds support for Java | |
| memcached | No | installs deps for monitoring memcached | |
| minimal | No | installs only the munin-node, applicable if the host is not the munin master installation" | |
| mysql | No | Adds mySQL Database support | |
| postgres | No | Adds support for the postgresql database | |
| ssl | No | Adds support for Secure Socket Layer connections |
Requirements
You will need (optionally) need a web server such as Apache, Lighttpd, or nginx. It assumed you have a web server with root /var/www/localhost/htdocs/.
Emerge
First we must install the base package net-analyzer/munin
root # emerge --ask --verbose net-analyzer/muninYou may also need to install media-fonts/corefonts
root # emerge --ask --verbose media-fonts/corefontsConfiguration
First we must install the munin cronjob
root # emerge --config net-analyzer/muninNow set the htmldir (this will probably not need to be changed, the default should be fine). This folder must be writeable for the user munin, the config command should take care of this.
htmldir /var/www/localhost/htdocs/munin
Enable crontab for munin, by adding munin to the cron group.
root # gpasswd -a munin cronLastly we need to tell munin which statistics to gather. There is a nice command to do this for us.
root # sudo -u munin munin-node-configure --shellThis will check your system for statistics that can be gathered safely and create symlinks in the /etc/munin/ directory.
Finally, we need to make munin-node start on boot.
root # rc-update add munin-node defaultAnd then start it.
root # /etd/init.d/munin-node startYou will need to wait a while for munin to output the first set of graphs (it needs time to gather statistics).