LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Joe2003
User Name
Password

Notices


Rate this Entry

sql

Posted 01-21-2010 at 07:05 AM by Joe2003

CREATE TABLE `facility` (
`facilityID` varchar(2) NOT NULL default '',
`description` varchar(30) default NULL,
PRIMARY KEY (`facilityID`)
);

CREATE TABLE `system` (
`systemID` varchar(3) NOT NULL default '',
`ipAddress` varchar(16) default NULL,
`dnsName` varchar(50) default NULL,
`network` varchar(50) default NULL,
`type` varchar(20) default NULL,
PRIMARY KEY (`systemID`)
);

CREATE TABLE `severity` (
`severityID` char(1) NOT NULL default '',
`level` varchar(30) default NULL,
PRIMARY KEY (`severityID`)
);


CREATE TABLE `event` (
`eventID` varchar(4) NOT NULL default '',
`systemID` varchar(3) default NULL,
`facilityID` varchar(2) default NULL,
`severityID` char(1) default NULL,
`dateSent` date default NULL,
`timeSent` time default NULL,
`dateReceived` date default NULL,
`timeReceived` time default NULL,
`message` varchar(300) default NULL,
PRIMARY KEY (`eventID`),
KEY `systemID` (`systemID`),
KEY `facilityID` (`facilityID`),
KEY `severityID` (`severityID`)
);


INSERT INTO `facility` VALUES ('0','kernel messages'),('1','user-level messages'),('2','mail system'),('3','system daemons'),('4','security/authorization message'),('5','messages generated internally '),('6','line printer subsystem'),('7','network news subsystem'),('8','UUCP subsystem'),('9','clock daemon'),('10','security/authorization message'),('11','FTP daemon'),('12','NTP subsystem'),('13','log audit'),('14','log alert'),('15','clock daemon'),('16','local use 0'),('17','local use 1'),('18','local use 2'),('19','local use 3'),('20','local use 4'),('21','local use 5'),('22','local use 6'),('23','local use 7');
INSERT INTO `severity` VALUES ('0','Emergency'),('1','Alert'),('2','Critical'),('3','Error'),('4','Warning'),('5','Notice'),('6',' Informational'),('7','Debug');
INSERT INTO `system` VALUES ('0','127.0.0.1','monitor','green.local','Syslog server');
Posted in Uncategorized
Views 981 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration