スポンサーサイト

一定期間更新がないため広告を表示しています

  • 2023.06.28 Wednesday
  • -
  • -
  • -
  • by スポンサードリンク

MUNINをFreeBSDにインストールするメモ

最初はRRDtoolか、Cactiを入れようと思っていたんだけれどMUNINが簡単だよというギガジンだかの記事を見てmuninを入れるに至ったんですが、これがヒジョーーーーに手こずりまして、一番最初に手を出したのが8月のはじめ、しばらく放置してやっとまともに動き出したのが先という状態。
しかもまだMySQLの部分はエラーが残っていたり...orz

一発でインストールに至らなかったので、いろいろとやっている内に何が何だかわからなくなってしまったメモ。(そういうのはメモにならないとも思うのだけれども)



まずはmunin-nodeをインストール
# cd /usr/ports/sysutils/munin-node
# make install

===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
=> munin-1.4.4.tar.gz doesn't seem to exist in /usr/ports/distfiles/.

(中略)

mv /usr/local/share/munin/plugins/*.adv /usr/local/share/munin
mv: rename /usr/local/share/munin/plugins/*.adv to /usr/local/share/munin/*.adv: No such file or directory
gmake: [install-plugins-prime] エラー 1 (無視されました)
./install-sh -m 0644 build/plugins/plugins.history /usr/local/share/munin/plugins/
./install-sh -m 0644 build/plugins/plugin.sh /usr/local/share/munin/plugins/
Initializing new plugins..done.
Would you like me to set up log rotation [y]? y
********************************************************************
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 start
********************************************************************
===> Installing rc.d startup script(s)
===>   Compressing manual pages for munin-node-1.4.4
===>   Registering installation for munin-node-1.4.4

# rehash
エラーとか出たけどとりあえず完了。
そして指示通り、
# ee /usr/etc/rc.conf

munin_node_enable="YES"
を追加。

以下は、いろんなサイトを見ての設定。

まずは、munin-node.conf
# aee /usr/local/etc/munin/munin-node.conf

#user root
#group wheel
user munin
group munin

#
host_name SERVER_NAME
次にmuninディレクトリをmunin(ユーザ:グループ)にくれてやる
# chown -R munin:munin /var/munin/
# chown -R munin:munin /var/log/munin/
# chown -R munin:munin /var/run/munin/
# chown -R munin:munin /usr/local/www/munin/
そして、httpd.confに上述した一番下のmuninディレクトリのエイリアスを作る。
ここらへんまでやって
# /usr/local/etc/rc.d/munin-node start
してやると他のサイトの説明では動く状態になるということだったのだが、ウチの環境では全く動かない。何も表示されない。

どうやら html ファイルも作られていないようだ。
ここからゴチャゴチャとやり始める。

しばらくしてグーグル先生が「"munin-master"も入れよ」と教えてくれたので、
# cd /usr/ports/sysutils/munin-master/
# make install

===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Extracting for munin-master-1.4.4

===>   pango-1.28.1 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of x11-toolkits/pango
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

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

Stop in /usr/ports/databases/rrdtool.
*** Error code 1

Stop in /usr/ports/databases/rrdtool.
*** Error code 1

Stop in /usr/ports/sysutils/munin-master.
俺「先生!ストップエラーです(泣)」
deinstallしろとか、reinstallしろとかあるのでやって見るも全然ムダ。
無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄無駄。

しかたないので、
# cd /usr/ports/x11-toolkits/pango/
# make install
とか
# cd /usr/ports/databases/rrdtool/
# make install
とか
# cd /usr/ports/graphics/cairo/
# make install

色々と。
どれもこれも一筋縄ではいかず、ストップエラーを繰り返しいろんなportsの*installを繰り返すという泥沼にはまった。

今現在、muninは動いているのだが、phpMyAdminのログインページが開かなくなってしまったりしている....orz
誰か助けてーーー!

そんな、MUNINもそこそこ安定稼働しはじめたので、欲を出してapacheの状態なんかも見たいなと思いはじめる。
# ln -s /usr/local/share/munin/plagins/apache_accesses /usr/local/etc/munin/plugins/
# ln -s /usr/local/share/munin/plagins/apache_processes /usr/local/etc/munin/plugins/
# ln -s /usr/local/share/munin/plagins/apache_volume /usr/local/etc/munin/plugins/
ググって参考にしてきたサイトによるとpluginを追加してやれば簡単に追加が可能という事だったけど、これもやはり一発では行かない。
server-status はすでに表示できるようにしてあるし、httpd.conf の設定は関係ない。
これはしばし放置。
グラフは一晩寝たら表示されるようになったが中身(データ)が無かった。

原因調査を開始。
# munin-run apache_accesses
LWP::UserAgent not found at /usr/local/etc/munin/plugins/apache_accesses line 86.
"LWP::UserAgent"が無いって?
なにそれー?

で、先生曰くコレらしい。
# cd /usr/ports/www/p5-LWP-UserAgent-Determined
# make install
ちゃんとグラフが出たよ!
なので気をよくして、
postfix_mailqueue
postfix_mailstats
postfix_mailvolume

mysql_
mysql_bytes
mysql_innodb
mysql_isam_space_
mysql_queries
mysql_slowqueries
mysql_threads
あたりも追加してみるが・・・・・・
# munin-run mysql_
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.9/BSDPAN /usr/local/lib/perl5/site_perl/5.8.9/mach /usr/local/lib/perl5/site_perl/5.8.9 /usr/local/lib/perl5/5.8.9/mach /usr/local/lib/perl5/5.8.9 .) at /usr/local/etc/munin/plugins/mysql_ line 113.
BEGIN failed--compilation aborted at /usr/local/etc/munin/plugins/mysql_ line 113.

/usr/local/sbin/munin-run --servicedir /usr/local/share/munin/plugins/ mysql_ autoconf
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.9/BSDPAN /usr/local/lib/perl5/site_perl/5.8.9/mach /usr/local/lib/perl5/site_perl/5.8.9 /usr/local/lib/perl5/5.8.9/mach /usr/local/lib/perl5/5.8.9 .) at /usr/local/share/munin/plugins//mysql_ line 113.
BEGIN failed--compilation aborted at /usr/local/share/munin/plugins//mysql_ line 113.
エラー!
なんかよくわからない。しばらく放置するコトにしよう。

uptimeをチェック
# /usr/local/sbin/munin-run --servicedir /usr/local/share/munin/plugins/ uptime autoconf
yes
YES!なので追加。
さらに追加。
# ln -s /usr/local/share/munin/plugins/apc_envunit_ /usr/local/etc/munin/plugins/
# ln -s /usr/local/share/munin/plugins/apc_nis /usr/local/etc/munin/plugins/
# ln -s /usr/local/share/munin/plugins/memcached_ /usr/local/etc/munin/plugins/
APCのグラフが出ない。
チェックではmemchacedはインストールされてないと表示される。
えー?入れたはず。ま、コレも放置。

APCの導入もヒジョーーーーーーーーーーーーーーーーーーーーーーーーに手こずって、どうもGDに原因があったように思うのだけれども結局原因は不明のままなんとなく動くようになった。

いらないグラフを削除。
# rm if_errcoll_fw*
# rm if_errcoll_plip0
# rm ntp_*
# rm sendmail_mail*
消したはずなのに消えてなかったり、グラフに反映されるまでにずいぶんと時間がかかった。muninは設定してから一晩くらいおいて確認するのがいいのかもしれないw
いや、きっとオイラの設定のしかたが悪いに違いないのだ。

*
チェック一覧(yes分のみ)
# munin-node-configure

Plugin                     | Used | Extra information                     
------                     | ---- | -----------------                     
apache_accesses            | yes  |                                       
apache_processes           | yes  |                                       
apache_volume              | yes  |                                       
apc_envunit_               | yes  |                                       
apc_nis                    | yes  |                                       
cpu                        | yes  |                                       
df                         | yes  |                                       
df_inode                   | yes  |                                       
if_                        | yes  | fxp0                                  
if_errcoll_                | yes  | fxp0                                  
iostat                     | yes  |                                       
load                       | yes  |                                       
memcached_                 | yes  |                                       
memory                     | yes  |                                       
munin_stats                | yes  |                                       
mysql_                     | yes  |                                       
mysql_bytes                | yes  |                                       
mysql_innodb               | yes  |                                       
mysql_isam_space_          | yes  |                                       
mysql_queries              | yes  |                                       
mysql_slowqueries          | yes  |                                       
mysql_threads              | yes  |                                       
netstat                    | yes  |                                       
open_files                 | yes  |                                       
postfix_mailqueue          | yes  |                                       
postfix_mailstats          | yes  |                                       
postfix_mailvolume         | yes  |                                       
processes                  | yes  |                                       
swap                       | yes  |                                       
systat                     | yes  |                                       
uptime                     | yes  |                                       
users                      | yes  |                                       
vmstat                     | yes  |                                       
#
***
参考にしたサイト:


スポンサーサイト

  • 2023.06.28 Wednesday
  • -
  • 18:45
  • -
  • -
  • by スポンサードリンク

コメント
コメントする








   
この記事のトラックバックURL
トラックバック

PR

calendar

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      
<< March 2024 >>

(´・ω・)<あまぞーん

selected entries

categories

archives

recent comment

  • アメブロの改行がやたらと多い理由をいまごろ知ったよ。
    RIP
  • 民主党最強のブーメラン使い。鳩山首相の長男を襲う(笑)
    ecco mens shoes
  • "hoge.xlsx"を"DL"したら"hoge.zip"になった件
    stussy clothing
  • 定山渓熊牧場の羆があれから約1年で半分くらいになっちゃったみたいなんですけどね。
    茉里ママ
  • 定山渓熊牧場の羆があれから約1年で半分くらいになっちゃったみたいなんですけどね。
    茉里ママ
  • 定山渓熊牧場の羆があれから約1年で半分くらいになっちゃったみたいなんですけどね。
    AGGY
  • 定山渓熊牧場の羆があれから約1年で半分くらいになっちゃったみたいなんですけどね。
    名無し
  • 定山渓熊牧場の羆があれから約1年で半分くらいになっちゃったみたいなんですけどね。
    第一書記
  • 最近「定山渓クマ牧場」が気になっているのだが
    AGGY
  • 最近「定山渓クマ牧場」が気になっているのだが
    鷹氏

recent trackback

recommend

CYBER・D端子ケーブル(Wii用)
CYBER・D端子ケーブル(Wii用) (JUGEMレビュー »)

価格も安くてクッキリ画質。すべてのWiiユーザーにオススメ。

recommend

僕の私の塊魂 PSP the Best
僕の私の塊魂 PSP the Best (JUGEMレビュー »)

ミュージックもステキです。

recommend

パタポン2 ドンチャカ ♪
パタポン2 ドンチャカ ♪ (JUGEMレビュー »)

中毒性アリ。イージーモードならリズム感それほど必要ナシ。

recommend

ドラゴンクエストIX 星空の守り人
ドラゴンクエストIX 星空の守り人 (JUGEMレビュー »)

ロシアでもすれ違い通信が出来るのだろうか?

recommend

recommend

トップをねらえ! Vol.1
トップをねらえ! Vol.1 (JUGEMレビュー »)

主人公はノリコ。主題歌は酒井法子。主題歌の人はともかく作品は必見です。

recommend

recommend

recommend

コンティニューvol.50
コンティニューvol.50 (JUGEMレビュー »)
鶴巻 和哉,貞本 義行,中村 佑介,仲村 みう,谷口 悟朗

recommend

Cut (カット) 2009年 08月号 [雑誌]
Cut (カット) 2009年 08月号 [雑誌] (JUGEMレビュー »)

メガネ美人はかわいさ2割り増し。

links

profile

search this site.

others

mobile

qrcode

powered

無料ブログ作成サービス JUGEM