munin2
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[munin on FreeBSD 9.0]]
Can't locate Log/Log4perl.pm in @INC (@INC contains: /us...
/usr/local/lib/perl5/site_perl/5.14/mach /usr/local/lib/...
/usr/local/lib/perl5/5.14/mach /usr/local/lib/perl5/5.14...
BEGIN failed--compilation aborted at /usr/local/share/mu...
#contents
munin を「追加オプションなし」で別の機体にインストールし...
perlのプロセスを殺してから、
g7# pwd
/usr/ports/sysutils/munin-node
g7#
g7#
g7#
g7# make rmconfig
===> No user-specified options configured for munin-node...
g7# make deinstall
===> Deinstalling for sysutils/munin-node
===> Deinstalling munin-node-1.4.7
munin_node not running? (check /var/run/munin/munin-node...
==> You should manually remove the "munin" user.
g7# cd ../../sysutils/munin-master
g7# pwd
/usr/ports/sysutils/munin-master
g7# make rmconfig
===> No user-specified options configured for munin-mast...
g7# make deinstall
===> Deinstalling for sysutils/munin-master
===> Deinstalling munin-master-1.4.7_3
crontab for user munin removed
==> You should manually remove the "munin" user.
g7# cd ../../sysutils/munin-common
g7# pwd
/usr/ports/sysutils/munin-common
g7# make rmconfig
===> No user-specified options configured for munin-comm...
g7# make deinstall
===> Deinstalling for sysutils/munin-common
===> Deinstalling munin-common-1.4.7
==> You should manually remove the "munin" user.
した。
さ~入れるよ!
http://www.omakase.org/misc/_munin.html
/usr/local/etc/munin/munin-node.conf
注)追加しないと動かなかった
setsid yes
#
# Example config-file for munin-node
#
log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setsid 1
user root
group wheel
setsid yes ←これこれ
ln -s /usr/local/share/munin/plugins/memory /usr/local/e...
ln -s /usr/local/share/munin/plugins/ipmi_sensor_ /usr/l...
86 8:46 ln -s /usr/local/share/munin/plugins/ipmi...
87 8:46 ln -s /usr/local/share/munin/plugins/memo...
88 8:51 reboot
89 9:05 ln -s /usr/local/share/munin/plugins/cpu ...
90 9:16 reboot
91 9:21 ln -s /usr/local/share/munin/plugins/core...
92 9:25 /usr/local/etc/rc.d/munin-node.sh stop
93 9:26 /usr/local/sbin/munin-node restart
94 9:27 kill -HUP 1424
95 9:27 top
96 9:27 reboot
97 9:51 ln -s /usr/local/share/munin/plugins/snmp...
98 9:52 ln -s /usr/local/share/munin/plugins/snmp...
99 9:53 reboot
http://wirednoize.net/freebsd/index.php?munin%20chroot%20...
http://d.hatena.ne.jp/mteramoto/20090705/p3
http://hankakusai.basekernel.co.jp/cgi-bin/adiary/adiary....
**/usr/local/share/munin/plugins/if_ のFreeBSD9.0用修正...
72行目:
rsum += $7; osum += $10;→ rsum += $8; osum += $11;
87行目と88行目:
print "rbytes.value", $7; print "obytes.value", ...
#!/bin/sh
#
# Wildcard-plugin to monitor network interfaces. To moni...
# interface, link if_<interface> to this file. E.g.
#
# ln -s /usr/share/munin/node/plugins-auto/if_ /etc/m...
#
# ...will monitor eth0.
#
# To aggregate all network interfaces on the system (exc...
# link if_aggregated to this file.
#
# Any device found in /usr/bin/netstat can be monitored.
#
# Magic markers (optional - used by munin-config and som...
# scripts):
#
#%# family=auto
#%# capabilities=autoconf suggest
INTERFACE=`basename $0 | sed 's/^if_//g'`
if [ "$1" = "autoconf" ]; then
if [ -x /usr/bin/netstat ]; then
echo yes
exit 0
else
echo "no (/usr/bin/netstat not found)"
exit 0
fi
fi
if [ "$1" = "suggest" ]; then
if [ -x /usr/bin/netstat ]; then
netstat -i -b -n | sed -n -e '/^faith/d' -e '/^lo[0-9]...
exit 0
else
exit 1
fi
fi
if [ "$1" = "config" ]; then
echo "graph_order rbytes obytes"
echo "graph_title $INTERFACE traffic"
echo 'graph_args --base 1000'
echo 'graph_vlabel bits per ${graph_period} in (-) / ou...
echo 'graph_category network'
echo "graph_info This graph shows the traffic of the $I...
echo 'rbytes.label received'
echo 'rbytes.type DERIVE'
echo 'rbytes.graph no'
echo 'rbytes.cdef rbytes,8,*'
echo 'rbytes.min 0'
echo 'obytes.label bps'
echo 'obytes.type DERIVE'
echo 'obytes.negative rbytes'
echo 'obytes.cdef obytes,8,*'
echo 'obytes.min 0'
echo "obytes.info Traffic sent (+) and received (-) on ...
exit 0
fi
if [ "$INTERFACE" = "aggregated" ]; then
/usr/bin/netstat -i -b -n | grep -v '^lo' | awk '
BEGIN { rsum = 0; osum = 0; }
/<Link#[0-9]*>/ {
if (NF == 10) {
rsum += $6; osum += $9;
} else {
rsum += $8; osum += $11;
}
}
END {
printf "rbytes.value %i\n", rsum;
printf "obytes.value %i\n", osum;
}'
else
/usr/bin/netstat -i -b -n -I $INTERFACE | awk '
/<Link#[0-9]*>/ {
if (NF == 10) {
print "rbytes.value", $6;
print "obytes.value", $9;
} else if (NF == 11) {
print "rbytes.value", $8;
print "obytes.value", $11;
} else {
print "rbytes.value", $8;
print "obytes.value", $11;
}
}'
fi
終了行:
[[munin on FreeBSD 9.0]]
Can't locate Log/Log4perl.pm in @INC (@INC contains: /us...
/usr/local/lib/perl5/site_perl/5.14/mach /usr/local/lib/...
/usr/local/lib/perl5/5.14/mach /usr/local/lib/perl5/5.14...
BEGIN failed--compilation aborted at /usr/local/share/mu...
#contents
munin を「追加オプションなし」で別の機体にインストールし...
perlのプロセスを殺してから、
g7# pwd
/usr/ports/sysutils/munin-node
g7#
g7#
g7#
g7# make rmconfig
===> No user-specified options configured for munin-node...
g7# make deinstall
===> Deinstalling for sysutils/munin-node
===> Deinstalling munin-node-1.4.7
munin_node not running? (check /var/run/munin/munin-node...
==> You should manually remove the "munin" user.
g7# cd ../../sysutils/munin-master
g7# pwd
/usr/ports/sysutils/munin-master
g7# make rmconfig
===> No user-specified options configured for munin-mast...
g7# make deinstall
===> Deinstalling for sysutils/munin-master
===> Deinstalling munin-master-1.4.7_3
crontab for user munin removed
==> You should manually remove the "munin" user.
g7# cd ../../sysutils/munin-common
g7# pwd
/usr/ports/sysutils/munin-common
g7# make rmconfig
===> No user-specified options configured for munin-comm...
g7# make deinstall
===> Deinstalling for sysutils/munin-common
===> Deinstalling munin-common-1.4.7
==> You should manually remove the "munin" user.
した。
さ~入れるよ!
http://www.omakase.org/misc/_munin.html
/usr/local/etc/munin/munin-node.conf
注)追加しないと動かなかった
setsid yes
#
# Example config-file for munin-node
#
log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid
background 1
setsid 1
user root
group wheel
setsid yes ←これこれ
ln -s /usr/local/share/munin/plugins/memory /usr/local/e...
ln -s /usr/local/share/munin/plugins/ipmi_sensor_ /usr/l...
86 8:46 ln -s /usr/local/share/munin/plugins/ipmi...
87 8:46 ln -s /usr/local/share/munin/plugins/memo...
88 8:51 reboot
89 9:05 ln -s /usr/local/share/munin/plugins/cpu ...
90 9:16 reboot
91 9:21 ln -s /usr/local/share/munin/plugins/core...
92 9:25 /usr/local/etc/rc.d/munin-node.sh stop
93 9:26 /usr/local/sbin/munin-node restart
94 9:27 kill -HUP 1424
95 9:27 top
96 9:27 reboot
97 9:51 ln -s /usr/local/share/munin/plugins/snmp...
98 9:52 ln -s /usr/local/share/munin/plugins/snmp...
99 9:53 reboot
http://wirednoize.net/freebsd/index.php?munin%20chroot%20...
http://d.hatena.ne.jp/mteramoto/20090705/p3
http://hankakusai.basekernel.co.jp/cgi-bin/adiary/adiary....
**/usr/local/share/munin/plugins/if_ のFreeBSD9.0用修正...
72行目:
rsum += $7; osum += $10;→ rsum += $8; osum += $11;
87行目と88行目:
print "rbytes.value", $7; print "obytes.value", ...
#!/bin/sh
#
# Wildcard-plugin to monitor network interfaces. To moni...
# interface, link if_<interface> to this file. E.g.
#
# ln -s /usr/share/munin/node/plugins-auto/if_ /etc/m...
#
# ...will monitor eth0.
#
# To aggregate all network interfaces on the system (exc...
# link if_aggregated to this file.
#
# Any device found in /usr/bin/netstat can be monitored.
#
# Magic markers (optional - used by munin-config and som...
# scripts):
#
#%# family=auto
#%# capabilities=autoconf suggest
INTERFACE=`basename $0 | sed 's/^if_//g'`
if [ "$1" = "autoconf" ]; then
if [ -x /usr/bin/netstat ]; then
echo yes
exit 0
else
echo "no (/usr/bin/netstat not found)"
exit 0
fi
fi
if [ "$1" = "suggest" ]; then
if [ -x /usr/bin/netstat ]; then
netstat -i -b -n | sed -n -e '/^faith/d' -e '/^lo[0-9]...
exit 0
else
exit 1
fi
fi
if [ "$1" = "config" ]; then
echo "graph_order rbytes obytes"
echo "graph_title $INTERFACE traffic"
echo 'graph_args --base 1000'
echo 'graph_vlabel bits per ${graph_period} in (-) / ou...
echo 'graph_category network'
echo "graph_info This graph shows the traffic of the $I...
echo 'rbytes.label received'
echo 'rbytes.type DERIVE'
echo 'rbytes.graph no'
echo 'rbytes.cdef rbytes,8,*'
echo 'rbytes.min 0'
echo 'obytes.label bps'
echo 'obytes.type DERIVE'
echo 'obytes.negative rbytes'
echo 'obytes.cdef obytes,8,*'
echo 'obytes.min 0'
echo "obytes.info Traffic sent (+) and received (-) on ...
exit 0
fi
if [ "$INTERFACE" = "aggregated" ]; then
/usr/bin/netstat -i -b -n | grep -v '^lo' | awk '
BEGIN { rsum = 0; osum = 0; }
/<Link#[0-9]*>/ {
if (NF == 10) {
rsum += $6; osum += $9;
} else {
rsum += $8; osum += $11;
}
}
END {
printf "rbytes.value %i\n", rsum;
printf "obytes.value %i\n", osum;
}'
else
/usr/bin/netstat -i -b -n -I $INTERFACE | awk '
/<Link#[0-9]*>/ {
if (NF == 10) {
print "rbytes.value", $6;
print "obytes.value", $9;
} else if (NF == 11) {
print "rbytes.value", $8;
print "obytes.value", $11;
} else {
print "rbytes.value", $8;
print "obytes.value", $11;
}
}'
fi
ページ名: