Navigation : Top / Linux / Muninを使って稼動状況をモニター

Muninを使って稼動状況をモニター

Linux アプリケーション

Munin: 監視

Install

  • apt-get install munin-node
  • apt-get install munin

Setup

  • /etc/munin/munin-node.conf の設定
    • 以下のコメントを外す
      htmldir /var/cache/munin/www
      staticdir /etc/munin/static
      cgiurl_graph /munin-cgi/munin-cgi-graph
  • munin-node 起動
    • service munin-node restart
  • 接続確認
    • telnet localhost 4949

Nginx:Webサーバー

Install

  • apt-get install nginx

Setup

  • /etc/nginx/sites-enabled/default
    • 以下のlocationの行を2箇所追加
      server {
       listen 80 default_server;
       server_name example.com;
       root /var/www/example.com;
       index index.html index.htm;
      
       location ^~ /munin/static/ {
         alias /etc/munin/static/;
       }
      
       location ^~ /munin/ {
         alias /var/cache/munin/www/;
       }
      }
  • service nginx restart
  • access check

lm-sensorを追加

  • 以下を実行
    # ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_temp
    # ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_fan
    # ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_volt
  • /etc/munin/plugin-conf.d/munin-node.conf に設定を追記
    [sensors_*]
    user root
    group root
    env.sensors /usr/bin/sensors
    env.ignore_volt1 yes
  • service munin restart

Links