File: 0.04.19a/server/base/sql/schema.sql (View as HTML)

  1: -- No DROP TABLES - suitable for upgrade
  2: -- MySQL dump 10.9
  3: --
  4: -- Host: localhost    Database: freenats
  5: -- ------------------------------------------------------
  6: -- Server version	4.1.14
  7: /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  8: /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  9: /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
 10: /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 11: 
 12: --
 13: -- Table structure for table `fnalert`
 14: --
 15: 
 16: CREATE TABLE `fnalert` (
 17:   `alertid` bigint(20) unsigned NOT NULL auto_increment,
 18:   `nodeid` varchar(64) NOT NULL default '',
 19:   `alertlevel` int(11) NOT NULL default '0',
 20:   `openedx` bigint(20) unsigned NOT NULL default '0',
 21:   `closedx` bigint(20) unsigned NOT NULL default '0',
 22:   PRIMARY KEY  (`alertid`)
 23: );
 24: 
 25: --
 26: -- Table structure for table `fnalertaction`
 27: --
 28: 
 29: CREATE TABLE `fnalertaction` (
 30:   `aaid` bigint(20) unsigned NOT NULL auto_increment,
 31:   `atype` varchar(32) NOT NULL default '',
 32:   `efrom` varchar(250) NOT NULL default '',
 33:   `etolist` text NOT NULL,
 34:   `esubject` int(11) NOT NULL default '0',
 35:   `etype` int(11) NOT NULL default '0',
 36:   `awarnings` tinyint(1) NOT NULL default '0',
 37:   `adecrease` tinyint(1) NOT NULL default '0',
 38:   `mdata` text NOT NULL,
 39:   `aname` varchar(120) NOT NULL default '',
 40:   `ctrdate` varchar(8) NOT NULL default '',
 41:   `ctrlimit` int(10) unsigned NOT NULL default '0',
 42:   `ctrtoday` int(10) unsigned NOT NULL default '0',
 43:   PRIMARY KEY  (`aaid`)
 44: );
 45: 
 46: --
 47: -- Table structure for table `fnalertlog`
 48: --
 49: 
 50: CREATE TABLE `fnalertlog` (
 51:   `alid` bigint(20) unsigned NOT NULL auto_increment,
 52:   `alertid` bigint(20) unsigned NOT NULL default '0',
 53:   `postedx` bigint(20) unsigned NOT NULL default '0',
 54:   `logentry` varchar(250) NOT NULL default '',
 55:   PRIMARY KEY  (`alid`)
 56: );
 57: 
 58: --
 59: -- Table structure for table `fnconfig`
 60: --
 61: 
 62: CREATE TABLE `fnconfig` (
 63:   `fnc_var` varchar(64) NOT NULL default '',
 64:   `fnc_val` varchar(64) NOT NULL default '',
 65:   PRIMARY KEY  (`fnc_var`)
 66: );
 67: 
 68: --
 69: -- Table structure for table `fneval`
 70: --
 71: 
 72: CREATE TABLE `fneval` (
 73:   `evalid` bigint(20) unsigned NOT NULL auto_increment,
 74:   `testid` varchar(128) NOT NULL default '',
 75:   `weight` int(11) NOT NULL default '0',
 76:   `eoperator` varchar(32) NOT NULL default '',
 77:   `evalue` varchar(128) NOT NULL default '',
 78:   `eoutcome` int(11) NOT NULL default '0',
 79:   PRIMARY KEY  (`evalid`)
 80: );
 81: 
 82: --
 83: -- Table structure for table `fngroup`
 84: --
 85: 
 86: CREATE TABLE `fngroup` (
 87:   `groupid` bigint(20) unsigned NOT NULL auto_increment,
 88:   `groupname` varchar(128) NOT NULL default '',
 89:   `groupdesc` varchar(250) NOT NULL default '',
 90:   `groupicon` varchar(64) NOT NULL default '',
 91:   `weight` int(10) unsigned NOT NULL default '0',
 92:   PRIMARY KEY  (`groupid`)
 93: );
 94: 
 95: --
 96: -- Table structure for table `fngrouplink`
 97: --
 98: 
 99: CREATE TABLE `fngrouplink` (
100:   `glid` bigint(20) unsigned NOT NULL auto_increment,
101:   `groupid` bigint(20) unsigned NOT NULL default '0',
102:   `nodeid` varchar(64) NOT NULL default '',
103:   PRIMARY KEY  (`glid`)
104: );
105: 
106: --
107: -- Table structure for table `fnlocaltest`
108: --
109: 
110: CREATE TABLE `fnlocaltest` (
111:   `localtestid` bigint(20) unsigned NOT NULL auto_increment,
112:   `nodeid` varchar(64) NOT NULL default '',
113:   `alertlevel` int(11) NOT NULL default '-1',
114:   `lastrunx` bigint(20) unsigned NOT NULL default '0',
115:   `testtype` varchar(128) NOT NULL default '',
116:   `testparam` varchar(250) default NULL,
117:   `testrecord` tinyint(1) NOT NULL default '0',
118:   `simpleeval` tinyint(1) NOT NULL default '1',
119:   `testname` varchar(64) NOT NULL default '',
120:   `attempts` int(11) NOT NULL default '0',
121:   `timeout` int(11) NOT NULL default '0',
122:   `testenabled` tinyint(1) NOT NULL default '1',
123:   `testparam1` varchar(250) NOT NULL default '',
124:   `testparam2` varchar(250) NOT NULL default '',
125:   `testparam3` varchar(250) NOT NULL default '',
126:   `testparam4` varchar(250) NOT NULL default '',
127:   `testparam5` varchar(250) NOT NULL default '',
128:   `testparam6` varchar(250) NOT NULL default '',
129:   `testparam7` varchar(250) NOT NULL default '',
130:   `testparam8` varchar(250) NOT NULL default '',
131:   `testparam9` varchar(250) NOT NULL default '',
132:   `lastvalue` float NOT NULL default '0',
133:   PRIMARY KEY  (`localtestid`),
134:   KEY `nodeid` (`nodeid`)
135: );
136: 
137: --
138: -- Table structure for table `fnlog`
139: --
140: 
141: CREATE TABLE `fnlog` (
142:   `logid` bigint(20) unsigned NOT NULL auto_increment,
143:   `postedx` bigint(20) unsigned NOT NULL default '0',
144:   `modid` varchar(32) NOT NULL default '',
145:   `catid` varchar(32) NOT NULL default '',
146:   `username` varchar(64) NOT NULL default '',
147:   `loglevel` int(11) NOT NULL default '1',
148:   `logevent` varchar(250) NOT NULL default '',
149:   PRIMARY KEY  (`logid`)
150: );
151: 
152: --
153: -- Table structure for table `fnnalink`
154: --
155: 
156: CREATE TABLE `fnnalink` (
157:   `nalid` bigint(20) unsigned NOT NULL auto_increment,
158:   `nodeid` varchar(64) NOT NULL default '',
159:   `aaid` bigint(20) unsigned NOT NULL default '0',
160:   PRIMARY KEY  (`nalid`)
161: );
162: 
163: --
164: -- Table structure for table `fnnode`
165: --
166: 
167: CREATE TABLE `fnnode` (
168:   `nodeid` varchar(64) NOT NULL default '',
169:   `nodename` varchar(128) NOT NULL default '',
170:   `nodedesc` varchar(254) NOT NULL default '',
171:   `hostname` varchar(254) NOT NULL default '',
172:   `nodeenabled` tinyint(1) NOT NULL default '0',
173:   `pingtest` tinyint(1) NOT NULL default '0',
174:   `pingfatal` tinyint(1) NOT NULL default '0',
175:   `alertlevel` int(11) NOT NULL default '-1',
176:   `nodeicon` varchar(64) NOT NULL default '',
177:   `weight` int(10) unsigned NOT NULL default '0',
178:   `nodealert` tinyint(1) NOT NULL default '1',
179:   `scheduleid` bigint(20) unsigned NOT NULL default '0',
180:   `lastrunx` bigint(20) unsigned NOT NULL default '0',
181:   PRIMARY KEY  (`nodeid`)
182: );
183: 
184: --
185: -- Table structure for table `fnrecord`
186: --
187: 
188: CREATE TABLE `fnrecord` (
189:   `recordid` bigint(20) unsigned NOT NULL auto_increment,
190:   `testid` varchar(128) NOT NULL default '',
191:   `alertlevel` int(11) NOT NULL default '0',
192:   `testvalue` float NOT NULL default '0',
193:   `recordx` bigint(20) unsigned NOT NULL default '0',
194:   `nodeid` varchar(64) NOT NULL default '',
195:   PRIMARY KEY  (`recordid`),
196:   KEY `testid` (`testid`),
197:   KEY `recordx` (`recordx`)
198: );
199: 
200: --
201: -- Table structure for table `fnscheditem`
202: --
203: 
204: CREATE TABLE `fnscheditem` (
205:   `scheditemid` bigint(20) NOT NULL auto_increment,
206:   `scheduleid` bigint(20) NOT NULL default '0',
207:   `dayofweek` varchar(8) NOT NULL default '',
208:   `dayofmonth` int(11) NOT NULL default '0',
209:   `monthofyear` int(11) NOT NULL default '0',
210:   `year` int(11) NOT NULL default '0',
211:   `starthour` int(11) NOT NULL default '0',
212:   `startmin` int(11) NOT NULL default '0',
213:   `finishhour` int(11) NOT NULL default '23',
214:   `finishmin` int(11) NOT NULL default '59',
215:   PRIMARY KEY  (`scheditemid`)
216: );
217: 
218: --
219: -- Table structure for table `fnschedule`
220: --
221: 
222: CREATE TABLE `fnschedule` (
223:   `scheduleid` bigint(20) unsigned NOT NULL auto_increment,
224:   `schedulename` varchar(128) NOT NULL default '',
225:   `defaultaction` tinyint(1) NOT NULL default '1',
226:   PRIMARY KEY  (`scheduleid`)
227: );
228: 
229: --
230: -- Table structure for table `fnsession`
231: --
232: 
233: CREATE TABLE `fnsession` (
234:   `sessionid` bigint(20) unsigned NOT NULL auto_increment,
235:   `sessionkey` varchar(128) NOT NULL default '',
236:   `ipaddress` varchar(128) NOT NULL default '',
237:   `username` varchar(64) NOT NULL default '',
238:   `startx` bigint(20) unsigned NOT NULL default '0',
239:   `updatex` bigint(20) unsigned NOT NULL default '0',
240:   `userlevel` int(11) NOT NULL default '0',
241:   PRIMARY KEY  (`sessionid`)
242: );
243: 
244: --
245: -- Table structure for table `fntestrun`
246: --
247: 
248: CREATE TABLE `fntestrun` (
249:   `trid` bigint(20) unsigned NOT NULL auto_increment,
250:   `startx` bigint(20) unsigned NOT NULL default '0',
251:   `finishx` bigint(20) unsigned NOT NULL default '0',
252:   `routput` text NOT NULL,
253:   `fnode` varchar(64) NOT NULL default '',
254:   PRIMARY KEY  (`trid`),
255:   KEY `fnode` (`fnode`)
256: );
257: 
258: --
259: -- Table structure for table `fnuser`
260: --
261: 
262: CREATE TABLE `fnuser` (
263:   `username` varchar(64) NOT NULL default '',
264:   `password` varchar(64) NOT NULL default '',
265:   `realname` varchar(128) NOT NULL default '',
266:   `userlevel` int(11) NOT NULL default '1',
267:   PRIMARY KEY  (`username`)
268: );
269: 
270: --
271: -- Table structure for table `fnview`
272: --
273: 
274: CREATE TABLE `fnview` (
275:   `viewid` bigint(20) unsigned NOT NULL auto_increment,
276:   `vtitle` varchar(128) NOT NULL default '',
277:   `vstyle` varchar(32) NOT NULL default '',
278:   `vpublic` tinyint(1) NOT NULL default '0',
279:   `vclick` varchar(32) NOT NULL default '',
280:   `vrefresh` int(11) NOT NULL default '0',
281:   `vlinkv` bigint(20) unsigned NOT NULL default '0',
282:   `vcolumns` smallint(6) NOT NULL default '0',
283:   `vcolon` tinyint(1) NOT NULL default '1',
284:   `vdashes` tinyint(1) NOT NULL default '1',
285:   `vtimeago` tinyint(1) NOT NULL default '1',
286:   PRIMARY KEY  (`viewid`)
287: );
288: 
289: --
290: -- Table structure for table `fnviewitem`
291: --
292: 
293: CREATE TABLE `fnviewitem` (
294:   `viewitemid` bigint(20) unsigned NOT NULL auto_increment,
295:   `viewid` bigint(20) unsigned NOT NULL default '0',
296:   `itype` varchar(128) NOT NULL default '',
297:   `ioption` varchar(250) NOT NULL default '',
298:   `icolour` tinyint(1) NOT NULL default '1',
299:   `itextstatus` tinyint(1) NOT NULL default '0',
300:   `idetail` smallint(5) unsigned NOT NULL default '0',
301:   `iweight` int(10) unsigned NOT NULL default '0',
302:   `isize` smallint(6) NOT NULL default '0',
303:   `igraphic` smallint(6) NOT NULL default '0',
304:   `iname` varchar(64) NOT NULL default '',
305:   PRIMARY KEY  (`viewitemid`),
306:   KEY `viewid` (`viewid`)
307: );
308: 
309: /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
310: /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
311: /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
312: /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
313: 
314: