munin on FreeBSD 9.0

CONTENTS


Lastmodified 2013-10-08 (火) 17:43:12


munin on FreeBSD 9.1

http://www.kkaneko.com/computer/servers/munin.html

なんだか、munin も、Ver2.xになって、インストールするだけでOKな風味になりつつあります。( ´ ▽ ` )ノ

Apr  4 09:40:33 flora kernel: FreeBSD 9.1-RELEASE #0 r243826: Tue Dec  4 06:55:39 UTC 2012
Apr  4 09:40:33 flora kernel: root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Apr  4 09:40:33 flora kernel: CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2800.16-MHz 686-class CPU)
Apr  4 09:40:33 flora kernel: Origin = "GenuineIntel"  Id = 0xf29  Family = f  Model = 2  Stepping = 9
Apr  4 09:40:33 flora kernel: Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,    HTT,TM,PBE>
Apr  4 09:40:33 flora kernel: Features2=0x4400<CNXT-ID,xTPR>
Apr  4 09:40:33 flora kernel: real memory  = 268435456 (256 MB)
Apr  4 09:40:33 flora kernel: avail memory = 234958848 (224 MB)
Apr  4 09:40:33 flora kernel: Event timer "LAPIC" quality 400
Apr  4 09:40:33 flora kernel: ACPI APIC Table: <HTC    AWRDACPI>
Apr  4 09:40:33 flora kernel: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
Apr  4 09:40:33 flora kernel: FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 HTT threads
Apr  4 09:40:33 flora kernel: cpu0 (BSP): APIC ID:  0
Apr  4 09:40:33 flora kernel: cpu1 (AP/HT): APIC ID:  1
portinstall sysutils/munin-node
portinstall sysutils/munin-master
portinstall sysutils/munin-common これは、munin-node インストール時に同時に入る。2013/04/04

munin-node

インストール時にmuninというユーザがあると、インストールエラーになる。

rmuser では、そんなん居らんいわれる。vipw で消すヨロシ

munin-master

インストールオプションは無くなったった。

インストールエラーがワラワラと(ーー;)なんで?

依存関係でインストールされるうちの一つがこれ。これもエラー

flora{141} % portinstall devel/gio-fam-backend で
/usr/bin/ld: cannot find -lgio-2.0

とか言って、止まる。cannot find -lgio-2.0 とは、「libgio2.0が無いよ」ってことらしい。φ(..)メモメモ

flora{148} % cd /usr/ports/devel/glib20
flora{149} % make reinstall

で、devel/gio-fam-backend は通りました。まだまだ続く(ーー;)

Stop in /usr/ports/devel/gobject-introspection.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20130404-19467-1i7i2z1-0 env make
** Fix the problem and try again.
--->  Skipping 'x11-toolkits/pango' because a requisite port 'devel/gobject-introspection' failed (specify -k to force)
--->  Skipping 'databases/rrdtool' because a requisite port 'x11-toolkits/pango' failed (specify -k to force)
--->  Skipping 'sysutils/munin-master' because a requisite port 'databases/rrdtool' failed (specify -k to force)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
       ! devel/gobject-introspection   (unknown build error)
       * x11-toolkits/pango
       * databases/rrdtool
       * sysutils/munin-master
/usr/bin/ld: warning: libz.so.4, needed by /usr/local/lib/libXft.so, may conflict with libz.so.6
/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libX11.so, not found (try using -rpath or -rpath-link)
/usr/ports/x11-toolkits/pango/work/pango-1.30.1/pango/pango-language-sample-table.h:52: syntax error, unexpected identifier in 'LANGUAGE(' at 'LANGUAGE'
/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libX11.so, not found (try using -rpath or -rpath-link)
Shared object "librpcsvc.so.4" not found, required by "libX11.so.6"
Command '['/usr/ports/x11-toolkits/pango/work/pango-1.30.1/pango/tmp-introspectz8ug_u/Pango-1.0', '--introspect-dump=/usr/ports/x11-toolkits/pango/work/pango-1.30.1/pango/tmp- introspectz8ug_u/functions.txt,/usr/ports/x11-toolkits/pango/work/pango-1.30.1/pango/tmp-introspectz8ug_u/dump.xml']' returned non-zero exit status 1
gmake[4]: *** [Pango-1.0.gir] Error 1
gmake[4]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.30.1/pango'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.30.1/pango'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.30.1/pango'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/x11-toolkits/pango/work/pango-1.30.1'
gmake: *** [all] Error 2
*** [do-build] Error code 1

Stop in /usr/ports/x11-toolkits/pango.
*** [build] Error code 1

Stop in /usr/ports/x11-toolkits/pango.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20130404-35241-12ycrxv-0 env make
** Fix the problem and try again.
--->  Skipping 'databases/rrdtool' because a requisite port 'x11-toolkits/pango' failed (specify -k to force)
--->  Skipping 'sysutils/munin-master' because a requisite port 'databases/rrdtool' failed (specify -k to force)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! x11-toolkits/pango    (unknown build error)
        * databases/rrdtool
        * sysutils/munin-master
flora{153} %
flora{153} %
flora{153} %
flora{153} % locate librpcsvc.so.4
/usr/obj/usr/src/lib/librpcsvc/librpcsvc.so.4
/usr/obj/usr/src/tmp/usr/lib/librpcsvc.so.4
flora{154} % cp /usr/obj/usr/src/lib/librpcsvc/librpcsvc.so.4 /usr/local/lib/
flora{155} % portinstall sysutils/munin-master
############################################################################
# See /usr/local/share/examples/rrdtool for some demonstration code        #
############################################################################
********************************************************************
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'.
********************************************************************
===> Correct pkg-plist sequence to create group(s) and user(s)
===>   Compressing manual pages for munin-master-2.0.11.1
===>   Registering installation for munin-master-2.0.11.1
===>  Cleaning for munin-master-2.0.11.1
flora{156} %

ふぅ~

install ができらた、なんか、勝手に走り出すみたいで、こんなメールが来る。w

munin@kuji-clinic.info (Cron Daemon)
not a reference at /usr/local/lib/perl5/site_perl/5.14.2/Munin/Master/Utils.pm line 947 

muninの設定

munin.conf の設定

FreeBSD で ports を使ってインストールした場合には /usr/local/etc/munin/munin.conf を編集する

# htmldir /usr/local/www/munin
htmldir /usr/local/www/apache22/data/munin

htmldir のオーナの設定

mkdir /usr/local/www/apache22/data/munin
chown -R munin:munin /usr/local/www/apache22/data/munin

(オプション)Apache の httpd.conf の設定の確認

httpd.conf の設定で、CGI が実行できるように設定しておく.

AddHandler cgi-script .cgi

ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"

   AllowOverride None
   Options ExecCGI
   Order allow,deny
   Allow from all

(オプション) munin 用の CGI の設定

flora{156} % mkdir /usr/local/www/apache22/data/munin
flora{157} % chown -R munin:munin /usr/local/www/apache22/data/munin
flora{158} % cd /usr/local/www
flora{159} % ll
total 6
drwxr-xr-x  6 root   wheel  512 Mar 26 17:37 apache22
drwxr-xr-x  2 root   wheel  512 Apr  4 12:14 cgi-bin
drwxr-xr-x  3 munin  munin  512 Apr  4 12:15 munin
flora{160} % cp -rp munin apache22/data
flora{161} % cp cgi-bin/munin-cgi-graph apache22/cgi-bin
flora{162} % echo munin_node_enable="YES" >> /etc/rc.conf
flora{163} % chown -R munin:munin /usr/local/www/apache22/data/munin
flora{164} %

オマケ

munin_nodeの自動起動設定

echo munin_node_enable="YES" >> /etc/rc.conf

munin-node の再起動

FreeBSD で ports を使ってインストールした場合には, 「/usr/local/sbin/munin-node restart 」になる.

「/usr/local/sbin/munin-node restart 

munin-cron の実行

su - munin
/usr/local/bin/munin-cron

Total access 4168:本日 1:昨日 2

Counter: 4168, today: 1, yesterday: 2

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS