Debian 10 busterでMunin


はじめに

Debian 10 busterでルーター構築 - Qiita」の続き

インストール

  • 「アプリケーションメニュー/設定/Synaptic パッケージマネージャ」を起動
  • 「munin」をインストール

設定

  • ローカルに加えて指定したサブネットのWebブラウザでも表示できるように
$ sudo nano /etc/munin/apache24.conf
apache24.conf
...
<Directory /var/cache/munin/www>
    Require local
    Require ip 192.168.0.
    Options None
</Directory>
<Directory /usr/lib/munin/cgi>
    Require local
    Require ip 192.168.0.
    <IfModule mod_fcgid.c>
...
  • apache2再起動
$ sudo systemctl restart apache2

テンプレートをmunstrapに変更

  • ファイル取得&解凍
$ wget https://github.com/munin-monitoring/contrib/archive/master.tar.gz
$ tar xpvf master.tar.gz
  • ファイルコピー
$ sudo cp -r contrib-master/templates/munstrap/ /etc/munin/
  1. 設定変更
$ sudo nano /etc/munin/munin.conf
munin.conf
# Where to look for the HTML templates
#
#tmpldir /etc/munin/templates
tmpldir /etc/munin/munstrap/templates
# Where to look for the static www files
#
#staticdir /etc/munin/static
staticdir /etc/munin/munstrap/static
  • キャッシュ削除
$ sudo rm -rf /var/cache/munin/www/*

内部からのアクセスのみ許可

  • 設定
$ sudo nano /etc/apache2/ports.conf
ports.conf
#Listen 80
Listen 192.168.0.1:80
<IfModule ssl_module>
        #Listen 443
        Listen 192.168.0.1:443
</IfModule>
<IfModule mod_gnutls.c>
        #Listen 443
        Listen 192.168.0.1:443
</IfModule>
  • apache2再起動
$ sudo systemctl restart apache2