Skip to content

Instantly share code, notes, and snippets.

@emanon001
Last active December 13, 2015 18:59
Show Gist options
  • Save emanon001/4959559 to your computer and use it in GitHub Desktop.
Save emanon001/4959559 to your computer and use it in GitHub Desktop.
OS X に Munin サーバとクライアントを導入したときのメモ(現在進行系)

インストール

  1. macports をインストール
  2. /opt/local/bin /opt/local/sbin にパスを通す
  3. sudo port install munin +server

ref. http://munin-monitoring.org/wiki/DarwinInstallation

デーモンとして登録

sudo launchctl load -w /Library/LaunchDaemons/org.macports.munin-cron.plist

localhost/munin で表示されるように apache の設定を変更

/etc/apache2/httpd.conf に以下の設定を追加

Alias /munin /opt/local/www/munin

<Directory /opt/local/www/munin>
  Order allow,deny
  Allow from all
  Options FollowSymLinks SymLinksIfOwnerMatch
</Directory>

ログにエラーが出ているので修正

munin-html

2013/02/15 17:16:38 [FATAL] There is nothing to do here, since there are no nodes with any plugins.  Please refer to http://munin-monitoring.org/wiki/FAQ_no_graphs at /opt/local/lib/munin/munin-html line 38
sudo munin-node-configure --shell | sudo sh -x

munin-node

ファイルないとか言われている

2013/02/15-17:58:57 [41709] Error output from cupsys_pages:
2013/02/15-17:58:57 [41709]   Could not open /opt/local/var/munin/plugin-state/munin-cupsys-pages.state for writing: No such file or directory

/opt/local/var/munin/plugin-state/munin-cupsys-pages.state を作成

権限ないとか言われている

2013/02/15-18:21:01 [44086] Error output from cupsys_pages:
2013/02/15-18:21:01 [44086]   Could not open /opt/local/var/munin/plugin-state/munin-cupsys-pages.state for writing: Permission denied

/opt/local/etc/munin/plugin-conf.d/munin-node に以下の内容を追加

[cupsys_pages]
user root

http_loadtime の謎エラー

2013/02/15-18:46:38 [46301] Error output from http_loadtime:
2013/02/15-18:46:38 [46301] 	usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
2013/02/15-18:46:38 [46301] 	       mktemp [-d] [-q] [-u] -t prefix 

http://munin-monitoring.org/ticket/947 に同様の問題が報告されている。 OS 毎にコマンドのセマンティックが異なることが原因? (どうしろと。。。)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment