MuninでDebianサーバーのステータスを監視する

Muninは、マシンのプロセスとリソースを調査する監視ツールであり、Webインターフェースを介して情報をグラフで表示します。

マシンにMuninをセットアップし、ApacheでWebインターフェイスを表示するには、次の手順を使用します。

必要なパッケージをインストールする

apt-get install munin munin-plugins-extra libwww-perl apache2-utils

Webインターフェースにアクセスするユーザーを作成します

htpasswd -c /etc/munin/.htpasswd munin

この手順では、パスワードの入力を求められます。

監視用のプラグインを有効にする

プラグインへのシンボリックリンクを作成して、有効にするプラグインを選択します。

ln -s /usr/share/munin/plugins/cpu /etc/munin/plugins/cpu
ln -s /usr/share/munin/plugins/df /etc/munin/plugins/df
ln -s /usr/share/munin/plugins/forks /etc/munin/plugins/forks
ln -s /usr/share/munin/plugins/fw_packets /etc/munin/plugins/fw_packets
ln -s /usr/share/munin/plugins/ip_127.0.0.1 /etc/munin/plugins/ip_127.0.0.1
ln -s /usr/share/munin/plugins/load /etc/munin/plugins/load
ln -s /usr/share/munin/plugins/memory /etc/munin/plugins/memory
ln -s /usr/share/munin/plugins/processes /etc/munin/plugins/processes
ln -s /usr/share/munin/plugins/threads /etc/munin/plugins/threads
ln -s /usr/share/munin/plugins/uptime /etc/munin/plugins/uptime
ln -s /usr/share/munin/plugins/exim_mailqueue /etc/munin/plugins/exim_mailqueue
ln -s /usr/share/munin/plugins/exim_mailstats /etc/munin/plugins/exim_mailstats
ln -s /usr/share/munin/plugins/postfix_mailstats /etc/munin/plugins/postfix_mailstats
ln -s /usr/share/munin/plugins/postfix_mailqueue /etc/munin/plugins/postfix_mailqueue
ln -s /usr/share/munin/plugins/mysql_queries /etc/munin/plugins/mysql_queries
ln -s /usr/share/munin/plugins/nginx_request /etc/munin/plugins/nginx_request
ln -s /usr/share/munin/plugins/nginx_status /etc/munin/plugins/nginx_status
ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses
ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes

設定を編集

/etc/munin/munin.conf基本設定のファイルを編集します。

[localhost.localdomain]ような独自のホスト名を見つけて変更しますserver1.example.com

を開いて編集します/etc/apache2/conf.d/munin

次の行をコメント化します。

Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
Options None

次に、以下の行のコメントを外して認証を有効にします。

# AuthUserFile /etc/munin/.htpasswd
# AuthName "Munin"
# AuthType Basic
# require valid-user

エクストラ

Apacheが80以外のポートでリッスンしている場合は、編集 /etc/munin/plugin-conf.d/munin-node

Apacheがポート8080をリッスンしている場合は、ファイルの最後に次の行を追加します。

[apache_*]
env.ports 8080

仕上げ

最後に、サービスを再起動します。

/etc/init.d/munin-node restart
/etc/init.d/apache2 restart

これで、munin Webインターフェースにアクセスできますhttp://YOUR_SERVER_IP/munin

Muninグラフは数分後に利用可能になります。



Leave a Comment

CentOS 7にApacheをインストールする方法

CentOS 7にApacheをインストールする方法

CentOS 7サーバーにApache 2.4をインストールする方法を説明します。安定したウェブサーバーを構築するための前提条件と手順を解説します。

FreeBSD 11.1にBlacklistdをインストールする方法

FreeBSD 11.1にBlacklistdをインストールする方法

FreeBSD 11.1におけるBlacklistdのインストール方法について詳しく解説します。この方法を通じて、強力なセキュリティ対策を実装できます。

Windows Serverのサーバーマネージャーを使用した複数サーバーの管理

Windows Serverのサーバーマネージャーを使用した複数サーバーの管理

サーバーマネージャーを使用して、Windows Serverの管理が向上します。セキュリティリスクを軽減し、効率的な管理を実現します。

CentOS 7にSeafileサーバーをインストールする方法

CentOS 7にSeafileサーバーをインストールする方法

CentOS 7にSeafileサーバーをインストールする方法。Seafile(コミュニティバージョン)は、ownCloudに似た無料のオープンソースファイル同期および共有ソリューションです。

DebianでSnortを設定する方法

DebianでSnortを設定する方法

Snortは無料のネットワーク侵入検知システムです。最新の方法で、SnortをDebianにインストールし、設定する手順を紹介します。ネットワークのセキュリティを強化しましょう。

CentOS 7にGraylogサーバーをインストールする方法

CentOS 7にGraylogサーバーをインストールする方法

CentOS 7にGraylogサーバーをインストールし、ログ管理を行う方法を学びます。

WindowsでhMailServerを使用してメールサーバーを構築する

WindowsでhMailServerを使用してメールサーバーを構築する

WindowsサーバーでWebサイトを実行している場合、電子メールも受信できるようにするためにhMailServerを使用する方法を解説します。

Ubuntu 19.04にFiveMサーバーをインストールする方法

Ubuntu 19.04にFiveMサーバーをインストールする方法

FiveMサーバーをUbuntu 19.04にインストールするための詳細なガイド。必要条件からインストール、起動、トラブルシューティングまで、すべてのステップを含みます。

WsgiDAVを使用してDebian 10にWebDAVをデプロイする

WsgiDAVを使用してDebian 10にWebDAVをデプロイする

Debian 10にWebDAVをデプロイする方法を学び、WsgiDAVとSSL証明書で安全な接続を実現しましょう。

ヘルスケア2021における人工知能の影響

ヘルスケア2021における人工知能の影響

ヘルスケアにおけるAIは、過去数十年から大きな飛躍を遂げました。したがって、ヘルスケアにおけるAIの未来は、日々成長を続けています。