LoginSignup
5
5

More than 5 years have passed since last update.

PandoraFMSの導入

Last updated at Posted at 2014-12-05

以前触ったことがあったのですが大分使いやすくなっているようなので導入のメモを残しておきます。
環境として Ubuntu 14.04 のサーバを元に使っていきたいと思います。

サーバの導入

Repositoryの登録以下の内容を追加

/etc/apt/source.list
deb http://www.artica.es/debian/squeeze /

次にパッケージを導入します。

$ apt-get update
$ apt-get install pandorafms-console pandorafms-server pandorafms-agent-unix

導入直後の設定をみると /var/www/html 以下を公開していますのでここでは便宜的にパスをリンクしておきます。

root@pxe:/var/www/html# ln -s ../pandora_console .
root@pxe:/var/www/html# ls -la
合計 20
drwxr-xr-x 2 root root  4096 12月  5 16:06 .
drwxr-xr-x 4 root root  4096 12月  5 15:53 ..
-rw-r--r-- 1 root root 11510 11月 22 11:08 index.html
lrwxrwxrwx 1 root root    18 12月  5 16:06 pandora_console -> ../pandora_console

この状態で http://server_ip/pandora_console/install.php へアクセスします。

Pandora_FMS_-_Installation_Wizard.png

基本はそのままで次に進めば問題無いです。

Pandora_FMS_-_Installation_Wizard.png

導入先のフルパスのディレクトリは /var/www/html/pandora_console に変更しました。

Pandora_FMS_-_Installation_Wizard.png

赤字で記載している箇所が pandora_serverのDBパスワードになるのでメモしておきましょう。

Pandora_FMS_-_The_Flexible_Monitoring_System_-_Console_error.png

次にローカルの /var/www/pandora_console/install.php を削除します。その後リロードするとログイン画面が表示されます。

デーモンを起動させます。

/etc/pandora/pandora_server.config
dbpass <先ほど控えたパスワード>

デーモンを起動します

/etc/init.d/pandora_server start
/etc/init.d/tentacle_server start

ここまで導入すると画面が以下のようになっているかと思います。

Pandora_FMS_-_the_Flexible_Monitoring_System.png

クライアントの導入

クライアントとして別のサーバを用意したいと思います。
こちらもubuntu14.04のサーバです。バージョンが違うのかもしれませんが標準のRepositoryにもAgentは入っているのでそのまま使ってみたいと思います。

$ apt-get install pandora_agent

構成ファイル内にサーバのIPアドレスの指定が必要となります。

/etc/pandora/pandora_agent.conf
server_ip       10.37.154.194

上記の項目を変更して起動します(または再起動します)

/etc/init.d/pandora_agent restart

プロセス監視の追加方法

プロセスの監視などはモジュールというものを定義することになるようです。先ほどのconfファイルの最後に以下のに追加します

/etc/pandora/pandora_agent.conf
# Process information

module_begin
module_name apacheDaemon
module_type generic_proc
module_exec ps -Af | grep apache2 | grep -v "grep" | wc -l
module_description Check apache service
module_end

名前などは任意の名前で問題ないようです。最終的には画面上に表示されます。

Pandora_FMS_-_the_Flexible_Monitoring_System.png

実際にプロセスを停止すると此のような形でアラートイベントが発生することがわかります。

まとめ

他にも多くのことが出来るようです。また構成ファイルを用意しておけば監視項目を事前に定義ができるためクラウド環境の監視の仕組みとしても便利に使うことができそうです。プロビジョニングスクリプトでAgentの導入→設定としていけばかなり簡単に多くの台数を追加できそうです。Ansibleでも難しくはないでしょう。

参考文献

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5