| plugin | 説明 |
|---|---|
| Thresholds | 閾値を設定して、それを超えるとメール通知する機能 |
| Monitor | 機器の死活監視機能 |
| Reports | 定期的にグラフレポートを送信する機能 |
| Tools | snmpwalk,サービスチェック(HTTP,FTP,POP3,SMTP)をcacti上から確認出来る |
| Update | cactiおよびプラグインのバージョンチェックが可能 |
| Discovery | ノード自動検知 |
| NTop | ntopの画面をメニューに追加する |
| Syslog | syslog監視(MySQLに保存されたsyslog) |
| Host Info | |
| Flowviewer |
# 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/';
# 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
# 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: 管理者パスワードを入力 #
# 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: 管理者パスワードを入力 #
# 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
# 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: 管理者パスワードを入力 #
# 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