new schema

git-svn-id: http://www.observium.org/svn/observer/trunk@204 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-26 16:04:51 +00:00
parent c26d468f07
commit 07c83f89b1
+16 -9
View File
@@ -1,3 +1,9 @@
--
-- Database: `observer`
--
-- --------------------------------------------------------
-- --
-- Table structure for table `adjacencies` -- Table structure for table `adjacencies`
-- --
@@ -34,6 +40,7 @@ CREATE TABLE IF NOT EXISTS `alerts` (
CREATE TABLE IF NOT EXISTS `bgpPeers` ( CREATE TABLE IF NOT EXISTS `bgpPeers` (
`bgpPeer_id` int(11) NOT NULL auto_increment, `bgpPeer_id` int(11) NOT NULL auto_increment,
`device_id` int(11) NOT NULL, `device_id` int(11) NOT NULL,
`astext` varchar(32) NOT NULL,
`bgpPeerIdentifier` text NOT NULL, `bgpPeerIdentifier` text NOT NULL,
`bgpPeerRemoteAs` int(11) NOT NULL, `bgpPeerRemoteAs` int(11) NOT NULL,
`bgpPeerState` text NOT NULL, `bgpPeerState` text NOT NULL,
@@ -46,7 +53,6 @@ CREATE TABLE IF NOT EXISTS `bgpPeers` (
`bgpPeerOutTotalMessages` int(11) NOT NULL, `bgpPeerOutTotalMessages` int(11) NOT NULL,
`bgpPeerFsmEstablishedTime` int(11) NOT NULL, `bgpPeerFsmEstablishedTime` int(11) NOT NULL,
`bgpPeerInUpdateElapsedTime` int(11) NOT NULL, `bgpPeerInUpdateElapsedTime` int(11) NOT NULL,
`astext` varchar(32) NOT NULL,
PRIMARY KEY (`bgpPeer_id`), PRIMARY KEY (`bgpPeer_id`),
KEY `device_id` (`device_id`) KEY `device_id` (`device_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -130,25 +136,21 @@ CREATE TABLE IF NOT EXISTS `customers` (
CREATE TABLE IF NOT EXISTS `devices` ( CREATE TABLE IF NOT EXISTS `devices` (
`device_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL auto_increment,
`hostname` text NOT NULL, `hostname` text NOT NULL,
`community` varchar(32) NOT NULL default 'v05tr0n82', `community` varchar(32) NOT NULL,
`snmpver` varchar(4) NOT NULL default 'v2c', `snmpver` varchar(4) NOT NULL default 'v2c',
`bgpLocalAs` varchar(8) default NULL, `bgpLocalAs` varchar(16) default NULL,
`sysDescr` text, `sysDescr` text,
`sysContact` text NOT NULL, `sysContact` text NOT NULL,
`monowall` tinyint(4) NOT NULL default '0',
`version` text NOT NULL, `version` text NOT NULL,
`hardware` text NOT NULL, `hardware` text NOT NULL,
`features` text NOT NULL, `features` text NOT NULL,
`location` text, `location` text,
`os` varchar(16) NOT NULL, `os` varchar(8) NOT NULL default '',
`status` tinyint(4) NOT NULL default '0', `status` tinyint(4) NOT NULL default '0',
`ignore` tinyint(4) NOT NULL default '0', `ignore` tinyint(4) NOT NULL default '0',
`disabled` tinyint(1) NOT NULL default '0', `disabled` tinyint(1) NOT NULL default '0',
`lastchange` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `lastchange` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`purpose` text NOT NULL, `purpose` text NOT NULL,
`apache` tinyint(4) NOT NULL default '0',
`courier` tinyint(4) NOT NULL default '0',
`postfix` tinyint(4) NOT NULL default '0',
`type` varchar(8) NOT NULL default 'other', `type` varchar(8) NOT NULL default 'other',
PRIMARY KEY (`device_id`), PRIMARY KEY (`device_id`),
KEY `status` (`status`) KEY `status` (`status`)
@@ -239,7 +241,7 @@ CREATE TABLE IF NOT EXISTS `interfaces` (
`ifAdminStatus` varchar(12) default NULL, `ifAdminStatus` varchar(12) default NULL,
`ifDuplex` varchar(12) default NULL, `ifDuplex` varchar(12) default NULL,
`ifMtu` int(11) default NULL, `ifMtu` int(11) default NULL,
`ifType` varchar(32) default NULL, `ifType` text,
`ifAlias` text, `ifAlias` text,
`ifPhysAddress` text, `ifPhysAddress` text,
`ifHardType` varchar(64) default NULL, `ifHardType` varchar(64) default NULL,
@@ -362,6 +364,7 @@ CREATE TABLE IF NOT EXISTS `services` (
`service_checked` int(11) NOT NULL default '0', `service_checked` int(11) NOT NULL default '0',
`service_changed` int(11) NOT NULL default '0', `service_changed` int(11) NOT NULL default '0',
`service_message` text NOT NULL, `service_message` text NOT NULL,
`service_disabled` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`service_id`), PRIMARY KEY (`service_id`),
KEY `service_host` (`service_host`) KEY `service_host` (`service_host`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -386,6 +389,10 @@ CREATE TABLE IF NOT EXISTS `storage` (
-- -------------------------------------------------------- -- --------------------------------------------------------
--
-- Table structure for table `syslog`
--
CREATE TABLE IF NOT EXISTS `syslog` ( CREATE TABLE IF NOT EXISTS `syslog` (
`host` varchar(64) NOT NULL, `host` varchar(64) NOT NULL,
`device_id` int(11) default NULL, `device_id` int(11) default NULL,