Server Monitoring mit munin

Munin is a tool for graphing all sorts of information about one or more servers and displaying it in a web interface. It uses the execellent RRDTool (written by Tobi Oetiker) and is written in Perl. Munin has a master/node architecture. The master connects to all the nodes at regular intervals, and asks them for data. It then stores the data in RRD-files, and (if needed) updates the graphs. One of the main goals has been ease of creating own “plugins” (graphs). Quelle: http://www.linpro.no/projects/munin/

munin auf einem RedHat basierten System

UP

Munin auf Debian Sarge

apt suche

:~# apt-cache search munin
mailping - monitor email service availability and functioning
munin - network-wide graphing framework (grapher/gatherer)
munin-node - network-wide graphing framework (node)

UP

munin-installation

apt-get install munin munin-node
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  libfreetype6 libgd2-noxpm libhtml-template-perl libio-multiplex-perl libjpeg62
  libnet-server-perl libpng12-0 librrd0 librrds-perl
Suggested packages:
  libfreetype6-dev libgd-tools libipc-sharedcache-perl libio-socket-ssl-perl httpd
  rrdtool libwww-perl libnet-irc-perl mysql-client smartmontools acpi lm-sensors ethtool
Recommended packages:
  libdate-manip-perl libnet-snmp-perl
The following NEW packages will be installed:
  libfreetype6 libgd2-noxpm libhtml-template-perl libio-multiplex-perl libjpeg62
  libnet-server-perl libpng12-0 librrd0 librrds-perl munin munin-node
0 upgraded, 11 newly installed, 0 to remove and 3 not upgraded.
Need to get 1402kB of archives.
After unpacking 4235kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://update.pureserver.info stable/main libfreetype6 2.1.7-2.4 [364kB]
Get:2 http://update.pureserver.info stable/main libjpeg62 6b-10 [80.9kB]
Get:3 http://update.pureserver.info stable/main libpng12-0 1.2.8rel-1 [115kB]
Get:4 http://update.pureserver.info stable/main libgd2-noxpm 2.0.33-1.1 [193kB]
Get:5 http://update.pureserver.info stable/main libhtml-template-perl 2.6-2 [62.4kB]
Get:6 http://update.pureserver.info stable/main libio-multiplex-perl 1.08-1 [21.9kB]
Get:7 http://update.pureserver.info stable/main libnet-server-perl 0.87-3 [127kB]
Get:8 http://update.pureserver.info stable/main librrd0 1.0.49-1 [73.2kB]
Get:9 http://update.pureserver.info stable/main librrds-perl 1.0.49-1 [37.8kB]
Get:10 http://update.pureserver.info stable/main munin 1.2.3-1 [145kB]
Get:11 http://update.pureserver.info stable/main munin-node 1.2.3-1 [182kB]
Fetched 1402kB in 1s (930kB/s)   
Selecting previously deselected package libfreetype6.
(Reading database ... 22681 files and directories currently installed.)
Unpacking libfreetype6 (from .../libfreetype6_2.1.7-2.4_i386.deb) ...
Selecting previously deselected package libjpeg62.
Unpacking libjpeg62 (from .../libjpeg62_6b-10_i386.deb) ...
Selecting previously deselected package libpng12-0.
Unpacking libpng12-0 (from .../libpng12-0_1.2.8rel-1_i386.deb) ...
Selecting previously deselected package libgd2-noxpm.
Unpacking libgd2-noxpm (from .../libgd2-noxpm_2.0.33-1.1_i386.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.6-2_all.deb) ...
Selecting previously deselected package libio-multiplex-perl.
Unpacking libio-multiplex-perl (from .../libio-multiplex-perl_1.08-1_all.deb) ...
Selecting previously deselected package libnet-server-perl.
Unpacking libnet-server-perl (from .../libnet-server-perl_0.87-3_all.deb) ...
Selecting previously deselected package librrd0.
Unpacking librrd0 (from .../librrd0_1.0.49-1_i386.deb) ...
Selecting previously deselected package librrds-perl.
Unpacking librrds-perl (from .../librrds-perl_1.0.49-1_i386.deb) ...
Selecting previously deselected package munin.
Unpacking munin (from .../archives/munin_1.2.3-1_all.deb) ...
Selecting previously deselected package munin-node.
Unpacking munin-node (from .../munin-node_1.2.3-1_all.deb) ...
Setting up libfreetype6 (2.1.7-2.4) ...
Setting up libjpeg62 (6b-10) ...
Setting up libpng12-0 (1.2.8rel-1) ...
Setting up libgd2-noxpm (2.0.33-1.1) ...
Setting up libhtml-template-perl (2.6-2) ...
Setting up libio-multiplex-perl (1.08-1) ...
Setting up libnet-server-perl (0.87-3) ...
Setting up librrd0 (1.0.49-1) ...
Setting up librrds-perl (1.0.49-1) ...
Setting up munin (1.2.3-1) ...
Adding system user `munin'...
Adding new group `munin' (103).
Adding new user `munin' (103) with group `munin'.
Not creating home directory.
Setting up munin-node (1.2.3-1) ...
Initializing plugins..done.
Starting munin-node: done.

UP

Konfiguration

munin.conf

munin.conf

dbdir   /var/lib/munin
htmldir /openpkg/var/apache2/www/html/munin
logdir  /var/log/munin
rundir  /var/run/munin
tmpldir /etc/munin/templates

[www.zyklopaedie.de]
    address 127.0.0.1
    use_node_name yes

UP

munin-node

./plugin-conf.d/munin-node

[mysql*]
user root
env.mysqlopts -u readuser --password '***' --defaults-extra-file=/openpkg/etc/mysql/my.cnf

UP

httpd.conf

In Debian besteht leider keine automatische Abhängigkeit zum libwww-perl Paket, so dass die Apache-Monitoring Skripte zunächst nicht funktionieren. Abhilfe schaffen folgende Befehle:

libwww installieren

apt-get install libcrypt-ssleay-perl libwww-perl
perl -MLWP -e 'print $LWP::VERSION'
perl -le 'use LWP; print join "\n", grep /LWP/, keys %INC;'

UP

httpd.conf

ExtendedStatus On
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from 217.160.180.134
</Location>
<VirtualHost ip.ad.dr.ess:80>
    ServerAdmin webmaster@yourserver.de
    DocumentRoot /openpkg/var/apache2/www/html
    ServerName monitor.yourserver.de
<Directory /openpkg/var/apache2/www/html/munin/cgi>
    Options +FollowSymLinks +ExecCGI +Indexes +MultiViews
    SetHandler cgi-script
    AllowOverride All
    DirectoryIndex index.html index.php index.php3
</Directory>
</VirtualHost>

UP

 
wissen/gpl/monitoring/munin/munin_with_debian_and_openpkg.txt · Zuletzt geändert: 05.09.2010 20:31
 
Recent changes RSS feed Donate Valid XHTML 1.0 Valid CSS Recent cached RSS feed cacert-signed web site: inhalt.serviert.de