mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Lots of additions.
git-svn-id: http://www.observium.org/svn/observer/trunk@108 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
241
mysql-schema.sql
241
mysql-schema.sql
@@ -1,37 +1,22 @@
|
||||
-- MySQL dump 10.10
|
||||
--
|
||||
-- Host: localhost Database: vostron_network
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.0.22-Debian_0ubuntu6.06.2-log
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
--
|
||||
-- Table structure for table `adjacencies`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `adjacencies`;
|
||||
CREATE TABLE `adjacencies` (
|
||||
`adj_id` int(11) NOT NULL auto_increment,
|
||||
`network_id` int(11) NOT NULL default '0',
|
||||
`interface_id` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`adj_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `alerts`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `alerts`;
|
||||
CREATE TABLE `alerts` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`importance` int(11) NOT NULL default '0',
|
||||
@@ -40,37 +25,30 @@ CREATE TABLE `alerts` (
|
||||
`time_logged` timestamp NOT NULL default CURRENT_TIMESTAMP,
|
||||
`alerted` smallint(6) NOT NULL default '0',
|
||||
KEY `id` (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `customers`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `customers`;
|
||||
CREATE TABLE `customers` (
|
||||
`customer_id` int(11) NOT NULL auto_increment,
|
||||
`username` char(64) NOT NULL,
|
||||
`password` char(32) NOT NULL,
|
||||
`string` char(64) NOT NULL,
|
||||
`level` tinyint(4) NOT NULL default '0',
|
||||
PRIMARY KEY (`customer_id`),
|
||||
UNIQUE KEY `username` (`username`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- Table structure for table `device_uptime`
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `device_uptime`;
|
||||
CREATE TABLE `device_uptime` (
|
||||
`device_id` int(11) NOT NULL default '0',
|
||||
`device_uptime` int(11) NOT NULL default '0',
|
||||
UNIQUE KEY `device_id` (`device_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
--
|
||||
-- Table structure for table `devices`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `devices`;
|
||||
CREATE TABLE `devices` (
|
||||
`device_id` int(11) NOT NULL auto_increment,
|
||||
`hostname` text NOT NULL,
|
||||
@@ -93,26 +71,39 @@ CREATE TABLE `devices` (
|
||||
`postfix` tinyint(4) NOT NULL default '0',
|
||||
`type` varchar(8) NOT NULL default 'other',
|
||||
PRIMARY KEY (`device_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `devices_attribs`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `devices_attribs`;
|
||||
CREATE TABLE `devices_attribs` (
|
||||
`attrib_id` int(11) NOT NULL auto_increment,
|
||||
`device_id` int(11) NOT NULL,
|
||||
`attrib_type` varchar(32) NOT NULL,
|
||||
`attrib_value` varchar(256) NOT NULL,
|
||||
PRIMARY KEY (`attrib_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `devices_perms`
|
||||
--
|
||||
|
||||
CREATE TABLE `devices_perms` (
|
||||
`user_id` int(11) NOT NULL,
|
||||
`device_id` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Table structure for table `eventlog`
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `eventlog`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `eventlog`;
|
||||
CREATE TABLE `eventlog` (
|
||||
`id` int(11) NOT NULL default '0',
|
||||
`host` int(11) NOT NULL default '0',
|
||||
@@ -123,11 +114,28 @@ CREATE TABLE `eventlog` (
|
||||
KEY `host` (`host`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Table structure for table `interfaces`
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `interface_measurements`
|
||||
--
|
||||
|
||||
CREATE TABLE `interface_measurements` (
|
||||
`interface_id` int(11) NOT NULL,
|
||||
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`period` int(11) NOT NULL,
|
||||
`delta_in` int(11) NOT NULL,
|
||||
`delta_out` int(11) NOT NULL,
|
||||
`rate_in` int(11) NOT NULL,
|
||||
`rate_out` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `interfaces`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `interfaces`;
|
||||
CREATE TABLE `interfaces` (
|
||||
`interface_id` int(11) NOT NULL auto_increment,
|
||||
`device_id` int(11) NOT NULL default '0',
|
||||
@@ -145,18 +153,26 @@ CREATE TABLE `interfaces` (
|
||||
`ifLastChange` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`ifVlan` int(11) default NULL,
|
||||
`ifTrunk` varchar(8) default '',
|
||||
`in_rate` int(11) NOT NULL,
|
||||
`out_rate` int(11) NOT NULL,
|
||||
`counter_in` int(11) default NULL,
|
||||
`counter_out` int(11) default NULL,
|
||||
`in_errors` int(11) NOT NULL,
|
||||
`out_errors` int(11) NOT NULL,
|
||||
`ignore` tinyint(1) NOT NULL default '0',
|
||||
`detailed` tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY (`interface_id`),
|
||||
KEY `host` (`device_id`),
|
||||
KEY `snmpid` (`ifIndex`),
|
||||
KEY `if_2` (`ifDescr`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `ipaddr`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ipaddr`;
|
||||
CREATE TABLE `ipaddr` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`addr` varchar(32) NOT NULL default '',
|
||||
@@ -165,13 +181,14 @@ CREATE TABLE `ipaddr` (
|
||||
`interface_id` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `addr` (`addr`,`cidr`,`interface_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `links`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `links`;
|
||||
CREATE TABLE `links` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`src_if` int(11) default NULL,
|
||||
@@ -179,13 +196,14 @@ CREATE TABLE `links` (
|
||||
`active` tinyint(4) NOT NULL default '1',
|
||||
`cdp` int(11) default NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `logs`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `logs`;
|
||||
CREATE TABLE `logs` (
|
||||
`host` varchar(32) default NULL,
|
||||
`facility` varchar(10) default NULL,
|
||||
@@ -193,7 +211,7 @@ CREATE TABLE `logs` (
|
||||
`level` varchar(10) default NULL,
|
||||
`tag` varchar(10) default NULL,
|
||||
`datetime` datetime default NULL,
|
||||
`program` varchar(15) default NULL,
|
||||
`program` varchar(32) default NULL,
|
||||
`msg` text,
|
||||
`seq` bigint(20) unsigned NOT NULL auto_increment,
|
||||
PRIMARY KEY (`seq`),
|
||||
@@ -201,27 +219,30 @@ CREATE TABLE `logs` (
|
||||
KEY `program` (`program`),
|
||||
KEY `datetime` (`datetime`),
|
||||
KEY `priority` (`priority`),
|
||||
KEY `facility` (`facility`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
KEY `facility` (`facility`),
|
||||
KEY `seq` (`seq`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `networks`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `networks`;
|
||||
CREATE TABLE `networks` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`cidr` varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `cidr_2` (`cidr`),
|
||||
FULLTEXT KEY `cidr` (`cidr`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `services`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `services`;
|
||||
CREATE TABLE `services` (
|
||||
`service_id` int(11) NOT NULL auto_increment,
|
||||
`service_host` int(11) NOT NULL,
|
||||
@@ -236,13 +257,14 @@ CREATE TABLE `services` (
|
||||
`service_message` text NOT NULL,
|
||||
PRIMARY KEY (`service_id`),
|
||||
KEY `service_host` (`service_host`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `storage`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `storage`;
|
||||
CREATE TABLE `storage` (
|
||||
`storage_id` int(11) NOT NULL auto_increment,
|
||||
`host_id` int(11) NOT NULL,
|
||||
@@ -250,22 +272,25 @@ CREATE TABLE `storage` (
|
||||
`hrStorageDescr` text NOT NULL,
|
||||
`hrStorageSize` int(11) NOT NULL,
|
||||
`hrStorageAllocationUnits` int(11) NOT NULL,
|
||||
`hrStorageUsed` int(11) NOT NULL,
|
||||
`storage_perc` text NOT NULL,
|
||||
PRIMARY KEY (`storage_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `syslog`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `syslog`;
|
||||
CREATE TABLE `syslog` (
|
||||
`host` varchar(32) default NULL,
|
||||
`host` int(11) default NULL,
|
||||
`facility` varchar(10) default NULL,
|
||||
`priority` varchar(10) default NULL,
|
||||
`level` varchar(10) default NULL,
|
||||
`tag` varchar(10) default NULL,
|
||||
`datetime` datetime default NULL,
|
||||
`program` varchar(20) default NULL,
|
||||
`program` varchar(32) default NULL,
|
||||
`msg` text,
|
||||
`seq` bigint(20) unsigned NOT NULL auto_increment,
|
||||
PRIMARY KEY (`seq`),
|
||||
@@ -273,42 +298,49 @@ CREATE TABLE `syslog` (
|
||||
KEY `program` (`program`),
|
||||
KEY `datetime` (`datetime`),
|
||||
KEY `priority` (`priority`),
|
||||
KEY `facility` (`facility`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
KEY `facility` (`facility`),
|
||||
KEY `seq` (`seq`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `temperature`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `temperature`;
|
||||
CREATE TABLE `temperature` (
|
||||
`temp_id` int(11) NOT NULL auto_increment,
|
||||
`temp_host` int(11) NOT NULL default '0',
|
||||
`temp_oid` varchar(32) NOT NULL default '',
|
||||
`temp_oid` varchar(64) NOT NULL,
|
||||
`temp_descr` varchar(32) NOT NULL default '',
|
||||
`temp_tenths` int(1) NOT NULL default '0',
|
||||
`temp_current` tinyint(4) NOT NULL default '0',
|
||||
`temp_limit` tinyint(4) NOT NULL default '70',
|
||||
PRIMARY KEY (`temp_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `users`;
|
||||
CREATE TABLE `users` (
|
||||
`user_id` int(11) NOT NULL auto_increment,
|
||||
`username` char(30) NOT NULL,
|
||||
`password` char(32) NOT NULL,
|
||||
`descr` char(30) NOT NULL,
|
||||
`level` tinyint(4) NOT NULL default '0',
|
||||
PRIMARY KEY (`user_id`),
|
||||
UNIQUE KEY `username` (`username`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
--
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `vlans`
|
||||
--
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `vlans`;
|
||||
CREATE TABLE `vlans` (
|
||||
`vlan_id` int(11) NOT NULL auto_increment,
|
||||
`device_id` int(11) default NULL,
|
||||
@@ -317,14 +349,5 @@ CREATE TABLE `vlans` (
|
||||
`vlan_descr` text,
|
||||
PRIMARY KEY (`vlan_id`),
|
||||
KEY `device_id` (`device_id`,`vlan_vlan`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user