ksaitoの日記

日々試したことの覚え書き

perfpersのデータ初期化

移転しました。

自動的にリダイレクトします。

Nagios上では、パフォーマンスデータがあるのにPerfParseにデータが表示できなくなってしまいました。
よく分からなかったで、パフォーマンスデータ用のデータベースを初期化してみました。
これでしばらく様子を見ます。

データベースの削除と作成

$ mysql -u root -p mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 73630
Server version: 5.0.32-Debian_7etch5-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> drop database nagios;
Query OK, 18 rows affected (1.71 sec)

mysql> create database nagios;
Query OK, 1 row affected (0.03 sec)

mysql> quit
Bye
$

テーブルの作成

$ cd perfparse-0.106.1/scripts
$ ls
Makefile     mysql_create.sql      perfparse.sh.in
Makefile.am  mysql_delete.sql      postgresql_create.sql
Makefile.in  perfparse.sh.example  postgresql_delete.sql
$ cat mysql_create.sql | mysql -u nagios -p -D nagios
Enter password:
$ mysql -u nagios -p nagios
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 73633
Server version: 5.0.32-Debian_7etch5-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
                                                                    • +
Tables_in_nagios
                                                                    • +
perfdata_bin_summary
perfdata_bin_summary_data
perfdata_bin_summary_del_policy
perfdata_bin_summary_header
perfdata_delete_policy
perfdata_graphs
perfdata_host
perfdata_host_group
perfdata_prefs
perfdata_raw_summary
perfdata_raw_summary_data
perfdata_registry
perfdata_service
perfdata_service_bin
perfdata_service_metric
perfdata_service_raw
perfdata_state
perfdata_users
                                                                    • +
18 rows in set (0.01 sec) mysql>