[icinga-checkins] icinga.org: icingaweb2-module-director/feature-ddo-playground: schema/ddo: host/service_state

git at icinga.org git at icinga.org
Tue Jul 19 10:31:52 CEST 2016


Module: icingaweb2-module-director
Branch: feature-ddo-playground
Commit: 04f43f27da18fa7ad16ea7ee5d418e4dcc139666
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=04f43f27da18fa7ad16ea7ee5d418e4dcc139666

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Jun 21 14:45:45 2016 +0200

schema/ddo: host/service_state

---

 schema/ddo/mysql.sql |   38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/schema/ddo/mysql.sql b/schema/ddo/mysql.sql
new file mode 100644
index 0000000..a77efbc
--- /dev/null
+++ b/schema/ddo/mysql.sql
@@ -0,0 +1,38 @@
+CREATE TABLE host_state (
+  checksum VARBINARY(20) NOT NULL, -- sha1(hostname)
+  host VARCHAR(255) NOT NULL,
+  state TINYINT NOT NULL,
+  hard_state TINYINT DEFAULT NULL,
+  state_type ENUM('hard', 'soft') NOT NULL,
+  attempt TINYINT NOT NULL,
+  severity INT UNSIGNED NOT NULL,
+  problem ENUM('y', 'n') NOT NULL,
+  reachable ENUM('y', 'n') NOT NULL,
+  acknowledged ENUM('y', 'n') NOT NULL,
+  in_downtime ENUM('y', 'n') NOT NULL,
+  last_update BIGINT NOT NULL,
+  last_state_change BIGINT NOT NULL,
+  last_comment_checksum VARBINARY(20) DEFAULT NULL,
+  check_source_checksum VARBINARY(20) DEFAULT NULL,
+  PRIMARY KEY (checksum)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE service_state (
+  checksum VARBINARY(20) NOT NULL, -- sha1(hostname)
+  host VARCHAR(255) NOT NULL,
+  service VARCHAR(255) NOT NULL,
+  state TINYINT NOT NULL,
+  hard_state TINYINT DEFAULT NULL,
+  state_type ENUM('hard', 'soft') NOT NULL,
+  attempt TINYINT NOT NULL,
+  severity INT UNSIGNED NOT NULL,
+  problem ENUM('y', 'n') NOT NULL,
+  reachable ENUM('y', 'n') NOT NULL,
+  acknowledged ENUM('y', 'n') NOT NULL,
+  in_downtime ENUM('y', 'n') NOT NULL,
+  last_update BIGINT NOT NULL,
+  last_state_change BIGINT NOT NULL,
+  last_comment_checksum VARBINARY(20) DEFAULT NULL,
+  check_source_checksum VARBINARY(20) DEFAULT NULL,
+  PRIMARY KEY (checksum)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;



More information about the icinga-checkins mailing list