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

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


[[Linux アプリケーション]]

* Munin: 監視 [#c119dc0d]

** Install [#lc751c17]
- apt-get install munin-node
- apt-get install munin

** Setup [#w4bb8916]
- /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サーバー [#e732b325]
** Install [#h662a1f9]
- apt-get install nginx

** Setup [#c5b8e4e2]
- /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
-- http://localhost/munin


* lm-sensorを追加 [#uf27bc65]
- 以下を実行
 # 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 [#d6457c2e]
- https://keruuweb.com/munin-%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB-nginx-ubuntu/
- https://bucci.bp7.org/archives/31835