Munin/スクリプト
の編集
http://www.sssc.cc/wiki/index.php?Munin/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88
[
トップ
] [
編集
|
差分
|
履歴
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
**スクリプト [#ze83afc0] #contents ---- ***起動スクリプト [#ee986bb7] &{sourcedir}/dists/redhat以下にサンプル。 #! /bin/sh # # munin-node Control the Munin Node Server (formerly Linpro RRD client) # # chkconfig: 2345 90 10 # description: munin node agents # processname: munin-node # config: /etc/munin/munin-node.conf # pidfile: /var/run/munin/munin-node.pid # Source function library. . /etc/rc.d/init.d/functions RETVAL=0 PROCNAME=munin-node #mkdir -p /var/run/munin 2>/dev/null #chown munin /var/run/munin # See how we were called. case "$1" in start) echo -n "Starting Munin Node: " /usr/local/munin/sbin/munin-node & sleep 1 pkill -0 $PROCNAME RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success touch /var/lock/subsys/munin-node else echo_failure fi echo ;; stop) echo -n "Stopping Munin Node agents: " kill $(cat /usr/local/munin/var/run/munin-node.pid) RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success rm -f /var/lock/subsys/munin-node else echo_failure fi echo ;; status) status $PROCNAME RETVAL=$? ;; restart|reload) $0 stop $0 start RETVAL=$? ;; *) echo "Usage: munin-node {start|stop|status|restart}" exit 1 esac exit $RETVAL ***cron.dスクリプト(マスターサーバ) [#qc76c749] cp munin.cron.d /etc/cron.d/munin 内容は MAILTO=root */5 * * * * daemon test -x /usr/local/munin/bin/munin-cron && /usr/local/munin/bin/munin-cron
タイムスタンプを変更しない
**スクリプト [#ze83afc0] #contents ---- ***起動スクリプト [#ee986bb7] &{sourcedir}/dists/redhat以下にサンプル。 #! /bin/sh # # munin-node Control the Munin Node Server (formerly Linpro RRD client) # # chkconfig: 2345 90 10 # description: munin node agents # processname: munin-node # config: /etc/munin/munin-node.conf # pidfile: /var/run/munin/munin-node.pid # Source function library. . /etc/rc.d/init.d/functions RETVAL=0 PROCNAME=munin-node #mkdir -p /var/run/munin 2>/dev/null #chown munin /var/run/munin # See how we were called. case "$1" in start) echo -n "Starting Munin Node: " /usr/local/munin/sbin/munin-node & sleep 1 pkill -0 $PROCNAME RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success touch /var/lock/subsys/munin-node else echo_failure fi echo ;; stop) echo -n "Stopping Munin Node agents: " kill $(cat /usr/local/munin/var/run/munin-node.pid) RETVAL=$? if [ $RETVAL -eq 0 ] then echo_success rm -f /var/lock/subsys/munin-node else echo_failure fi echo ;; status) status $PROCNAME RETVAL=$? ;; restart|reload) $0 stop $0 start RETVAL=$? ;; *) echo "Usage: munin-node {start|stop|status|restart}" exit 1 esac exit $RETVAL ***cron.dスクリプト(マスターサーバ) [#qc76c749] cp munin.cron.d /etc/cron.d/munin 内容は MAILTO=root */5 * * * * daemon test -x /usr/local/munin/bin/munin-cron && /usr/local/munin/bin/munin-cron
テキスト整形のルールを表示する