From: Florian G. <re...@us...> - 2007-04-26 21:40:46
|
Update of /cvsroot/perfparse/_perfparse/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16407/scripts Modified Files: mysql_create.sql Log Message: Added instance_id to get compatible to NDO utils Index: mysql_create.sql =================================================================== RCS file: /cvsroot/perfparse/_perfparse/scripts/mysql_create.sql,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mysql_create.sql 19 Apr 2007 12:38:26 -0000 1.17 --- mysql_create.sql 26 Apr 2007 21:40:42 -0000 1.18 *************** *** 20,23 **** --- 20,32 ---- # TODO: Check if we need servicegroups like in nagios 2.6 + # For use of multiple nagios instances + CREATE TABLE IF NOT EXISTS perfdata_instances ( + instance_id INT AUTO_INCREMENT PRIMARY KEY, + instance_name VARCHAR(20) NOT NULL UNIQUE, + instance_text TEXT + ) TYPE=InnoDB; + + insert into perfdata_instances (instance_id,instance_name,instance_text) values + (0,'default instance','Default instance if no instance is selected or instance feature is switched off. Some objects will be visible on all instances if the default instance is used.'); CREATE TABLE IF NOT EXISTS perfdata_delete_policy ( *************** *** 25,29 **** policy_name VARCHAR(20) NOT NULL UNIQUE, delete_policy_seconds INT DEFAULT NULL, ! policy_comment TEXT ) TYPE=InnoDB; --- 34,41 ---- policy_name VARCHAR(20) NOT NULL UNIQUE, delete_policy_seconds INT DEFAULT NULL, ! policy_comment TEXT, ! instance_id INT DEFAULT 0, ! FOREIGN KEY perfdata_delete_policy_ibfk_1 (instance_id) ! REFERENCES perfdata_instances(instance_id) ) TYPE=InnoDB; *************** *** 35,39 **** CREATE TABLE IF NOT EXISTS perfdata_groups ( group_id INT AUTO_INCREMENT PRIMARY KEY, ! group_name VARCHAR(75) UNIQUE ) type=InnoDB; --- 47,54 ---- CREATE TABLE IF NOT EXISTS perfdata_groups ( group_id INT AUTO_INCREMENT PRIMARY KEY, ! group_name VARCHAR(75) UNIQUE, ! instance_id INT DEFAULT 0, ! FOREIGN KEY perfdata_groups_ibfk_1 (instance_id) ! REFERENCES perfdata_instances(instance_id) ) type=InnoDB; *************** *** 53,57 **** REFERENCES perfdata_delete_policy (policy_id) ON DELETE SET NULL, ! is_deleted TINYINT NOT NULL DEFAULT 0 ) type=InnoDB; --- 68,75 ---- REFERENCES perfdata_delete_policy (policy_id) ON DELETE SET NULL, ! is_deleted TINYINT NOT NULL DEFAULT 0, ! instance_id INT DEFAULT 0, ! FOREIGN KEY perfdata_host_ibfk_3 (instance_id) ! REFERENCES perfdata_instances(instance_id) ) type=InnoDB; |