Cacti Users プラグインのインストール

更新履歴

  • 2006/06/05 初版

概要

  • Cacti Users で作成されているプラグイン(追加機能)を利用して、Cactiの機能アップを行います。
  • 以下に、主な追加機能を示します。
plugin 説明
Thresholds 閾値を設定して、それを超えるとメール通知する機能
Monitor    機器の死活監視機能
Reports 定期的にグラフレポートを送信する機能
Tools snmpwalk,サービスチェック(HTTP,FTP,POP3,SMTP)をcacti上から確認出来る
Update cactiおよびプラグインのバージョンチェックが可能
Discovery ノード自動検知
NTop ntopの画面をメニューに追加する
Syslog syslog監視(MySQLに保存されたsyslog)
Host Info
Flowviewer
  • 本手順では、一般的に使えそうな機能(Thresholds,Monitor,Reports,Tools,Update)を追加します。

バージョン

  • cacti 0.8.6h
  • cactid 0.8.6g

インストール環境

  • CentOS 4.3
    • Apache 2.2.2
    • MySQL 5.0.21
    • PHP 5.1.4
    • RRDTool 1.2.13
    • NET-SNMP5

前提条件

  • Cacti が正常に動作していること
  • Cacti導入サーバ上でメールサーバが正常に動作していること (通知メール送信用)
    • 本手順では CentOS4.3 にデフォルトインストールされている Sendmail を使用

注意事項

  • プラグインを追加する場合は、Cactiを初期インストールすることを推奨!!(DBの削除含む)
  • プラグインを追加すると、Cactiバージョンアップ時に対応が遅れるので注意すること!!

参考URL

インストール手順

  • 本手順では、cactiインストールディレクトリを「/var/www/html/cacti」としています。

Plugin Architecture v0.9 パッチの適用

  • プラグインをインストールするために、cactiにプラグイン用パッチを適用する。
# cd /usr/local/src
# wget http://download.cactiusers.org/downloads/cacti-plugin-arch.tar.gz
# tar xvzf cacti-plugin-arch.tar.gz
# cp cacti-plugin-arch/cacti-plugin-0.8.6h.diff /var/www/html/cacti/
# cd /var/www/html/cacti/
# patch -p1 -N < cacti-plugin-0.8.6h.diff 
(Stripping trailing CRs from patch.)
patching file data_sources.php
(Stripping trailing CRs from patch.)
patching file graphs_new.php
(Stripping trailing CRs from patch.)
patching file include/config_arrays.php
(Stripping trailing CRs from patch.)
patching file include/config_form.php
(Stripping trailing CRs from patch.)
patching file include/config.php
(Stripping trailing CRs from patch.)
patching file include/config_settings.php
(Stripping trailing CRs from patch.)
patching file include/plugins.php
(Stripping trailing CRs from patch.)
patching file include/top_graph_header.php
(Stripping trailing CRs from patch.)
patching file include/top_header.php
(Stripping trailing CRs from patch.)
patching file lib/api_device.php
(Stripping trailing CRs from patch.)
patching file lib/functions.php
(Stripping trailing CRs from patch.)
patching file lib/html_form.php
(Stripping trailing CRs from patch.)
patching file lib/html.php
(Stripping trailing CRs from patch.)
patching file plugins/index.php
(Stripping trailing CRs from patch.)
patching file poller.php
(Stripping trailing CRs from patch.)
patching file utilities.php
# 
# vi include/config.php

config.php


以下のように編集(46行目)

46 $config["url_path"] = '/cacti/';

Monitor v0.6 インストール

# cd /usr/local/src/
# mkdir cacti-plugin
# cd cacti-plugin
# wget http://download.cactiusers.org/downloads/monitor.tar.gz
# tar xvzf monitor.tar.gz
# cp -r monitor /var/www/html/cacti/plugins

Thold v0.3.0 インストール

# cd /usr/local/src/cacti-plugin
# wget http://download.cactiusers.org/downloads/thold.tar.gz
# tar xvzf thold.tar.gz
# cp -r thold /var/www/html/cacti/plugins
# cd /var/www/html/cacti/plugins/thold/
# mysql -u root -p < thold.sql cacti
Enter password: 管理者パスワードを入力
# 

Reports v0.1 インストール

