Munin je odprtokodno orodje za analizo omrežnega prometa, porabe resorsov…ki izhodne podatke pretvori v grafe in omogoča ogled preko Web vmesnika. Uporablja RRDtools in je napisan v programske jeziku Pearl. Na voljo imate preko 500 vmesnikov. Osnovni način delovanje je master plus nodes. Master se v določenih časovnih intervalih poveže z nodi in tako pridobi nove podatke, ki se potem shranijo v RRD datoteke.


Namestitev na Debian operacijski sistem:

1. Paket prenesemo z ukazom:

apt-get install munin munin-node

Tako smo naložili munin (server) in munin-node(klienta)


2. Sedaj bomo prvo nastavili server. Odpremo datoteko “/etc/munin/munin.conf

# Example configuration file for Munin, generated by ‘make build’# The next three variables specifies where the location of the RRD
# databases, the HTML output, logs and the lock/pid files.  They all
# must be writable by the user running munin-cron.  They are all
# defaulted to the values you see here.
dbdir   /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir  /var/run/munin

# Where to look for the HTML templates
# tmpldir       /etc/munin/templates# (Exactly one) directory to include all files from.
includedir /etc/munin/munin-conf.d

# Make graphs show values per minute instead of per second
#graph_period minute

# Graphics files are normaly generated by munin-graph, no matter if
# the graphs are used or not.  You can change this to
# on-demand-graphing by following the instructions in
#graph_strategy cgi

# munin-cgi-graph is invoked by the web server up to very many times at the
# same time.  This is not optimal since it results in high CPU and memory
# consumption to the degree that the system can thrash.  Again the default is
# 6.  Most likely the optimal number for max_cgi_graph_jobs is the same as
# max_graph_jobs.
#munin_cgi_graph_jobs 6

# If the automatic CGI url is wrong for your system override it here:
#cgiurl_graph /cgi-bin/munin-cgi-graph

# munin-graph runs in parallel, the number of concurrent processes is
# 6.  If you want munin-graph to not be parallel set to 0.  If set too
# high it will slow down munin-graph.  Some experiments are needed to
# determine how many are optimal on your system.  On a multi-core
# system with good SCSI disks the number can probably be quite high.
#max_graph_jobs 6

# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
#contact.someuser.command mail -s “Munin notification” somejuser@fnord.comm
#contact.anotheruser.command mail -s “Munin notification” anotheruser@blibb.comm
# For those with Nagios, the following might come in handy. In addition,
# the services must be defined in the Nagios server as well.
#contact.nagios.command /usr/bin/send_nsca -c /etc/nsca.conf

# a simple host tree
use_node_name yes



Ker je naš Web direktorij “var/www”, privzet dir ob namestitvi pa je “/var/cache/munin/www”, moramo skopirati www v nov direktorij “/var/www/munin”. To storimo z ukazom:

cp -R /var/cache/munin/www /var/www/munin

Sedaj moramo še nastaviti lastništvo za “munin”

chown -R munin /var/www/munin


Da bo zadeva začela delovati, moramo dodati virutal host v apache, da bomo laho dostopali do našega vmesnika preko brskalnika. Virtual host dodamo v datoteko “/etc/apache2/sites-available/default”

<VirtualHost *:80>
ServerAdmin webmaster@localhostDocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory “/usr/lib/cgi-bin”>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ “/usr/share/doc/”
<Directory “/usr/share/doc/”>
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from ::1/128


<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/munin
<Directory />
Options FollowSymLinks
AllowOverride None
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel notice
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
ServerSignature On




Popraviti moramo tudi parametre v munin alias, ki je v direktoriju “etc/apache2/conf.d/munin”

Alias /munin /var/www/munin
<Directory /var/www/munin>
Order allow,deny
Allow from all
Options None# This file can be used as a .htaccess file, or a part of your apache
# config file.
# For the .htaccess file option to work the munin www directory
# (/var/cache/munin/www) must have “AllowOverride all” or something
# close to that set.
## AuthUserFile /etc/munin/munin-htpasswd
# AuthName “Munin”
# AuthType Basic
# require valid-user

# This next part requires mod_expires to be enabled.

# Set the default expiration time for files to 5 minutes 10 seconds from
# their creation (modification) time.  There are probably new files by
# that time.

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault M310



Za konec ponovno zaženemo apache servis:

service apache2 restart


Za dostop do munin vmesnika sedaj v URL vnesemo IP naslov strežnika /munin



Slike iz vmesnika:


Dostop do Munina morate obvezno zaščititi z “htaccess”. Kako nastavite htaccess lahko prebrete v članku “Apache htaccess” v meniju Splošno.

4 Responses to Munin

  • May I simply just say what a comfort to find somebody who genuinely understands what they are talking about online.
    You certainly realize how to bring a problem to light and make it important.
    More and more people really need to look at this and
    understand this side of your story. I was surprised that you are not more popular given that you most
    certainly possess the gift.

  • admin says:

    Thanks 😉 . If you know for any good open source software (security related) yust write to me and i will publish it.

  • When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get three emails with
    the same comment. Is there any way you can remove me from that service?
    Many thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Internetna zaščita

Copyright © 2013. All Rights Reserved.