[PukiWiki:wiki] BSD/FreeBSD/Munin

最終更新日: 2009/10/22 10:01:12

Munin Memo

Install

# portinstall databases/rrdtool

See /usr/local/share/examples/rrdtool for some demonstration code

# portinstall sysutils/munin-node

Would you like me to create it [y]? [Enter]

********************************************************************
Unless this file already existed, a sample configuration file
has been placed in /usr/local/etc/munin/munin-node.conf.

Please edit it according to your needs.

********************************************************************

The Munin client will *not* be started automatically. To allow it
to start, put this line in /etc/rc.conf:

munin_node_enable="YES"

Then, it will be started on the next boot. If this line is already
present, the client will be started now.  Otherwise, edit
/etc/rc.conf and execute this command:

    /usr/local/etc/rc.d/munin-node.sh start
********************************************************************

Would you like me to set up log rotation [y]? [Enter]

# portinstall sysutils/munin-main

Would you like me to create it [y]? [Enter]

********************************************************************
Unless this file already existed, a sample configuration file
has been placed in /usr/local/etc/munin/munin.conf.

Please edit it according to your needs.

The Munin server will be run from cron under the user 'munin'.
********************************************************************

# vi /etc/rc.conf

munin_node_enable="YES"

# /usr/local/etc/rc.d/munin-node.sh start

Setting

# vi /usr/local/etc/apache22/Includes/munin.conf

Alias /munin/ "/usr/local/www/munin/"

<Directory "/usr/local/www/munin/">
  Options FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

mbmon

# ln -s /usr/local/share/munin/plugins/mbmon_ /usr/local/etc/munin/plugins/mbmon_FAN
# ln -s /usr/local/share/munin/plugins/mbmon_ /usr/local/etc/munin/plugins/mbmon_Voltage
# ln -s /usr/local/share/munin/plugins/mbmon_ /usr/local/etc/munin/plugins/mbmon_TEMP

# vi /usr/local/etc/munin/plugin-conf.d/plugins.conf

[mbmon*]
env.mbmon /usr/local/bin/mbmon

# /usr/local/etc/rc.d/munin-node.sh restart

Apache

# portinstall www/p5-libwww
# rehash
# /usr/local/etc/rc.d/apache22 restart

# ln -s /usr/local/share/munin/plugins/apache_accesses /usr/local/etc/munin/plugins/apache_accesses
# ln -s /usr/local/share/munin/plugins/apache_processes /usr/local/etc/munin/plugins/apache_processes
# ln -s /usr/local/share/munin/plugins/apache_volume /usr/local/etc/munin/plugins/apache_volume

# /usr/local/etc/rc.d/munin-node.sh restart

MySQL

# ln -s /usr/local/share/munin/plugins/mysql_bytes /usr/local/etc/munin/plugins/mysql_bytes
# ln -s /usr/local/share/munin/plugins/mysql_queries /usr/local/etc/munin/plugins/mysql_queries
# ln -s /usr/local/share/munin/plugins/mysql_slowqueries /usr/local/etc/munin/plugins/mysql_slowqueries
# ln -s /usr/local/share/munin/plugins/mysql_threads /usr/local/etc/munin/plugins/mysql_threads

# /usr/local/etc/rc.d/munin-node.sh restart

Link

IPMItoolの出力をmuninでグラフ化する - mteramotoの日記