# cd /usr/local/src/cacti-plugin
# wget http://download.cactiusers.org/downloads/reports.tar.gz
# tar xvzf reports.tar.gz
# cp -r reports /var/www/html/cacti/plugins
# cd /var/www/html/cacti/plugins/reports/
# mysql -u root -p < reports.sql cacti
Enter password: 管理者パスワードを入力
# 

Tools v0.2 インストール

# cd /usr/local/src/cacti-plugin
# wget http://download.cactiusers.org/downloads/tools.tar.gz
# tar xvzf tools.tar.gz
# cp -r tools /var/www/html/cacti/plugins

Update v0.2 インストール

# cd /usr/local/src/cacti-plugin
# wget http://download.cactiusers.org/downloads/update.tar.gz
# tar xvzf update.tar.gz
# cp -r update /var/www/html/cacti/plugins
# cd /var/www/html/cacti/plugins/update
# mysql -u root -p < update.sql cacti
Enter password: 管理者パスワードを入力
# 

各プラグインの有効化

  • cactiの設定ファイル(config.php)を編集して、プラグインを有効にする。
# vi /var/www/html/cacti/include/config.php

/var/www/html/cacti/include/config.php

以下のように編集(35行目から)

35 $plugins = array();
36 $plugins[] = 'monitor'; ※monitorプラグインの有効化
37 $plugins[] = 'thold';  ※tholdプラグインの有効化
38 $plugins[] = 'reports'; ※reportsプラグインの有効化
39 $plugins[] = 'tools';  ※toolsプラグインの有効化
40 $plugins[] = 'update';  ※updateプラグインの有効化

 ディレクトリ名(/var/www/html/cacti/plugin以下)と config.php の記述名(monitor,thold等)が同一である必要あり!!
# chown -R apache:apache /var/www/html/cacti/
# mysql -u root -p cacti
Enter password: 管理者パスワードを入力
Welcome to the MySQL monitor.  Commands END with ; OR \g.
Your MySQL connection id IS 10 to server version: 5.0.21-LOG
 
Type 'help;' OR '\h' for HELP. Type '\c' to clear the buffer.
 
mysql> SHOW tables; ※★印が追加されていることを確認
+---------------------------+
| Tables_in_cacti           |
+---------------------------+
| cdef                      |
| cdef_items                |
| colors                    |
| data_input                |
| data_input_data           |
| data_input_fields         |
| data_local                |
| data_template             |
| data_template_data        |
| data_template_data_rra    |
| data_template_rrd         |
| graph_local               |
| graph_template_input      |
| graph_template_input_defs |
| graph_templates           |
| graph_templates_gprint    |
| graph_templates_graph     |
| graph_templates_item      |
| graph_tree                |
| graph_tree_items          |
| host                      |
| host_graph                |
| host_snmp_cache           |
| host_snmp_query           |
| host_template             |
| host_template_graph       |
| host_template_snmp_query  |
| plugin_update_info        |★
| poller                    |
| poller_command            |
| poller_item               |
| poller_output             |
| poller_reindex            |
| poller_time               |
| reports                   |★
| reports_data              |★
| rra                       |
| rra_cf                    |
| settings                  |
| settings_graphs           |
| settings_tree             |
| snmp_query                |
| snmp_query_graph          |
| snmp_query_graph_rrd      |
| snmp_query_graph_rrd_sv   |
| snmp_query_graph_sv       |
| thold                     |★
| thold_data                |★
| thold_template            |★
| tholdset                  |★
| user_auth                 |
| user_auth_perms           |
| user_auth_realm           |
| user_log                  |
| version                   |
+---------------------------+
54 rows IN SET (0.01 sec)
 
mysql> exit
Bye

WebGUI画面での設定

  • プラグインを有効にするために、以下の設定を行う。
  • メニューから [Console] → [User Management] を選択して [admin] をクリックする。

[Console] -> [User Management] -> [admin]

  • [Realm Permissions] の設定で、以下2項目にチェックを入れる。
    • Configure Reports
    • Check for Updates

[Realm Permissions]

  • 正常に設定が完了すれば、以下のような画面(一部抜粋)が表示される。

Save Successful.

 
manage/cacti/plugin_install.txt · 最終更新: 2007/10/16 12:02
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki NINJA TOOLS