ムニン は、Perlで記述されたオープンソースのシステム監視、ネットワーク監視、およびインフラストラクチャ監視アプリケーションであり、サーバーやアプリケーションなどのパフォーマンスを監視するために使用されます。 Muninは、RRDtoolを使用して、Webブラウザーからアクセスできるグラフを作成します。また、一部のサービスやアプリケーションなどが機能していないときにアラートを送信するようにMuninを構成できます。問題が解決すると、Muninは追加のメールアラートを自動的に送信します。
インストール UbuntuVPSのMunin 以下に説明する非常に簡単な手順に従ってください。
Ubuntu 14.04 Linux VPSを確認してください 以下を使用して完全に最新です:
apt-get update apt-get upgrade
Muninでは、監視に使用するVPSにApache2がインストールされて実行されている必要があるため、インストールされていない場合は、次のコマンドを実行してインストールします。
apt-get install apache2
Muninをインストールする
次のコマンドを使用して、Muninと追加のプラグインをインストールします。
apt-get install munin munin-node munin-plugins-extra
Muninの元のApache構成ファイルのバックアップを作成するか、名前を変更します。
mv /etc/munin/apache.conf /etc/munin/apache.conf.orig
「/etc/munin/apache.conf」構成ファイルを編集して、次の行を追加します。
vi /etc/munin/apache.conf
<VirtualHost *:80>
ServerName munin.your-domain.com
ServerAlias www.munin.your-domain.com
ServerAdmin yours@email.com
DocumentRoot "/var/cache/munin/www"
DirectoryIndex index.html
<Directory "/var/cache/munin/www">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig
AuthUserFile /etc/munin/htpasswd
AuthName "munin"
AuthType Basic
Require valid-user
Order allow,deny
Allow from all
</Directory>
CustomLog /var/log/apache2/munin.your-domain.com-access.log combined
ErrorLog /var/log/apache2/munin.your-domain.com-error.log
<Directory "/etc/munin/static">
Require all granted
</Directory>
<Directory "/usr/lib/munin/cgi">
Options +ExecCGI
Require all granted
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Directory>
</VirtualHost> Muninグラフとデータの出力ディレクトリを作成します。
mkdir -p /var/cache/munin/www/
Muninユーザーは、「/ var / cache / munin / www」ディレクトリ内のファイルとディレクトリに書き込める必要があるため、次のコマンドを実行することで簡単に実行できます。
chown munin:munin -R /var/cache/munin/www
元のMunin構成ファイルのバックアップを作成します:
cp /etc/munin/munin.conf /etc/munin/munin.conf.orig
Munin構成ファイルを編集し、次の行を追加/変更します。
vi /etc/munin/munin.conf
dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir /var/run/munin
tmpldir /etc/munin/templates
includedir /etc/munin/conf.d
graph_strategy cron
cgiurl_graph /munin-cgi/munin-cgi-graph
html_strategy cron
[localhost]
address 127.0.0.1
use_node_name yes 次のコマンドを実行して、Munin管理者ユーザーのパスワードを設定します。
htpasswd -c /etc/munin/htpasswd munin
これは、Munin出力ディレクトリとその中のファイルを検索エンジンや許可されていないユーザーからプライベートに保つために重要です。
変更を有効にするには、MuninおよびApacheサービスを再起動します。
service munin-node restart service apache2 restart
Muninがグラフとhtmlファイルを生成するのに数分かかる場合があります。次に、ユーザー名として「munin」を使用し、パスワードとして以前に生成されたmuninパスワードを使用して、http://munin.your-domain.comでMuninを開きます。これにより、Muninのグラフとデータにアクセスできるようになります。
それだ。これでMuninのインストールが完了しました。もちろん、マネージドLinux VPSホスティングサービスのいずれかを使用している場合は、これを行う必要はありません。その場合は、専門のLinux管理者にMuninのインストールを依頼するだけです。 あなたのために。 24時間年中無休でご利用いただけます。リクエストはすぐに処理されます。
PS。 この投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。