Added description of system parameters and related database tables.
[gnucomo.git] / doc / manifest.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE doc SYSTEM "/usr/local/xslt/doc.dtd">
3 <doc style="main.css" xmlns:xlink="http://www.w3.org/1999/xlink">
4   <book>
5
6 <titlepage>
7    <title>GNUCOMO</title>
8    <subtitle>GNU COMPUTER MONITORING</subtitle>
9    <subtitle>A system for interactive system monitoring.</subtitle>
10    <subtitle>Development manifest</subtitle>
11
12    <author>Brenno J.S.A.A.F. de Winter, De Winter Information Solutions</author>
13    <author>Arjen Baart, Andromeda Technology &amp; Automation</author>
14    <date>November 15, 2002.</date>
15    <docinfo>
16       <infoitem label="Version">0.22</infoitem>
17    </docinfo>
18
19 </titlepage>
20
21 <toc/>
22
23 <chapter>
24    <heading>About this document.</heading>
25
26 <para>
27 This document describes the technical specifications for the Gnucomo project.
28 It will describe the functionality achieved, design specifications and choices made.
29 The document will be the manifest for the developers to work in the same direction
30 and not run into unneeded disappointments.
31 </para>
32
33 <section>
34   <heading>History of the document.</heading>
35
36 <table cpos='lp{3cm}lp{5cm}'>
37   <thead>
38     <col>Version</col><col>Author</col><col>Date</col><col>Remarks</col>
39   </thead>
40   <row>
41     <col>0.l</col><col>Brenno de Winter</col><col>Jul 11, 2002</col>
42     <col>
43       Initial version
44     </col>
45   </row>
46   <row>
47     <col>0.11</col><col>Arjen Baart</col><col>Jul 12, 2002</col>
48     <col>
49       Additional guidelines and dataflow diagram.
50     </col>
51   </row>
52   <row>
53     <col>0.12</col><col>Brenno de Winter</col><col>Jul 15, 2002</col>
54     <col>
55       Database design added
56     </col>
57   </row>
58   <row>
59     <col>0.13</col><col>Arjen Baart</col><col>Jul 16, 2002</col>
60     <col>
61       Entity-relationship model added.
62     </col>
63   </row>
64   <row>
65     <col>0.14</col><col>Brenno de Winter</col><col>Jul 17, 2002</col>
66     <col>
67       Based on feedback. Small changes to the datamodel and finishing touches
68       in lay-out of the tables. Added some examples.
69     </col>
70   </row>
71   <row>
72     <col>0.15</col><col>Brenno de Winter, Arjen Baart</col><col>Jul 21, 2002</col>
73     <col>
74       Additional feedback processed, indexes added, ERD added and SQL-script created.
75     </col>
76   </row>
77   <row>
78     <col>0.16</col><col>Brenno de Winter</col><col>Aug 7, 2002</col>
79     <col>
80       Communication handling added.
81     </col>
82   </row>
83   <row>
84     <col>0.17</col><col>Brenno de Winter</col><col>Aug 11, 2002</col>
85     <col>
86       <para>* Description of the client-side for communications.</para>
87       <para>* Several updates to the database descriptions, drawings added.</para>
88       <para>* More work on the installation chapter.</para>
89       <para>* Created an extra field to the unprocessed_log table and added
90               a between the table service and unprocessed_log.</para>
91     </col>
92   </row>
93   <row>
94     <col>0.18</col><col>Brenno de Winter, Peter Roozemaal</col><col>Aug 15, 2002</col>
95     <col>
96       <para>* Review done by Peter Roozemaal: adjusted intro and several clarifications made</para>
97       <para>* Arjen Baart: Adjustments to database drawings</para>
98       <para>* New installation recommendations</para>
99     </col>
100   </row>
101   <row>
102     <col>0.19</col><col>Arjen Baart</col><col>Aug 27, 2002</col>
103     <col>
104       Conversion to XMLDoc
105     </col>
106   </row>
107   <row>
108     <col>0.20</col><col>Arjen Baart</col><col>Oct 20, 2002</col>
109     <col>
110       Minor layout improvements
111     </col>
112   </row>
113   <row>
114     <col>0.21</col><col>Arjen Baart</col><col>Nov 07, 2002</col>
115     <col>
116       Installation instructions added.
117       Combined chapters 4 through 7 into one chapter (4).
118     </col>
119   </row>
120   <row>
121     <col>0.22</col><col>Arjen Baart</col><col>Nov 15, 2002</col>
122     <col>
123       Added parameters of monitored objects.
124     </col>
125   </row>
126 </table>
127
128 </section>
129 </chapter>
130
131 <chapter>
132 <heading>Aim of the project.</heading>
133
134 <para>
135 The number of log-files in a system and the tools in general do not make
136 monitoring a system simple. Quite often there is so much information that
137 attention for logfiles seems to fade away. For that reason monitoring routers
138 and clients is often not an option. Instead of timely detection of problems,
139 logs more often are used to find out what went wrong. When a system is
140 under attack early signals can often easily be detected<footnote>Just as in
141 real life there a signals that things are not going in the right direction.
142 For the attacks on September 11th 2001 there were many signals available
143 that could to have led to early detection: warnings of several intelligence
144 agencies, warnings within the FBI, flight schools that report strange
145 customers that want to steer a plane and don't seem to care about take
146 off and landing, people opening accounts under fake names.</footnote>
147 and preventive measures could have been taken if the time was only available.
148 </para>
149
150 <para>
151 The Gnucomo project is meant to make pro-active monitoring of computers
152 and devices easier. It will contain a set of applications that will
153 retrieve all types of monitoring information from devices and place
154 it into a database. Devices can be server computers, desktop computers,
155 PBX'es or other systems. By running checks the manual process of
156 watching log files can be reduced. Also an intelligent script can
157 see things that a human being will easy overlook. Gnucomo won't
158 relieve an administrator of all manual work on log-files, but will
159 increase the changes on actual monitoring.
160 </para>
161 <para>
162 With all this data being available at one central location the gnucomo-server
163 acts as some kind of black box for computer systems. If something does
164 happen the evidence will be available at a remote location available
165 for exploration<footnote>This analogy is based on a remarkable anecdote:
166 One a trip to US I spoke to a 747-captain of Air France. While talking
167 over several subjects we touched security. When we went some deeper I
168 touched the subject gnucomo and he told me that Air France was doing
169 the very same with real black boxes. By sending all the data to Paris
170 errors can be detected earlier and be resolved. In any less fortunate
171 case the cause of the crash might be detected sooner (or fuller).
172 For me this was a signal there is a point in working gnucomo because
173 the analogy is valid.</footnote>. Forensics will be made easier.
174 Also the collected data is available from multiple locations make
175 it easier to found more about an attack. The change that you overlook
176 things will be reduced.
177 </para>
178 <para>
179 Based on the entered data all sorts of analysis will be performed to discover
180 abnormalities a normal maintenance tool or IDS wouldn't be looking at.
181 An example could be a website in Dutch that suddenly obtains a lot of
182 attention from Greek visitors (based on the location of their
183 IP<footnote>That IP could also warn for other things like: excessive
184 data traffic from wireless connections at times that you wouldn't be
185 expecting traffic at all, absence of traffic when you would be expecting
186 some traffic at least or even what article is liked in which part of the world,
187 what regions poses the highest threat to the security of the system (based
188 on the location of the IP address).</footnote>). These abnormalities will
189 be presented as user-friendly as possible to increase awareness of the
190 state of the system. By doing that the system can also be used for more
191 complex analysis. One than can look at long-term trends like hacking
192 attempts that take place, new exploits that are tried all of a sudden
193 or signs of distributed attacks or a certain pattern of attempts<footnote>A portscan
194 that last three days is hard to detect with a real-time IDS,
195 while gnucomo would discover this anyhow. With correct intelligence
196 one portscan from multiple IP-addresses can be related.</footnote>.
197 </para>
198 <para>
199 Also extra data will be gathered where ever possible to save time to
200 the administrator. If IP address attract attention of gnucomo the next
201 logical step would be to use tools like dig, whois and visiting arin-related
202 websites. This data will automatically be collected in an early stage and
203 stored in the database.
204 </para>
205 <para>
206 The results will be gathered in a warning system.
207 Those warnings will be presented to the administrative person
208 who is responsible for that particular machine or network.
209 Having multiple systems in the system can add to the intelligence that
210 can be gathered. The interface will be web-based and aimed at user-friendliness.
211 </para>
212 <para>
213 Since multiple systems can enter data into the Gnucomo database more
214 intelligent hardware and security detection can be done.
215 When things do go wrong Gnucomo contains as much information as
216 possible to figure out what happened and assist in the forensics.
217 Since research on the signals afterwards is broader more attention
218 will be given as much data as possible and do less filtering.
219 </para>
220 <para>
221 With the data in the database also policies can be checked automatically
222 retro-actively so that the security leaves some room to stretch some rules.
223 This may sound not logic, because one of the main functions of security is
224 to enforce rules. But some rules are made with the different meanings.
225 For instance: a rule may be that private browsing isn't allowed.
226 The background of such a rule might be to try and reduce the amount
227 of data traffic (too many people downloading mp3's, or people not
228 getting to work anymore). By monitoring that specific fact
229 (bandwidth spent on non-business related Internet use)
230 it's possible to be relaxed on that rule and enable many good-willing
231 users reading his/hers daily newspaper.
232 </para>
233 <para>
234 The scope of the project is clearly limited to monitoring and not to
235 offer automated maintenance or web-based maintenance.
236 There are other projects currently being able to provide that
237 functionality. We will focus on intelligence and user-friendliness
238 of representation of facts presented. A warning should trigger
239 an administrator to get up and do something using the tools he or she values the most.
240 </para>
241 <para>
242 Also we are not aiming to replace great tools like SNORT as a real-time IDS.
243 These tools can do thing, that in the beginning won't be a part of gnucomo
244 out of performance reasons. Also there is no need to duplicate what they
245 already did. If that energy is placed in intelligent we're very complimentary.
246 Gnucomo can however be a reality check on an existing NIDS (Network Intrusion
247 Detection System). For instance if warnings keep coming it may be time to
248 rethink the rules that have been set.
249 </para>
250
251 <para>
252 This evolves to the following list of functions gnucomo can provide:
253 </para>
254 <itemize>
255   <item> Intrusion detection </item>
256   <item> Detecting hacker attempts </item>
257   <item> Early detection of system failures </item>
258   <item> Exhaustion of system resources </item>
259   <item> Capacity planning for future expansion </item>
260   <item> Spotting bottlenecks in a system.  </item>
261   <item> Verifying system integrity </item>
262   <item> Assistance with troubleshooting </item>
263   <item> Perform post-mortem forensics </item>
264   <item> Incident response system.  </item>
265 </itemize>
266 </chapter>
267
268 <chapter>
269    <heading>Decisions for the overall system.</heading>
270
271 <para>
272 In order to get the project running we have to make some decisions before
273 we can start. Of course are the decisions always open for review,
274 but initially our main aim is to get a system running. This doesn't
275 mean that we allow a lesser architecture, but more that we create an
276 environment that will lead to results.
277 </para>
278 <para>
279 The following decisions apply to the system in general:
280 </para>
281 <itemize>
282   <item>
283     The major part of the system will be used for security features.
284     The solution itself has to be secure.
285   </item>
286   <item>
287     In general we strive to be as platform and application independent as possible.
288     However to achieve software to get ready and to assure progress some selections
289     will have to be made excluding options for applications<footnote>An example is
290     in the database. By using stored procedures and triggers MySQL cannot be used.
291     However the data integrity at that point is more important than the ability to
292     use MySQL.</footnote>. Where possible we will enable ports to other applications
293     and platforms.
294   </item>
295   <item>
296     The computers collecting the data will only be Linux machines,
297     with future support for other Unices. However it is not aim our
298     to port this part of the project to other platforms just now.
299   </item>
300   <item>
301     The database system will make heavy use of stored procedures and
302     triggers and thus lock out some less feature-full database.
303   </item>
304   <item>
305     Although we're not married to a database system initially this will be
306     PostgreSQL only so that we can build for results. The code however
307     shouldn't be build to deliberately lock outer systems.
308     Other database that might be interesting to add: DB2, Oracle
309     (if the rainfall of security advisories seems to be over) and Informix.
310   </item>
311   <item>
312     The interface for the user will be a web-interface written in PHP
313     with PostgreSQL-database access. Despite the fact that initially
314     this will be the preferred way to communicate with our system,
315     other interfaces are welcome and should be supported.
316   </item>
317   <item>
318     The technologies used for the daemons on the central site and remote
319     site are open for discussion. A decision is made when it is clear what
320     exactly will be needed to code.
321   </item>
322   <item>
323     The original logfiles on systems will not be harmed in any way,
324     but will be saved the way they presented to gnucomo.
325   </item>
326   <item>
327     In the database processed data as well as raw data will be stored.
328   </item>
329   <item>
330     Our main aim is to ease the life of the administrator when dealing with
331     the symptoms of a machine so that he doesn't miss important notifications.
332     The project will be made around detection. We won't focus on making a
333     maintenance applications but solely on monitoring, because other applications
334     like webmin or linuxconf do already deliver such functionality.
335     We are complementary to those applications. This doesn't mean that
336     the system cannot send SMS'es, e-mails or make alarms sound.
337   </item>
338   <item>
339     Any output of the logbook will be stored and sent within a certain
340     interval which can be set. By doing that the mechanism will not flood
341     the total mechanism and overload machines.
342   </item>
343   <item>
344     When applications for gnucomo we will try and do the non-server part
345     as platform independent as possible. This in order to prevent writing
346     a same application multiple times. For instance one for Unices, one
347     for Macintosh and one for Microsoft.
348   </item>
349   <item>
350     To ensure the quality of software and to prevent any unwanted functionality
351     rolling into the project all code will be reviewed by one of the lead members
352     before it is accepted. Since this project is aimed at throughput speed no
353     formal procedures will be enforced, but we promise not to let software in
354     that hasn't been checked.
355   </item>
356 </itemize>
357
358 </chapter>
359
360 <chapter>
361   <heading>Overall system Architecture</heading>
362
363 <para>
364 The overall systems aims to make maintenance data better accessible and by
365 doing that lowering the barrier to be on alert for intrusions,
366 system failure and other misery that can happen to computer systems.
367 Also more systems can be monitored and even focus can be placed on desktop computers,
368 something that nowadays rarely happens. Since the solution is only aimed at
369 monitoring (with some responses possible) other people can watch their system(s)
370 without being Administrator<footnote>This can be interesting for people using
371 this service and not doing their own maintenance (smaller companies).
372 If technical action needs to be taken a warning can be send to an administrator.
373 This saves costs and time.</footnote>.
374 </para>
375 <para>
376 The main system will know to sides:
377 </para>
378
379 <itemize>
380   <item> Central Application - server </item>
381   <item> Monitored System - client </item>
382 </itemize>
383
384 <para>
385 The project has been setup as a two sided system in order to be able to
386 guard many computers at the same time.
387 However it may be obvious that both sides of the application can very
388 well be installed on a single system.
389 </para>
390 <para>
391 To monitor a system, Gnucomo uses two kinds of input: <emph>event</emph> and
392 <emph>parameters</emph>. Events occur on a system while it is running and reflect
393 the transient behaviour of the system.
394 Parameters reflect the current state of the system.
395 The most obvious way to gather events from a monitored system is to read
396 the system log files.
397 Examples of events are IP packets that are rejected by the firewall or clients
398 that access the http daemon.
399 Parameters are obtained for example by reading configuration files or kernel
400 data structures.
401 Examples of parameters are the size and free space of a filesystem or
402 the users that are listed in the password file.
403 Both kinds of input are obtained actively or passively, i.e. by installing probe
404 agents in the system which regularly aquire the system's parameters or passively
405 by sending the output of programs to the Gnucomo server.
406 </para>
407 <para>
408 When signals<footnote>A signal can be the outcome of process that finished,
409 logbook entries, warnings from intrusion detection systems,
410 etc. </footnote> arrive they will be stored in a file.
411 When this file is delivered to a certain directory a daemon will detect
412 this and start the transfer of the file. The file will be transferred
413 to the central application or the client. This transfer will be triggered
414 immediately after a process has finished or with a certain time-interval
415 when it concerns a logbook. All output will be placed in a directory where
416 the daemon detects it and ensures the transport. For transport currently
417 only two mechanisms will be supported:
418 </para>
419 <itemize>
420   <item>
421     Encrypted file copy relying on the SSH protocol.
422     On Unix-based systems this will scp (secure copy).
423   </item>
424   <item>
425     E-Mail. The e-mail is encrypted and signed using gpg and then sent to the server.
426     Since the file format will identify the type-of-output the Subject-field of
427     the e-mail is not really needed.
428   </item>
429 </itemize>
430
431 <section>
432   <heading>Central Application: signal handler.</heading>
433
434 <para>
435 <para>
436
437   <picture src="architecture.png" eps="architecture"/>
438 </para>
439 <para>
440        Illustration 1 Basic overview of the processes on the server.
441 </para>
442
443 On one machine signals from the network will come in.
444 These signals can be logfiles, result files from applications,
445 remarks entered by the administrator or whatever.
446 Data delivery takes place into a certain directory.
447 A daemon detects that data has come in and will enter it into the database.
448 Once in the database stored procedures and triggers will recognize certain
449 behavior and generate alerts. The user responsible for the server will be
450 confronted with the alerts and can mark them, add comments to it or ignore them.
451 Also it will be possible to do intelligent analysis on not so logical relations
452 per computer or across computers<footnote>A good example could be a portscan
453 on a system that takes place during a week. Normal a simple portscan takes
454 place in a couple of minutes and will thus be easy to detect.
455 By taking a longer period such a scan is harder to detect. </footnote>. Such
456 scripts make detection possible, that is too time consuming to do during
457 processing of the data.
458 </para>
459 </section>
460
461 <section>
462   <heading>Data processing.</heading>
463
464 <para>The data processing has four tasks:</para>
465 <itemize>
466   <item>
467     Extracting data from e-mail and store it in the input-buffer.
468     This can be done by a daemon that checks the e-mail<footnote>It would be logical
469     to place an e-mail server like sendmail or postfix on the server.
470     In many cases the monitored computer will be featuring a SMTP daemon.
471     If a system is comprimised no evidence that comes through will be really
472     trustworthy. By sending it to another machine all evidence that is
473     available will have left the system the moment a hack takes place.</footnote>
474     with a certain interval extracts the e-mails and leave the content
475     in a file in the input buffer. This daemon has only rights to write
476     to the directory it has to write to. <emph>We may as well have the
477     email captured directly by a program with a
478     "gnucomo: |/usr/local/bin/gnucomo-input" - like alias.</emph>
479   </item>
480   <item>
481     Detect files in the input buffer decrypt the content and verify the signature.
482     Another daemon will see the log-files and starts checking if the origin is
483     correct (by verifying the signature) and decrypting the content.
484     The legible files will be processed by entering the data into the database.
485   </item>
486   <item>
487     The database will accept the data and perform a certain number of
488     checks as the data comes in. During the processing of the data
489     abnormalities will be detected and entered into a notification table.
490     The database system will also carry out more complex tasks on given
491     moments in time and enter them as well in the notification table.
492   </item>
493   <item>
494     The database system must be able to undertake action when high
495     alerts are being entered into the database.
496     This can be a couple of things to begin with:
497     send an e-mail or SMS. In a later stage other technologies may be added as well.
498     In this scheme we also make a possibility to escalate problems when no
499     action is taken in a certain amount of time.
500   </item>
501 </itemize>
502
503 <subsection>
504 <heading>System Parameters</heading>
505
506 <para>
507 Gnucomo maintains the operational parameters of a monitored system for a
508 number of reasons.
509 The most important reason is to create notifications when somthing about a
510 parameter changes while the parameter is not supposed to change.
511 Such a change may be intended by the system administrator, e.g. when a
512 package is upgraded, or there may be something wrong.
513 In any case, you will want to know about a change in your system when it happens.
514 Furthermore, a change history of a parameter's values will come in
515 handy when you want to look back in time and figure out
516 what happened in the past.
517 Another usefull application of parameters concerns the maintenance of a 
518 large number of similar systems.
519 When the parameters of each system are reported regularly to Gnucomo,
520 deviations from the 'standard' system configuration can be easily spotted.
521 </para>
522 <para>
523 Some properties of parameters are supposed to change regularly.
524 A changed value of such a property will of course not lead to any
525 notification.
526 On the other hand, the change history of these parameters may provide
527 interesting information about the monitored system.
528 This leads to the distiction between static and dynamic properties of parameters.
529 The difference between dynamic and static properties manifests itself mainly
530 in the change history of the parameter's property.
531 Dynamic properties typically have a change record once a day or even a couple
532 of times a day.
533 Change records for static properties are usually months apart.
534 </para>
535 <para>
536 The state of parameters is scanned or probed regularly on a client system
537 and reported to the Gnucomo server.
538 These reports can be created in a variety of ways.
539 For example, filesystems are reported with 'df', installled packages with 'rpm -qa',
540 users by reading /etc/passwd, etc.
541 Many other probing methods may be implemented.
542 Each report from a probe holds the current value of several parameters.
543 Gnucomo will check each property of these parameters against the stored knwon value.
544 If the property's value changed, the actual value in the database is updated
545 and a record is added to the change history of the parameter.
546 </para>
547 </subsection>
548 </section>
549
550 <section>
551   <heading>Web interface</heading>
552
553 <para>
554 The web interface will used to interact with the user.
555 The interface should be intuitive and easy to understand.
556 More important warnings should directly draw attention.
557 The user must be able to perform settings so that warnings
558 can be rated differently than the original settings.
559 </para>
560 <para>
561 The interface will do the following things:
562 </para>
563 <itemize>
564   <item>
565     Show a list of warnings that are currently open.
566   </item>
567   <item>
568     It must be possible to sort the list on all the fields shown.
569   </item>
570   <item>
571     Deliver detailed information (logbook entries) upon request that have led to the warning.
572   </item>
573   <item>
574     Undertake certain actions like sending
575     <reference href="mailto:abuse@internet-provider.net">abuse@internet-provider.net</reference>
576     e-mails with information.
577   </item>
578   <item>
579     Monitor actions on outstanding issues.
580   </item>
581 </itemize>
582 <para/>
583 </section>
584
585 <section>
586   <heading>Priority mechanism.</heading>
587 <para>
588 Each notification has a certain priority that requires a different handling
589 of the issue. How each priority will be dealt with is something that can
590 be set per server. The priority mechanism is a simple system of five
591 categories (can be more or less).
592 </para>
593 </section>
594
595 <section>
596   <heading>The dataflow diagram.</heading>
597 <para>The main dataflow will be as follows.</para>
598 <para>
599   <picture src="dataflow.png" eps="dataflow" scale="0.7"/>
600 </para>
601 <para/>
602 </section>
603
604 <section>
605   <heading>Sending messages to the central gnucomo system.</heading>
606
607 <para>
608 One of the main tasks is getting all the messages to the database.
609 Ultimately gnucomo will support multiple ways of receiving the data.
610 Basically anything goes, but two mechanisms will be supported in the project
611 to begin with:
612 </para>
613 <enumerate>
614     <item>
615       E-mail. Messages and elements from logfiles will be sent through e-mail.
616     </item>
617     <item>
618       File copy. Using technologies like scp or ftp (not preferred due to
619       the insecure nature) can place files directly in the receiving directory.
620     </item>
621 </enumerate>
622
623 <subsection>
624   <heading>Ensuring data integrity.</heading>
625 <para>&lt;TO BE DESCRIBED&gt;</para>
626 </subsection>
627
628 <subsection>
629   <heading>Directories and filenames on the server.</heading>
630
631 <para>
632 Files will be dealt with as if gnucomo were a user (actually there will
633 be a user gnucomo). The files will be placed in the <code>/home/gnucomo/</code> directory.
634 Only <code>/home/gnucomo/incoming/dropbox/</code> can be used to save data in
635 from external systems. All other directories are only available for the user gnucomo.
636 The filename will represent the data that is received. The details are seperated with
637 underscores. When data is sent by e-mail the filename will be written in the first
638 line of the e-mail. A typical filename looks like this:
639 </para>
640
641 <para>
642 <strong>3_messages_20020807235208_1.asc</strong>
643 </para>
644
645 <para>
646 the logic behind this is following:
647 </para>
648
649 <para>
650 <emph>urgency_typeofmessage_timestamp_objectid.typeoffile.</emph>
651 </para>
652
653 <table cpos='lp{10cm}'>
654   <thead>
655     <col>
656       <para>Part of filename</para>
657     </col>
658     <col>
659       <para>Explanation</para>
660     </col>
661   </thead>
662   <row>
663     <col>
664       <para>Urgency</para>
665     </col>
666     <col>
667       <para>This indicates the urgency of the file. The lower the number the higher
668             it will rank when an overview is given. Standard files are ranked value 3.
669             The ranking works as follows:</para>
670       <para>* 1 <strong>Urgent flash message.</strong> Something urgent needs to
671             be reported. This is only used for emergencies like serious alarms.</para>
672       <para>* 2 <strong>Rapid delivery.</strong> An important message has to get
673             through that is more important than normal delivery, but is not top
674             priority like an emergency.</para>
675       <para>* 3 <strong>Normal.</strong> This is used in most
676             case for normal messages.</para>
677       <para>* 4 <strong>Low priority.</strong> This is data would be useful
678             to place into the system as nice to have.</para>
679     </col>
680   </row>
681   <row>
682     <col>
683       <para>TypeOfMessage</para>
684     </col>
685     <col>
686       <para>This is an indicator what type of data is delivered to gnucomo.
687             There are several categories:</para>
688       <para>* <strong>cron.</strong> This data comes from the /var/log/cron-log (unix).</para>
689       <para>* <strong>httpaccess.</strong> This data comes from the normal http-log (Apache).</para>
690       <para>* <strong>httperror.</strong> This data comes from the http_error-log (Apache).</para>
691       <para>* <strong>maillog.</strong> This data comes from the /var/log/maillog (unix).</para>
692       <para>* <strong>messages.</strong> The data delivered here comes from
693             the /var/log/messages file (unix)</para>
694       <para>* <strong>text.</strong> This file contains a message in plaintext
695             generated by a gnucomo-client and can be anything.
696             It will be dealt with as plaintext.</para>
697     </col>
698   </row>
699   <row>
700     <col>
701       <para>Timestamp</para>
702     </col>
703     <col>
704       <para>The timestamp is made in war-log (YYYYMMDDHHMMSS) format.
705             The timestamp is generated on the client in GMT (to discover
706             discrepancies in timing).</para>
707     </col>
708   </row>
709   <row>
710     <col>
711       <para>Objectid</para>
712     </col>
713     <col>
714       <para>The objectid is the id that is used within the central
715             gnucomo system to recognize the client.
716             Based on this entry the database can link the data to the correct object.
717             Also gpg can obtain the correct e-mail address (by running a query
718             in the database) for verification of the signature of the crypted message.</para>
719     </col>
720   </row>
721   <row>
722     <col>
723       <para>TypeOfFile</para>
724     </col>
725     <col>
726       <para>Indicates the file type:</para>
727       <para>* <strong>asc.</strong> Plaintext ASCII</para>
728       <para>* <strong>gpg.</strong> gpg-crypted data.</para>
729       <para>* <strong>und.</strong> Undertermined data. When files
730             come in by e-mail it is not 100% sure if they are crypted
731             or not. These data has first to be analyzed before it is
732             moved to the correct queue. </para>
733     </col>
734   </row>
735 </table>
736
737 <subsubsection>
738   <heading>Directory for incoming data.</heading>
739
740 <para>
741 For incoming messages there will be separate directories
742 (<code>/home/gnucomo/incoming/</code>)for:
743 </para>
744 <enumerate>
745     <item>
746       Dropbox. This directory is ready to receive data from all sorts of systems.
747       This directory is world writeable (<strong><emph>but not deleteable!</emph></strong>):
748       <code>/home/gnucomo/incoming/dropbox/</code>
749     </item>
750     <item>
751       Encrypted messages. In this directory messages will be placed that are still
752       gpg-crypted. In this directory the files await decryption and verification of
753       the signature. This directory is: <code>/home/gnucomo/incoming/crypted/</code>
754     </item>
755     <item>
756       Decrypted with errors. During the decryption exercise anything can go wrong.
757       Decrypting can fail or the signature may show errors. If this happens the
758       original message is moved to a different directory:
759       <code>/home/gnucomo/incoming/cryptfail/</code>
760     </item>
761     <item>
762       Inbox. After successful decryption the decrypted message is moved to the inbox.
763       Data that is not encrypted can be moved here from the dropbox after certain
764       verifications. The directory is: <code>/home/gnucomo/incoming/inbox/</code>
765     </item>
766     <item>
767       Processed. After processing the data the file is stored in the directory
768       processed for further reference for a certain amount of time.
769       The directory is: <code>/home/gnucomo/incoming/processed/</code>
770     </item>
771     <item>
772       Archive. After a certain period the files will be archived.
773       Since not every system will archive everything this directory may
774       also be a symbolic link to <code>/dev/null</code>.
775       The used directory is: <code>/home/gnucomo/archive/</code>
776     </item>
777 </enumerate>
778 </subsubsection>
779
780 <subsubsection>
781    <heading>Directory for outgoing data.</heading>
782
783 <para>
784 For outgoing messages the directory <code>/home/gnucomo/outgoing</code> will
785 be used. This directory knows a couple of sub directories:
786 </para>
787
788 <enumerate>
789     <item>
790       Dropbox. This directory is used by the central gnucomo system to
791       place outgoing messages in.
792       The used directory is: <code>/home/gnucomo/outgoing/dropbox/</code>
793     </item>
794     <item>
795       Outbox. After processing the message (including signing and encrypting
796       when applicable) the messages are placed in the outbox:
797       <code>/home/gnucomo/outgoing/outbox/</code>
798     </item>
799     <item>
800       Processed. After processing the data the file is stored in the
801       directory processed for further reference for a certain amount
802       of time. After sending a message a confirmation will be made that
803       is saved as an incoming message.
804       The directory is: <code>/home/gnucomo/outgoing/processed/</code>
805     </item>
806     <item>
807       Archive. After a certain period the files will be archived.
808       Since not every system will archive everything this directory
809       may also be a symbolic link to <code>/dev/null</code>.
810       The used directory is: <code>/home/gnucomo/archive/</code>
811     </item>
812 </enumerate>
813
814 </subsubsection>
815
816 <subsubsection>
817    <heading>Overview. </heading>
818
819 <para>The total directory-structure looks like this:</para>
820
821 <verbatim>
822     /home/gnucomo/
823     /home/gnucomo/archive
824     /home/gnucomo/incoming
825     /home/gnucomo/incoming/crypted
826     /home/gnucomo/incoming/cryptfail
827     /home/gnucomo/incoming/dropbox
828     /home/gnucomo/incoming/inbox
829     /home/gnucomo/incoming/processed
830     /home/gnucomo/outgoing
831     /home/gnucomo/outgoing/dropbox
832     /home/gnucomo/outgoing/outbox
833     /home/gnucomo/outgoing/processed
834 </verbatim>
835
836 </subsubsection>
837 </subsection>
838
839 <subsection>
840   <heading>Directories on the client-side.</heading>
841
842 <para>
843 On the client-side the files that need to be transmitted will be placed in a
844 directory system as well. In the future this system may not be in use at all
845 devices (routers, certain MS Windows-machine, IP Telephones, etc.). For those
846 systems a different mechanism will become be described here.
847 Initially we focus on Linux systems that will enter data into the database.
848 </para>
849 <para>
850 The filename convention will be totally identical to the filename
851 convention on the server, since this the same mechanism.
852 </para>
853 <para>
854 To facilitate gnucomo client and server on one and the same machine
855 the gnucomo-client should have a different default user.
856 For this purpose the user <strong>gcm_client</strong> will be created.
857 </para>
858
859 <subsubsection>
860    <heading>Directory for incoming data.</heading>
861 <para>
862 For incoming messages there will be separate directories
863 (<code>/home/gnucomo/incoming/</code>)for:
864 </para>
865 <enumerate>
866     <item>
867       Dropbox. This directory is ready to receive data from all sorts of systems.
868       This directory is world writeable (<emph><strong>but not deleteable!</strong></emph>):
869       <code>/home/gcm_client/incoming/dropbox/</code>
870     </item>
871     <item>
872       Encrypted messages. In this directory messages will be placed that
873       are still gpg-crypted. In this directory the files await decryption
874       and verification of the signature.
875       This directory is: <code>/home/gcm_client/incoming/crypted/</code>
876     </item>
877     <item>
878       Decrypted with errors. During the decryption exercise anything can go wrong.
879       Decrypting can fail or the signature may show errors.
880       If this happens the original message is moved to a different directory:
881       <code>/home/gcm_client/incoming/cryptfail/</code>
882     </item>
883     <item>
884       Inbox. After successful decryption the decrypted message is moved
885       to the inbox. Data that is not encrypted can be moved here from
886       the dropbox after certain verifications. The directory is:
887       <code>/home/gcm_client/incoming/inbox/</code>
888     </item>
889     <item>
890       Processed. After processing the data the file is stored
891       in the directory processed for further reference for a
892       certain amount of time. The directory is:
893       <code>/home/gcm_client/incoming/processed/</code>
894     </item>
895 </enumerate>
896
897 </subsubsection>
898
899 <subsubsection>
900    <heading>Directory for outgoing data.</heading>
901
902 <para>
903 For outgoing messages the directory <code>/home/gcm_client/outgoing</code> will be used.
904 This directory knows a couple of sub directories:
905 </para>
906 <enumerate>
907     <item>
908       Dropbox. This directory is used by the central gnucomo system to place
909       outgoing messages in.
910       The used directory is: <code>/home/gcm_client/outgoing/dropbox/</code>
911     </item>
912     <item>
913       Outbox. After processing the message (including signing and
914       encrypting when applicable) the messages are placed in the outbox:
915       <code>/home/gcm_client/outgoing/outbox/</code>
916     </item>
917     <item>
918       Processed. After processing the data the file is stored in the
919       directory processed for further reference for a certain amount
920       of time. After sending a message a confirmation will be made
921       that is saved as an incoming message.
922       The directory is: <code>/home/gcm_client/outgoing/processed/</code>
923     </item>
924 </enumerate>
925 </subsubsection>
926
927 <subsubsection>
928   <heading>Overview. </heading>
929     <para>The total directory-structure looks like this:</para>
930
931 <verbatim>
932     /home/gcm_client/
933     /home/gcm_client/archive
934     /home/gcm_client /incoming
935     /home/gcm_client/incoming/crypted
936     /home/gcm_client/incoming/cryptfail
937     /home/gcm_client/incoming/dropbox
938     /home/gcm_client/incoming/inbox
939     /home/gcm_client/incoming/processed
940     /home/gcm_client/outgoing
941     /home/gcm_client/outgoing/dropbox
942     /home/gcm_client/outgoing/outbox
943     /home/gcm_client/outgoing/processed
944 </verbatim>
945 </subsubsection>
946 </subsection>
947 </section>
948
949 <section>
950       <heading>Getting data into the database.</heading>
951
952 <para>
953 The files in the /home/gnucomo/incoming/inbox/ should be stored in the database.
954 For this purpose there is a table <emph>unprocessed_log</emph>.
955 The data of the filename as well as the content of the file need
956 to be placed in one record.
957 </para>
958 <para>
959 There are some fields that have to be addressed immediately:
960 </para>
961 <enumerate>
962     <item>
963       Servicecode: The servicecode will be obtained out of the filename the
964       is the type_of_message-field in the filename.
965     </item>
966     <item>
967       Objectid: This data is given in the filename it can be found
968       in the <emph>objectid</emph>-part of the filename.
969     </item>
970     <item>
971       Logdata: The data is saved as follows: filename (unaltered)
972       &lt;CR&gt;textual data of the file.
973     </item>
974 </enumerate>
975 <para>
976 The daemon application that delivers the data is called <strong>gcm-input</strong>.
977 It performs the following steps with no extra functionality:
978 </para>
979
980 <enumerate>
981     <item>
982       <para>Detect if a file is available.</para>
983     </item>
984     <item>
985       <para>Write the data in the database.</para>
986     </item>
987 </enumerate>
988
989 <para>
990 To write the data in the database a database user gcm_input exists.
991 This user has only the right to enter data into the database.
992 There are no deletion, update or select-permissions.
993 </para>
994
995 </section>
996 </chapter>
997
998 <chapter>
999   <heading><label name='database'/>The database.</heading>
1000
1001 <para>
1002 The database is the heart of the system.
1003 It will contain all event-data of multiple computers.
1004 The intelligence that can be performed on the database will be placed there.
1005 To do this as integratedly as possible stored procedures and triggers will be used.
1006 To begin with we have selected checks to be performed that will be
1007 expanded throughout time.
1008 </para>
1009 <para>
1010 Since the gnucomo database and files contain sensitive data
1011 security measures have to be in place. Several database users
1012 will exist that have limited rights to perform a certain task
1013 ensuring some protection against unauthorized access.
1014 However these mechanisms on it's own will work fine, bad maintenance may still
1015 screw-up good security. Good database maintenance is needed.
1016 For the gnucomo the protection of the valid authentic nature of
1017 the data in the database has our highest priority.
1018 </para>
1019 <para>
1020 A <emph>table-name</emph> in this chapter is written in cursive writing.
1021 </para>
1022
1023 <section>
1024   <heading>Database conventions.</heading>
1025
1026 <para>
1027 The database will be built according the following conventions:
1028 </para>
1029 <itemize>
1030   <item>
1031     All names for tables, indexes and fields will be written in lower
1032     case and will be singular. Spaces in names are not allowed.
1033   </item>
1034   <item>
1035     If a table contains field referring to other tables the mother-tables are
1036     mentioned in alphabetical order with an underscore between the table-names.
1037     So <emph>object</emph> and <emph>user</emph>
1038     will make a third table <emph>object_user</emph>
1039   </item>
1040   <item>
1041     A data access user (being the interface) is not allowed to write to
1042     the log-entries and the warnings. To change the state of a warning
1043     a stored procedure will do so by having a different entry in a table.
1044     This should make it possible to discover who did what at which moment in time.
1045   </item>
1046   <item>
1047     The name of two related fields that make the relationship between two
1048     tables will be the same to avoid confusion.
1049   </item>
1050 </itemize>
1051 </section>
1052
1053 <section>
1054   <heading>Database design.</heading>
1055
1056 <para>
1057 In the design we anticipate to deliver an as best as possible database performance.
1058 That means that data that needs to be entered occasionally can be heavily indexed
1059 to increase performance. However data that is mainly stored will only be indexed
1060 marginally to have the best possible performance on data entry. If during one of
1061 the checks on data-entry a notification is made, the information related to that
1062 notification will be indexed very well to increase retrieval performance.
1063 What we will try to avoid is that the user interface will cause full table
1064 scan and affect the performance of the overall system dramatically.
1065 One of the techniques to increase performance on display is to work with views.
1066 So where it is feasible we will use them.
1067 </para>
1068
1069 <para>
1070 The following model pictures the database as described in the remainder
1071 of this chapter.
1072 </para>
1073 <para>
1074       <picture src="erd.png" eps="erd" scale="0.7"/>
1075 </para>
1076
1077 <para>
1078 In general the database must also be maintained well.
1079 So daily maintenance scripts should keep the performance good<footnote>PostgreSQL seems
1080 to have very good features to do proper maintenance and they have to be exploited to
1081 the full extend.</footnote>.
1082 </para>
1083
1084 </section>
1085 <section>
1086   <heading>Actual design.</heading>
1087
1088 <para>
1089 In this part of the chapter the tables will be explained and then described
1090 with all important elements. Per table a sub-chapter will be created.
1091 Each table will have a table design, indexes, relationships and the required data
1092 (for those tables where the data itself is relevant in the design or sample data
1093 (for those cases where no set data is needed). For the relationships beside a
1094 description the subset of the total schema has been incorporated in
1095 the document so that it is more clear what exactly is meant.
1096 Due to the complex nature of the design those drawings sometimes will seem funny.
1097 </para>
1098 <para>
1099 For the fieldtypes the types of PostgreSQL will be used.
1100 These values can be found in Chapter 3 of the PostgreSQL User Manual
1101 (<reference href="http://www.postgresql.org/">http://www.postgresql.org</reference>).
1102 </para>
1103 <para>
1104 For indexes primary keys are always <emph>unique</emph> and called
1105 primary key in the name. Since unique indexes within PostgreSQL only
1106 work on B-Tree indexes (which is default) we will use B-Tree for all indexes.
1107 In cases where an exception is made the used type of index will be indicated
1108 in the characteristics. A footnote will explain why a different type of
1109 index has been selected.
1110 </para>
1111
1112 <subsection>
1113 <heading>action</heading>
1114
1115 <para>
1116 In the table action all recognized actions that can be taken are stored.
1117 Several actions will lead to change in <emph>statuscode</emph>.
1118 However this doesn't apply to all actions<footnote>A status NEW
1119 of a notification that cannot be dealt with automatically will
1120 <strong>not</strong> change before a user looked at it.</footnote>.
1121 Actions take place through background processes and the interface.
1122 This table mainly is used for retrieval so indexing will be done as much as possible.
1123 </para>
1124
1125 <subsubsection>
1126   <heading>The fields.</heading>
1127
1128 <para>
1129 The table below describes the fields:
1130 </para>
1131 <para/>
1132 <para>
1133 <table cpos='lllp{6cm}'>
1134   <thead>
1135     <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1136     <col>
1137       Remarks
1138     </col>
1139   </thead>
1140   <row>
1141     <col> actionid </col> <col> Bigserial </col> <col> 8 </col>
1142     <col>
1143       Autonumber bigint (eight bit)
1144     </col>
1145   </row>
1146   <row>
1147     <col> actionname </col> <col> Text </col> <col> <para/> </col>
1148     <col>
1149       Short descriptive name for the type of action
1150     </col>
1151   </row>
1152   <row>
1153     <col> statuscode </col> <col> Varchar </col> <col> 3 </col>
1154     <col>
1155       New status that will be given to a notification when this action takes place.
1156     </col>
1157   </row>
1158   <row>
1159     <col> description </col> <col> Text </col> <col> <para/> </col>
1160     <col>
1161       A longer description (without limit) on the action.
1162     </col>
1163   </row>
1164 </table>
1165 </para>
1166
1167 </subsubsection>
1168
1169 <subsubsection>
1170   <heading>The indexes.</heading>
1171
1172 <para>
1173 Indices for this table are:
1174 </para>
1175     <table cpos='lll'>
1176       <thead>
1177         <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1178       </thead>
1179       <row>
1180         <col> act_pk </col> <col> actionID </col> <col> Primary key </col>
1181       </row>
1182       <row>
1183         <col> act_actionname </col> <col> actionname </col> <col> Unique </col>
1184       </row>
1185       <row>
1186         <col> act_statuscode </col> <col> statuscode </col> <col> <para/> </col>
1187       </row>
1188     </table>
1189     <para/>
1190
1191 </subsubsection>
1192 <subsubsection>
1193   <heading>The relationships.</heading>
1194
1195 <para>
1196 Relationships with other tables:
1197 </para>
1198     <table cpos='llp{7cm}'>
1199       <thead>
1200         <col> Fieldname </col> <col> Remote Table </col> <col> Remarks </col>
1201       </thead>
1202       <row>
1203         <col> actionid </col> <col> action_notification_user </col>
1204         <col>
1205           Each action that takes place will be log. The Actionid will bring
1206           classification to the individual records. This relationship has to be enforced.
1207         </col>
1208       </row>
1209     </table>
1210     <para>In the model this looks like this:</para>
1211     <para>
1212       <picture src="erd-action.png" eps="erd-action"/>
1213     </para>
1214 </subsubsection>
1215
1216 <subsubsection>
1217   <heading>Default data in table.</heading>
1218
1219 <para>
1220 The data in this table is standard for the system and part of the design.
1221 The user cannot change this or add value to it.
1222 </para>
1223
1224 <table cpos='p{1cm}p{2cm}p{1.5cm}p{6cm}'>
1225   <thead>
1226     <col>Actionid</col><col>Actionname</col><col>Statuscode</col>
1227     <col>
1228       Description
1229     </col>
1230   </thead>
1231   <row>
1232     <col>1</col><col>Entry in the system</col><col>NEW</col>
1233     <col>
1234       This indicates that a notification is entered into the system. The status is a <strong>NEW</strong>.
1235     </col>
1236   </row>
1237   <row>
1238     <col>2</col><col>Displayed to user</col><col>OPN</col>
1239     <col>
1240       The notification has been displayed to the user.
1241       It is not guaranteed that the user has read the notification,
1242       but he/she should be aware of it.
1243       The status will now be changed to <strong>OPEN</strong> if the current
1244       status is <strong>NEW</strong>.
1245     </col>
1246   </row>
1247   <row>
1248     <col>3</col><col>Remarks added</col><col>PEN</col>
1249     <col>
1250       Remarks have been added to the notification. The status has now been
1251       changed to <strong>PENDING</strong>.
1252     </col>
1253   </row>
1254   <row>
1255     <col>4</col><col>Priority changed manually</col><col>PEN</col>
1256     <col>
1257       The priority of the notification has been changed by the user.
1258       The new status is now <strong>PENDING</strong>.
1259     </col>
1260   </row>
1261   <row>
1262     <col>5</col><col>Priority changed automatically</col><col>PEN</col>
1263     <col>
1264       The priority of the notification has been changed by the system.
1265       If the status is not <strong>OPEN</strong> or <strong>NEW</strong> the new
1266       status is become <strong>PENDING</strong>.
1267     </col>
1268   </row>
1269   <row>
1270     <col>6</col><col>Action taken</col><col>PEN</col>
1271     <col>
1272       A action has been taken. The status is now <strong>PENDING</strong>.
1273     </col>
1274   </row>
1275   <row>
1276     <col>7</col><col>Assignment to user</col><col>PEN</col>
1277     <col>
1278       A notification has been explicitly assigned to another user.
1279       The status is now <strong>PENDING</strong>.
1280     </col>
1281   </row>
1282   <row>
1283     <col>8</col><col>More information or research needed.</col><col>INV</col>
1284     <col>
1285       The notification is relevant and will be handled, however more information
1286       or research will be needed. The status is <strong>UNDER INVESTIGATION</strong>.
1287     </col>
1288   </row>
1289   <row>
1290     <col>9</col><col>Make output reference.</col><col>REF</col>
1291     <col>
1292       Automated output from an object has been sent to gnucomo.
1293       The input has been identified as a valid reference for future.
1294       Status is now <strong>REFERENCE</strong><footnote>A reference is used to
1295       find differences in output. This feature must reduce the number of wrongful alerts.
1296       Only if a change has taken place a notification is generated.
1297       First time reports will always generate a notification.
1298       By signing this off the system will be silent again.</footnote>.
1299     </col>
1300   </row>
1301   <row>
1302     <col>10</col><col>Job output no longer reference.</col><col>CLS</col>
1303     <col>
1304       By making a newer job output reference this output has been obsoleted.
1305       Since once it was a reference the notification can be closed.
1306       The new status for the notification is now <strong>CLOSED</strong>.
1307     </col>
1308   </row>
1309   <row>
1310     <col>11</col><col>Action taken please verify.</col><col>VRF</col>
1311     <col>
1312       An action has been taken and things should have been resolved.
1313       Before the notification can be closed a verification has to be done.
1314       New status is now <strong>VERIFY</strong>.
1315     </col>
1316   </row>
1317   <row>
1318     <col>12</col><col>Action not accepted.</col><col>PEN</col>
1319     <col>
1320       A check has been done and the results were not good.
1321       New verification is needed.
1322       New status is now <strong>PENDING</strong>.
1323     </col>
1324   </row>
1325   <row>
1326     <col>13</col><col>Action verified</col><col>CLS</col>
1327     <col>
1328       The verification for the action has been done and the action is approved.
1329       The new status is now <strong>CLOSED</strong>.
1330     </col>
1331   </row>
1332   <row>
1333     <col>14</col><col>E-mail sent</col>
1334       <col>OPN<footnote>Only if the status is <strong>NEW</strong>.</footnote></col>
1335     <col>
1336       An e-mail has been sent.
1337     </col>
1338   </row>
1339   <row>
1340     <col>15</col><col> SMS sent </col>
1341       <col>OPN<footnote>Only if the status is <strong>NEW</strong>.</footnote></col>
1342     <col>
1343       A SMS has been sent.
1344     </col>
1345   </row>
1346   <row>
1347     <col>16</col><col>Fax sent</col>
1348       <col>OPN<footnote>Only if the status is <strong>NEW</strong>.</footnote></col>
1349     <col>
1350       A fax has been sent.
1351     </col>
1352   </row>
1353   <row>
1354     <col>17</col><col>Log-entries shown</col><col>XXXX</col>
1355     <col>
1356       The log entries have been shown. No changes to the status made.
1357     </col>
1358   </row>
1359   <row>
1360     <col>18</col><col>Notification closed</col><col>CLS</col>
1361     <col>
1362       Notification has been closed.
1363     </col>
1364   </row>
1365   <row>
1366     <col>19</col><col>Notification reopened</col><col>OPN</col>
1367     <col>
1368       Notification has been re-opened
1369     </col>
1370   </row>
1371 </table>
1372 </subsubsection>
1373
1374 </subsection>
1375
1376 <subsection>
1377    <heading>Action_notification_user.</heading>
1378
1379 <para>
1380 In the table action_notification_user each step that is taken regarding a
1381 notification is logged. This table is very important for later use if
1382 something goes wrong, but is also relevant for the interface.
1383 All steps of a notification can be traced here.
1384 There will be a lot of entries here, but retrieval is more crucial for
1385 performance than data entry. So indexing on logic fields is very relevant.
1386 Processing might be slower, but that's worth the price.
1387 </para>
1388
1389 <subsubsection>
1390   <heading>The fields.</heading>
1391
1392 <para>
1393 The table below describes the fields:
1394 </para>
1395
1396 <table cpos='lllp{6cm}'>
1397   <thead>
1398     <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1399     <col>
1400       Remarks
1401     </col>
1402   </thead>
1403   <row>
1404     <col> actionstepid </col> <col> Bigserial </col> <col> 8 </col>
1405     <col>
1406       Autonumber bigint (eight bit)
1407     </col>
1408   </row>
1409   <row>
1410     <col> actionid </col> <col> Bigint </col> <col> 8 </col>
1411     <col>
1412       Reference to the action that is being registered here.
1413     </col>
1414   </row>
1415   <row>
1416     <col> username </col> <col> Text </col> <col> <para/> </col>
1417     <col>
1418       The username of the user that is involved in the action.
1419     </col>
1420   </row>
1421   <row>
1422     <col> notificationid </col> <col> Bigint </col> <col> 8 </col>
1423     <col>
1424       Reference to the notification.
1425     </col>
1426   </row>
1427   <row>
1428     <col> timestamp </col> <col> Timestamp </col> <col> <para/> </col>
1429     <col>
1430       The time when the action has been entered into the system.
1431       This is the time without the timezone<footnote>The timestamp without
1432       time has been selected, since this is the system time.
1433       To have the system functioning without any physical borders one
1434       of the settings on the system is time in GMT (UTC).
1435       This ensures also the added value of the system log.</footnote>.
1436       This will be automatically added when the record is added into the database.
1437     </col>
1438   </row>
1439   <row>
1440     <col> statuscode </col> <col> Varchar </col> <col> 3 </col>
1441     <col>
1442       The status of the Notification
1443     </col>
1444   </row>
1445   <row>
1446     <col> remarks </col> <col> Text </col> <col> <para/> </col>
1447     <col>
1448       Remarks entered by the user if it concerns a manual action
1449       or the text of automatically generated warnings.
1450     </col>
1451   </row>
1452 </table>
1453
1454 </subsubsection>
1455
1456 <subsubsection>
1457   <heading>The indexes.</heading>
1458
1459 <para>
1460 The table is indexed on the following fields:
1461 </para>
1462
1463 <table cpos='lll'>
1464   <thead>
1465     <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1466   </thead>
1467   <row>
1468     <col> anu_pk (action_user_actionstepid_key) </col> <col> actionstepid </col>
1469     <col> Primary key </col>
1470   </row>
1471   <row>
1472     <col> anu_actionid </col> <col> actionid </col> <col> <para/> </col>
1473   </row>
1474   <row>
1475     <col> anu_username </col> <col> username </col> <col> <para/> </col>
1476   </row>
1477   <row>
1478     <col> anu_notificationid </col> <col> notificationid </col> <col> <para/> </col>
1479   </row>
1480   <row>
1481     <col> anu_timestamp </col> <col> timestamp </col> <col> <para/> </col>
1482   </row>
1483   <row>
1484     <col> anu_statuscode </col> <col> statuscode </col> <col> <para/> </col>
1485   </row>
1486 </table>
1487 </subsubsection>
1488
1489 <subsubsection>
1490   <heading>The relationships.</heading>
1491
1492 <para>
1493 Relationships with other tables:
1494 </para>
1495 <table cpos='llp{7cm}'>
1496   <thead>
1497     <col> Fieldname </col> <col> Remote Table </col>
1498     <col> Remarks </col>
1499   </thead>
1500   <row>
1501     <col> actionid </col> <col> action </col>
1502     <col>
1503       Indicates the action that has been taken. The relationship has to be enforced.
1504     </col>
1505   </row>
1506   <row>
1507     <col> notificationid </col> <col> notification </col>
1508     <col>
1509       Each action that takes place is registered in this table.
1510       By using the notification the relevant notification. The relationship has to be enforced.
1511     </col>
1512   </row>
1513   <row>
1514     <col> username </col> <col> user </col>
1515     <col>
1516       Each step in the process has to be related to the user.
1517       If the system itself generates an action the user will be
1518       <strong>gnucomo</strong><footnote>This implies that the system
1519       automatically has an username gnucomo.</footnote>.
1520     </col>
1521   </row>
1522 </table>
1523
1524 <para>
1525 In the model this looks like this:
1526 </para>
1527 <para>
1528 <picture src="erd-anu.png" eps="erd-anu"/>
1529 </para>
1530
1531 </subsubsection>
1532
1533 <subsubsection>
1534   <heading>Sample data.</heading>
1535
1536 <para>
1537 Since no data is delivered automatically a couple of sample records are shown here.
1538 </para>
1539
1540     <table cpos='p{1cm}p{1cm}p{1cm}lllp{4cm}'>
1541       <thead>
1542         <col> Actionstepid </col> <col> Actionid </col> <col> Notificationid </col>
1543         <col> Username </col> <col> Timestamp </col> <col> Status </col>
1544         <col> Remarks </col>
1545       </thead>
1546       <row>
1547         <col> 1 </col> <col> 1 </col> <col> 1 </col> <col> Gnucomo </col>
1548         <col> 2002-07-14 16:14:09 </col> <col> NEW </col>
1549         <col>
1550           Gnucomo detected a portscan
1551         </col>
1552       </row>
1553       <row>
1554         <col> 2 </col> <col> 5 </col> <col> 1 </col> <col> Gnucomo </col>
1555         <col> 2002-07-14 16:14:09 </col> <col> NEW </col>
1556         <col>
1557           Priority set to: 3
1558         </col>
1559       </row>
1560       <row>
1561         <col> 3 </col> <col> 5 </col> <col> 1 </col> <col> Gnucomo </col>
1562         <col> 2002-07-14 16:14:09 </col> <col> OPN </col>
1563         <col>
1564           <para>Automatic e-mail to user:
1565       <reference href="mailto:brenno@dewinter.com">brenno@dewinter.com</reference>:</para>
1566           <para>Gnucomo detected a portscan on system
1567       <reference href="http://gnucomo.dewinter.com/">gnucomo.dewinter.com</reference></para>
1568         </col>
1569       </row>
1570       <row>
1571         <col> 4 </col> <col> 2 </col> <col> 1 </col> <col> Brenno </col>
1572         <col> 2002-07-14 16:18:09 </col> <col> OPN </col>
1573         <col>
1574           Notification shown through webinterface.
1575         </col>
1576       </row>
1577       <row>
1578         <col> 5 </col> <col> 17 </col> <col> 1 </col> <col> Brenno </col>
1579         <col> 2002-07-14 16:18:12 </col> <col> PEN </col>
1580         <col>
1581           <para/>
1582         </col>
1583       </row>
1584       <row>
1585         <col> 6 </col> <col> 4 </col> <col> 1 </col> <col> Brenno </col>
1586         <col> 2002-07-14 16:20:37 </col> <col> PEN </col>
1587         <col>
1588           Priority set to: 1
1589         </col>
1590       </row>
1591       <row>
1592         <col> 7 </col> <col> 3 </col> <col> 1 </col> <col> Brenno </col>
1593         <col> 2002-07-1416:21:58 </col> <col> PEN </col>
1594         <col>
1595           After reviewing the logs I see a portscan. On very specific ports. More analysis needed.
1596         </col>
1597       </row>
1598       <row>
1599         <col> 8 </col> <col> 3 </col> <col> 1 </col> <col> Brenno </col>
1600         <col> 2002-07-14 16:24:59 </col> <col> PEN </col>
1601         <col>
1602           Services tables learns me that all services are aimed at Windows-based services.
1603       Attempts for platform specific expoits.
1604         </col>
1605       </row>
1606       <row>
1607         <col> 9 </col> <col> 4 </col> <col> 1 </col> <col> Brenno </col>
1608         <col> 2002-07-14 16:25:03 </col> <col> PEN </col>
1609         <col>
1610           Priority set to: 4
1611         </col>
1612       </row>
1613       <row>
1614         <col> 10 </col> <col> 2 </col> <col> 1 </col> <col> Brenno </col>
1615         <col> 2002-07-14 16:30:09 </col> <col> PEN </col>
1616         <col>
1617           Notification shown through webinterface.
1618         </col>
1619       </row>
1620       <row>
1621         <col> 11 </col> <col> 3 </col> <col> 1 </col> <col> Brenno </col>
1622         <col> 2002-07-14 16:31:48 </col> <col> PEN </col>
1623         <col>
1624           Portscan has finished and no other action seems to take place now.
1625         </col>
1626       </row>
1627       <row>
1628         <col> 12 </col> <col> 18 </col> <col> 1 </col> <col> Brenno </col>
1629         <col> 2002-07-14 16:43:03 </col> <col> CLS </col>
1630         <col>
1631           <para/>
1632         </col>
1633       </row>
1634     </table>
1635     </subsubsection>
1636 </subsection>
1637
1638 <subsection>
1639 <heading>history</heading>
1640 <para>
1641 The history table records all changes to properties of parameters.
1642 </para>
1643
1644 <subsubsection>
1645 <heading>The fields</heading>
1646 <para>
1647 The fields of the <emph>history</emph> table are listed below:
1648 </para>
1649 <table cpos='lllp{6cm}'>
1650       <thead>
1651         <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1652         <col> Remarks </col>
1653       </thead>
1654       <row>
1655         <col>paramid</col><col>bigint</col><col>8</col>
1656         <col>The parameter to which this history belongs. Refers to the parameter table</col>
1657       </row>
1658       <row>
1659         <col>modified</col><col>timestamp</col><col> </col>
1660         <col>Time at which the property value or parameter changed</col>
1661       </row>
1662       <row>
1663         <col>change_nature</col><col>enum</col><col> </col>
1664         <col>Parameter created to destroyed; property value changed</col>
1665       </row>
1666       <row>
1667         <col>changed_property</col><col>text</col><col> </col>
1668         <col>Name of the parameter's property that changed.</col>
1669       </row>
1670       <row>
1671         <col>new_value</col><col>text</col><col> </col>
1672         <col>The new actual value of the property at the time of modification</col>
1673       </row>
1674       <row>
1675         <col>remark</col><col>text</col><col> </col>
1676         <col>A short explanation of why the property changed</col>
1677       </row>
1678 </table>
1679
1680 <para>
1681 Each time something about a parameter changes, this is recorded in the
1682 change history of the paraneter.
1683 When such a change happens, one of three things may occur to a parameter,
1684 as stated in the 'change_nature' field:
1685
1686 <enumerate>
1687 <item>A new parameter is created.</item>
1688 <item>The value of one of the properties was altered.</item>
1689 <item>The parameter is removed.</item>
1690 </enumerate>
1691
1692 When  a parameter is created or destroyed, the fields 'changed_property' and
1693 'new_value' are irrelevant.
1694 </para>
1695
1696 </subsubsection>
1697 </subsection>
1698
1699 <subsection>
1700   <heading>log &amp; log_adv. </heading>
1701
1702 <para>
1703 To store the log-data there are two tables in use that have a one-on-one relationship.
1704 The logic behind this is the difference between raw-always needed data and the somewhat
1705 processed data to support basic retrieval.
1706 The last category isn't always used and when it's used it is redundant.
1707 Also the raw log is very important to the integrity of the system.
1708 For these reasons the processed data has been physically separated in a
1709 second table called <emph>log_adv</emph>.
1710 If needed a view will be available that combines the two tables.
1711 Despite the load indexing on <emph>log_adv</emph> will be done thoroughly.
1712 </para>
1713 </subsection>
1714
1715 <subsection>
1716   <heading>log.</heading>
1717
1718 <subsubsection>
1719   <heading>The fields of log.</heading>
1720
1721 <para>
1722 The fields in log are focussed around the raw data and the data needed
1723 to link this to other tables in the system.
1724 </para>
1725
1726 <table cpos='lllp{6cm}'>
1727   <thead>
1728     <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1729     <col>
1730       Remarks
1731     </col>
1732   </thead>
1733   <row>
1734     <col> logid </col> <col> Bigserial </col> <col> 8 </col>
1735     <col>
1736       Autonumber bigint (eight bit)
1737     </col>
1738   </row>
1739   <row>
1740     <col> objectid </col> <col> Bigint </col> <col> 8 </col>
1741     <col>
1742       Reference to the object that submitted this log entry
1743     </col>
1744   </row>
1745   <row>
1746     <col> original_filename </col> <col> Text </col> <col> <para/> </col>
1747     <col>
1748       This field refers to the filename that contained this entry.
1749       The original entries as received by the gnucomo-server (flat files).
1750       The files are sent in batches, which makes it very hard to find where the
1751       original logline is. This will enable to see the files to detect
1752       bugs in gnucomo if any occur.
1753       It may well be that in a later stage this functionality becomes obsolete.
1754     </col>
1755   </row>
1756   <row>
1757     <col> servicecode </col> <col> Text </col> <col> <para/> </col>
1758     <col>
1759       This field explains what service was recognized (for instance 'kernel, 'httpd' or 'smtp')
1760     </col>
1761   </row>
1762   <row>
1763     <col> type_of_logid </col> <col> Bigint </col> <col> 8 </col>
1764     <col>
1765       Reference to the table type_of_log that contains information on what
1766       type of log/report we have here (how gnucomo recognized it).
1767     </col>
1768   </row>
1769   <row>
1770     <col> object_timestamp </col> <col> Timestamp </col> <col> 8 </col>
1771     <col>
1772       Timestamp as has been written into the log.
1773     </col>
1774   </row>
1775   <row>
1776     <col> timestamp </col> <col> Timestamp </col> <col> <para/> </col>
1777     <col>
1778       The time when the action has been entered into the system.
1779       This is the time without the timezone<footnote>The timestamp without time
1780       has been selected, since this is the system time.
1781       To have the system functioning without any physical borders one of
1782       the settings on the system is time in GMT (UTC).
1783       This ensures also the added value of the system log.</footnote>.
1784       This will be generated upon entry into the database.
1785     </col>
1786   </row>
1787   <row>
1788     <col> rawdata </col> <col> TEXT </col> <col> <para/> </col>
1789     <col>
1790       The raw log data
1791     </col>
1792   </row>
1793 </table>
1794 </subsubsection>
1795
1796 <subsubsection>
1797   <heading>The indexes.</heading>
1798
1799 <para>
1800 The indices of the table:
1801 </para>
1802
1803 <table cpos='lll'>
1804   <thead>
1805     <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1806   </thead>
1807   <row>
1808     <col> log_pk (log_logid_key) </col> <col> logid </col> <col> Primary key </col>
1809   </row>
1810   <row>
1811     <col> log_objectid </col> <col> objectid </col> <col> <para/> </col>
1812   </row>
1813   <row>
1814     <col> log_original_filename </col> <col> original_filename </col> <col> <para/> </col>
1815   </row>
1816   <row>
1817     <col> log_servicecode </col> <col> servicecode </col> <col> <para/> </col>
1818   </row>
1819   <row>
1820     <col> log_type_of_logid </col> <col> type_of_logid </col> <col> <para/> </col>
1821   </row>
1822   <row>
1823     <col> log_object_timestamp </col> <col> object_timestamp </col> <col> <para/> </col>
1824   </row>
1825   <row>
1826     <col> log_timestamp </col> <col> timestamp </col> <col> <para/> </col>
1827   </row>
1828 </table>
1829 </subsubsection>
1830
1831 <subsubsection>
1832   <heading>The relationships.</heading>
1833
1834 <para>
1835 Relationships with other tables:
1836 </para>
1837
1838 <table cpos='llp{6cm}'>
1839   <thead>
1840     <col> Fieldname </col> <col> Remote Table </col>
1841     <col>
1842       Remarks
1843     </col>
1844   </thead>
1845   <row>
1846     <col> objectid </col> <col> object </col>
1847     <col>
1848       This make the link from what object the logline came
1849     </col>
1850   </row>
1851   <row>
1852     <col> type_of_logid </col> <col> type_of_log </col>
1853     <col>
1854       Each logbook has a certain type of reporting.
1855       This explains what type of log was received (and thus which rules for detection was applied).
1856     </col>
1857   </row>
1858   <row>
1859     <col> systemuser </col> <col> user </col>
1860     <col>
1861       Links a registered user of an object to this log
1862       entry<footnote>Upon entry of an object most of the times the
1863       passwd-file (UNIX-systems) or the userlist will serve as the entrypoint of users.
1864       Non existing users will be added and will have to be verified by an
1865       administrator before this entry become definite.</footnote>.
1866     </col>
1867   </row>
1868 </table>
1869
1870 <para>In the model this looks like this:</para>
1871     
1872 <para>
1873   <picture src="erd-log.png" eps="erd-log"/>
1874 </para>
1875
1876     
1877 </subsubsection>
1878 <subsubsection>
1879   <heading>The fields of log_adv.</heading>
1880
1881 <para>
1882 The fields of the table <emph>log_adv</emph> are shown below:
1883 </para>
1884
1885 <table cpos='lllp{6cm}'>
1886   <thead>
1887     <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1888     <col>
1889       Remarks
1890     </col>
1891   </thead>
1892   <row>
1893     <col> logid </col> <col> Bigint </col> <col> 8 </col>
1894     <col>
1895       Bigint (eight bit) 1-to-1 relationship with log
1896     </col>
1897   </row>
1898   <row>
1899     <col> source_ip </col> <col> Inet </col> <col> <para/> </col>
1900     <col>
1901       This is the IP-address (V4) of the host that sended the data.
1902     </col>
1903   </row>
1904   <row>
1905     <col> destination_ip </col> <col> Inet </col> <col> <para/> </col>
1906     <col>
1907       This is the IP-address (V4) of the host that was targetted.
1908     </col>
1909   </row>
1910   <row>
1911     <col> mac_address </col> <col> Macaddr </col> <col> <para/> </col>
1912     <col>
1913       This is the MAC-address logged
1914     </col>
1915   </row>
1916   <row>
1917     <col> packetlength </col> <col> Int </col> <col> <para/> </col>
1918     <col>
1919       The length of the packet
1920     </col>
1921   </row>
1922   <row>
1923     <col> protocol </col> <col> Text </col> <col> <para/> </col>
1924     <col>
1925       The protocol used for transmission(mostly TCP/UDP/ICMP).
1926     </col>
1927   </row>
1928   <row>
1929     <col> source_port </col> <col> Int </col> <col> <para/> </col>
1930     <col>
1931       The portnumber used at origin.
1932     </col>
1933   </row>
1934   <row>
1935     <col> destination_port </col> <col> Int </col> <col> <para/> </col>
1936     <col>
1937       The portnumber for the target
1938     </col>
1939   </row>
1940   <row>
1941     <col> messageid </col> <col> Text </col> <col> <para/> </col>
1942     <col>
1943       Messageid for e-mails
1944     </col>
1945   </row>
1946   <row>
1947     <col> system_username </col> <col> Text </col> <col> <para/> </col>
1948     <col>
1949       Username on the object
1950     </col>
1951   </row>
1952   <row>
1953     <col> networkdevice </col> <col> Text </col> <col> <para/> </col>
1954     <col>
1955       When this is about network-traffic the device that worked the data
1956     </col>
1957   </row>
1958 </table>
1959 </subsubsection>
1960
1961 <subsubsection>
1962   <heading>The indexes.</heading>
1963
1964 <para>
1965 The table is indexed on the following fields:
1966 </para>
1967
1968 <table cpos='lll'>
1969   <thead>
1970     <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1971   </thead>
1972   <row>
1973     <col> loa_logid </col> <col> logid </col> <col> Primary key </col>
1974   </row>
1975   <row>
1976     <col> loa_source_ip </col> <col> source_ip </col> <col> <para/> </col>
1977   </row>
1978   <row>
1979     <col> loa_destination_ip </col> <col> destination_ip </col> <col> <para/> </col>
1980   </row>
1981   <row>
1982     <col> loa_mac_address </col> <col> mac_address </col> <col> <para/> </col>
1983   </row>
1984   <row>
1985     <col> loa_packetlength </col> <col> packetlength </col> <col> <para/> </col>
1986   </row>
1987   <row>
1988     <col> loa_protocol </col> <col> protocol </col> <col> <para/> </col>
1989   </row>
1990   <row>
1991     <col> loa_source_port </col> <col> source_port </col> <col> <para/> </col>
1992   </row>
1993   <row>
1994     <col> loa_destination_port </col> <col> destination_port </col> <col> <para/> </col>
1995   </row>
1996   <row>
1997     <col> loa_messageid </col> <col> messageid </col> <col> <para/> </col>
1998   </row>
1999   <row>
2000     <col> loa_system_username </col> <col> system_username </col> <col> <para/> </col>
2001   </row>
2002   <row>
2003     <col> networkdevice </col> <col> networkdevice </col> <col> <para/> </col>
2004   </row>
2005 </table>
2006 </subsubsection>
2007
2008 <subsubsection>
2009   <heading>The relationships.</heading>
2010
2011 <para>
2012 There is only one relation with this table.
2013 </para>
2014
2015 <table cpos='llp{6cm}'>
2016   <thead>
2017     <col> Fieldname </col> <col> Remote Table </col>
2018     <col>
2019       Remarks
2020     </col>
2021   </thead>
2022   <row>
2023     <col> Logid </col> <col> Log </col>
2024     <col>
2025       This will make a link to the table <emph>log</emph>. The relationship is a one-on-one relationship.
2026     </col>
2027   </row>
2028 </table>
2029 </subsubsection>
2030
2031 <subsubsection>
2032   <heading>Sample data combined from log and log_adv.</heading>
2033
2034 <para>
2035 The sample data derrived here has been gathered in logs.
2036 Since the tablestructure is very long the representation is somewhat different:
2037 </para>
2038
2039 <table cpos='lp{8cm}'>
2040   <thead>
2041     <col> Fieldname </col> <col> Value.  </col>
2042   </thead>
2043   <row>
2044     <col> Logid </col> <col> 1 </col>
2045   </row>
2046   <row>
2047     <col> Objectid </col> <col> 1 </col>
2048   </row>
2049   <row>
2050     <col> Original_filename </col> <col> 7f0100.messages.20020714231801 </col>
2051   </row>
2052   <row>
2053     <col> Rawdata </col>
2054     <col>
2055       Jul 14 18:16:42 webber kernel: IN=eth0 OUT= MAC=00:60:67:36:61:a5:00:90:69:60:c0:5d:08:00 SRC=193.79.237.146 DST=212.204.216.11 LEN=40 TOS=0x00 PREC=0x00 TTL=245 id=19308 DF PROTO=TCP SPT=36375 DPT=113 WINDOW=8760 RES=0x00 RST URGP=0
2056     </col>
2057   </row>
2058   <row>
2059     <col> Type_of_logid </col> <col> 1 </col>
2060   </row>
2061   <row>
2062     <col> Timestamp </col> <col> 2002-07-14 23:29:01 </col>
2063   </row>
2064   <row>
2065     <col> Object_timestamp </col> <col> 2002-07-14 18:16:42 </col>
2066   </row>
2067   <row>
2068     <col> Source_ip </col> <col> 193.79.237.146 </col>
2069   </row>
2070   <row>
2071     <col> Destination_ip </col> <col> 212.204.216.11 </col>
2072   </row>
2073   <row>
2074     <col> Mac_address </col> <col> 00:60:67:36:61:a5:00:90:69:60:c0:5d:08:00 </col>
2075   </row>
2076   <row>
2077     <col> Packetlength </col> <col> 40 </col>
2078   </row>
2079   <row>
2080     <col> Protocol </col> <col> TCP </col>
2081   </row>
2082   <row>
2083     <col> Source_port </col> <col> 36375 </col>
2084   </row>
2085   <row>
2086     <col> Destination_port </col> <col> 113 </col>
2087   </row>
2088   <row>
2089     <col> Messageid </col> <col> <para/> </col>
2090   </row>
2091   <row>
2092     <col> Systemuser </col> <col> <para/> </col>
2093   </row>
2094   <row>
2095     <col> Networkdevice </col> <col> eth0 </col>
2096   </row>
2097 </table>
2098 </subsubsection>
2099 </subsection>
2100
2101 <subsection>
2102   <heading>log_notification. </heading>
2103
2104 <para>
2105 In the log_notification the logbook entries that have caused an alert to occur are saved.
2106 When this table is used something has been detected.
2107 As this is clearly an intermediate table we anticipate to design checks where
2108 multiple entries in a log-file can lead to one notification.
2109 For forensics indexing will be focussed on retrieval speed.
2110 </para>
2111
2112 <subsubsection>
2113   <heading>The fields.</heading>
2114
2115 <para>
2116 The fields are listed below:
2117 </para>
2118
2119 <table cpos='lllp{6cm}'>
2120   <thead>
2121     <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
2122     <col>
2123       Remarks
2124     </col>
2125   </thead>
2126   <row>
2127     <col> notificationid </col> <col> Bigint </col> <col> 8 </col>
2128     <col>
2129       Reference to the notification
2130     </col>
2131   </row>
2132   <row>
2133     <col> logid </col> <col> Bigint </col> <col> 8 </col>
2134     <col>
2135       Reference to the logbook
2136     </col>
2137   </row>
2138 </table>
2139
2140 </subsubsection>
2141 <subsubsection>
2142   <heading>The indexes.</heading>
2143
2144 <para>
2145 The table is indexed on the following fields:
2146 </para>
2147 <table cpos='lll'>
2148   <thead>
2149     <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
2150   </thead>
2151   <row>
2152     <col> lon_pk </col> <col>notificationid </col> <col>Primary key </col>
2153   </row>
2154   <row>
2155     <col> <para/> </col> <col>logid </col> <col>Primary key (second field) </col>
2156   </row>
2157   <row>
2158     <col>lon_notificationid </col> <col> notificationid </col> <col> <para/> </col>
2159   </row>
2160   <row>
2161     <col> lon_logid </col> <col>logid </col> <col> <para/> </col>
2162   </row>
2163 </table>
2164 </subsubsection>
2165
2166 <subsubsection>
2167   <heading>The relationships.</heading>
2168
2169 <para>
2170 Relationships with other tables:
2171 </para>
2172
2173 <table cpos='llp{8cm}'>
2174   <thead>
2175     <col> Fieldname </col> <col> Remote Table </col>
2176     <col>
2177       Remarks
2178     </col>
2179   </thead>
2180   <row>
2181     <col> Logid </col> <col> Log </col>
2182     <col>
2183       Indicates the log-entry that was on of the triggers that led to the notification.
2184     </col>
2185   </row>
2186   <row>
2187     <col> NotificationID </col> <col> Notification </col>
2188     <col>
2189       Indicates the notification where the entry in the log was a trigger.
2190     </col>
2191   </row>
2192 </table>
2193
2194 <para>In the model this look like this:</para>
2195 <para>
2196   <picture src="erd-lognotif.png" eps="erd-lognotif"/>
2197 </para>
2198 </subsubsection>
2199
2200 <subsubsection>
2201   <heading>Sample data.</heading>
2202 <para>
2203 Some sample data:
2204 </para>
2205
2206 <table cpos='ll'>
2207   <thead>
2208     <col> LogID </col> <col> NotificationID </col>
2209   </thead>
2210   <row>
2211     <col> 4 </col> <col> 1 </col>
2212   </row>
2213   <row>
2214     <col> 5 </col> <col> 1 </col>
2215   </row>
2216   <row>
2217     <col> 8 </col> <col> 1 </col>
2218   </row>
2219   <row>
2220     <col> 9 </col> <col> 1 </col>
2221   </row>
2222   <row>
2223     <col> 5 </col> <col> 2 </col>
2224   </row>
2225   <row>
2226     <col> 6 </col> <col> 2 </col>
2227   </row>
2228   <row>
2229     <col> 11 </col> <col> 2 </col>
2230   </row>
2231 </table>
2232 </subsubsection>
2233 </subsection>
2234
2235 <subsection>
2236   <heading>notification. </heading>
2237
2238 <para>
2239 In this table all detected issues per object will be written.
2240 Issues are entered based on immediate detection, periodical detection or manually.
2241 Since this table is mostly used to work from in the interface being in control is crucial.
2242 When systems function properly more retrieval than data entry will take place.
2243 Also data retrieval will be done in all sorts of ways. Indexing must be huge to facilitate that.
2244 </para>
2245
2246 <subsubsection>
2247   <heading>The fields.</heading>
2248
2249 <para>
2250 The fields of the <emph>notification</emph> table are:
2251 </para>
2252
2253 <table cpos='lllp{6cm}'>
2254   <thead>
2255     <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
2256     <col>
2257       Remarks
2258     </col>
2259   </thead>
2260   <row>
2261     <col> notificationid </col> <col> Bigserial </col> <col> 8 </col>
2262     <col>
2263       Autonumber
2264     </col>
2265   </row>
2266   <row>
2267     <col> objectid </col> <col> Bigint </col> <col> 8 </col>
2268     <col>
2269       Reference to the <emph>object</emph>
2270     </col>
2271   </row>
2272   <row>
2273     <col> type_of_notification_id </col> <col> Bigint </col> <col> 8 </col>
2274     <col>
2275       Reference to the <emph>type_of_notification</emph> indicating what
2276       type of notification we have here and what basic rules apply.
2277     </col>
2278   </row>
2279   <row>
2280     <col> timestamp </col> <col> Timestamp </col> <col> <para/> </col>
2281     <col>
2282       Timestamp that this notification was created.
2283     </col>
2284   </row>
2285   <row>
2286     <col> statuscode </col> <col> Varchar </col> <col> 3 </col>
2287     <col>
2288       The status the actual status a notification has.
2289     </col>
2290   </row>
2291   <row>
2292     <col> priority </col> <col> Int </col> <col> 4 </col>
2293     <col>
2294       The priority that is given to this issue<footnote>Basically there will be
2295       five priority levels. The rule is that the lower the number gets the more
2296       urgent the issue is. At the moment the priority level is set by the system
2297       pre-defined actions will take place.</footnote>.
2298     </col>
2299   </row>
2300   <row>
2301     <col> escalation_count_timestamp </col> <col> Timestamp </col> <col> <para/> </col>
2302     <col>
2303       Timestamp since the last escalation took place<footnote>The system offers
2304       the possibility to automatically escalate issue if no action has been
2305       taken within a certain amount of time.
2306       Based on the status and the type of notification escalation can take place.</footnote>.
2307     </col>
2308   </row>
2309   <row>
2310     <col> repeat_notification_timestamp </col> <col> Timestamp </col> <col> <para/> </col>
2311     <col>
2312       Timestamp at which moment in time a repeat notification should occur<footnote>After
2313       this time has passed a notification is being resent.
2314       After a resent automatically a new time is set for another resent.
2315       If any actions takes place (except automated entries of course)
2316       the time is emptied so that an administrator will no longer be bothered by the system.</footnote>.
2317     </col>
2318   </row>
2319   <row>
2320     <col> securitylevel_view </col> <col> Int </col> <col> 4 </col>
2321     <col>
2322       The securitylevel that is needed to view this entry.
2323     </col>
2324   </row>
2325   <row>
2326     <col> securitylevel_add </col> <col> Int </col> <col> 4 </col>
2327     <col>
2328       Securitylevel to add information to this item or to undertake action
2329     </col>
2330   </row>
2331   <row>
2332     <col> securitylevel_close </col> <col> Int </col> <col> 4 </col>
2333     <col>
2334       The securitylevel needed to be able to close this notification.
2335     </col>
2336   </row>
2337 </table>
2338 </subsubsection>
2339
2340 <subsubsection>
2341   <heading>The indexes.</heading>
2342
2343 <para>
2344 The indices are:
2345 </para>
2346 <table cpos='lll'>
2347   <thead>
2348     <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
2349   </thead>
2350   <row>
2351     <col> not_pk (notification_notificationid_key) </col> <col> notificationid </col>
2352     <col> Primary key </col>
2353   </row>
2354   <row>
2355     <col> not_objectid </col> <col> objectid </col> <col> <para/> </col>
2356   </row>
2357   <row>
2358     <col> not_type_of_notificationid </col> <col> type_of_notificationid </col>
2359     <col> <para/> </col>
2360   </row>
2361   <row>
2362     <col> not_timestamp </col> <col> timestamp </col> <col> <para/> </col>
2363   </row>
2364   <row>
2365     <col> not_statuscode </col> <col> statuscode </col> <col> <para/> </col>
2366   </row>
2367   <row>
2368     <col> not_priority </col> <col> priority </col> <col> <para/> </col>
2369   </row>
2370   <row>
2371     <col> not_escalation_count_timestamp </col> <col> escalation_count_timestamp </col>
2372     <col> <para/> </col>
2373   </row>
2374   <row>
2375     <col>
2376       <para>not_repeat_notification_timestamp</para>
2377       <para>(not_repeat_notification_timesta)</para>
2378     </col>
2379     <col> repeat_notification_timestamp </col> <col> <para/> </col>
2380   </row>
2381 </table>
2382 </subsubsection>
2383
2384 <subsubsection>
2385   <heading>The relationships.</heading>
2386
2387 <para>
2388 Relationships with other tables:
2389 </para>
2390
2391 <table cpos='llp{8cm}'>
2392   <thead>
2393     <col> Fieldname </col> <col> Remote Table </col> <col> Remarks </col>
2394   </thead>
2395   <row>
2396     <col> Logid </col> <col> Log </col>
2397     <col>
2398       Indicates the log-entry that was on of the triggers that led to the notification.
2399     </col>
2400   </row>
2401   <row>
2402     <col> NotificationID </col> <col> Notification </col>
2403     <col>
2404       Indicates the notification where the entry in the log was a trigger.
2405     </col>
2406   </row>
2407 </table>
2408
2409 <para>In the model this look like this:</para>
2410 <para>
2411   <picture src="erd-notif.png" eps="erd-notif"/>
2412 </para>
2413 </subsubsection>
2414
2415 <subsubsection>
2416   <heading>Sample data.</heading>
2417
2418 <para>
2419 The following data is an example of a notification placed in the database.
2420 </para>
2421 <table cpos='ll'>
2422   <thead>
2423     <col> Fieldname </col> <col> Data </col>
2424   </thead>
2425   <row>
2426     <col> Notificationid </col> <col> 1 </col>
2427   </row>
2428   <row>
2429     <col> ObjectID </col> <col> 1 </col>
2430   </row>
2431   <row>
2432     <col> Type_of_notification_id </col> <col> 1 </col>
2433   </row>
2434   <row>
2435     <col> Timestamp </col> <col> 17-07-2002 16:07 </col>
2436   </row>
2437   <row>
2438     <col> Statuscode </col> <col> NEW </col>
2439   </row>
2440   <row>
2441     <col> Priority </col> <col> 3 </col>
2442   </row>
2443   <row>
2444     <col> Escalation_count_timestamp </col> <col> 17-07-2002 16:07 </col>
2445   </row>
2446   <row>
2447     <col> Repeat_notification_timestamp </col> <col> 17-07-2002 20:48PM </col>
2448   </row>
2449   <row>
2450     <col> Securitylevel_view </col> <col> 3 </col>
2451   </row>
2452   <row>
2453     <col> Securitylevel_add </col> <col> 3 </col>
2454   </row>
2455   <row>
2456     <col> Securitylevel_close </col> <col> 4 </col>
2457   </row>
2458 </table>
2459 </subsubsection>
2460 </subsection>
2461
2462 <subsection>
2463   <heading>object</heading>
2464
2465 <para>
2466 The <emph>object</emph> table contains general information on the objects being monitored.
2467 The table object will more be used for retrieval, since adding objects will be an
2468 occasional process. Anything that for some reason can be indexed ought to be indexed.
2469 </para>
2470
2471 <subsubsection>
2472   <heading>The fields.</heading>
2473
2474 <para>
2475 The fields are:
2476 </para>
2477 <table cpos='lllp{6cm}'>
2478   <thead>
2479     <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
2480     <col>
2481       Remarks
2482     </col>
2483   </thead>
2484   <row>
2485     <col> objectid </col> <col> Bigserial </col> <col> 8 </col>
2486     <col>
2487       Autonumbering code for the computer or device.
2488     </col>
2489   </row>
2490   <row>
2491     <col> objectname </col> <col> Text </col> <col> <para/> </col>
2492     <col>
2493       The hostname of the object
2494     </col>
2495   </row>
2496   <row>
2497     <col> objectcode </col> <col> Text </col> <col> <para/> </col>
2498     <col>
2499       Unique identifier (if existent) on the system<footnote>In Linux this will
2500       typically be the <emph>hostid</emph>.</footnote>.
2501     </col>
2502   </row>
2503   <row>
2504     <col> scp_enabled </col> <col> Boolean </col> <col> <para/> </col>
2505     <col>
2506       Can communication occur through scp (T = Yes / F = No)
2507     </col>
2508   </row>
2509   <row>
2510     <col> scp_inet </col> <col> Inet </col> <col> <para/> </col>
2511     <col>
2512       IP Address of the object for scp-data transfer.
2513     </col>
2514   </row>
2515   <row>
2516     <col> mail_enabled </col> <col> Boolean </col> <col> <para/> </col>
2517     <col>
2518       Can communication occur through e-mail (T = Yes/F = No).
2519     </col>
2520   </row>
2521   <row>
2522     <col> mail_from </col> <col> Text </col> <col> <para/> </col>
2523     <col>
2524       The e-mail address where e-mail will come from.
2525     </col>
2526   </row>
2527   <row>
2528     <col> sms_enabled </col> <col> Boolean </col> <col> <para/> </col>
2529     <col>
2530       Can communication occur through SMS (T = Yes/F = No).
2531     </col>
2532   </row>
2533   <row>
2534     <col> sms_number </col> <col> Text </col> <col> <para/> </col>
2535     <col>
2536       The SMS-number to send a notification to.
2537     </col>
2538   </row>
2539   <row>
2540     <col> fax_enabled </col> <col> Boolean </col> <col> <para/> </col>
2541     <col>
2542       Can communication occur through Fax (T = Yes/F = No).
2543     </col>
2544   </row>
2545   <row>
2546     <col> fax_number </col> <col> Text </col> <col> <para/> </col>
2547     <col>
2548       The fax-number to send a notification to.
2549     </col>
2550   </row>
2551   <row>
2552     <col>
2553       object_description
2554     </col>
2555     <col>
2556       Text
2557     </col>
2558     <col>
2559       <para/>
2560     </col>
2561     <col>
2562       Description of the object. What type of system is it
2563     </col>
2564   </row>
2565   <row>
2566     <col> object_owner </col> <col> Text </col> <col> <para/> </col>
2567     <col>
2568       Owner-details
2569     </col>
2570   </row>
2571   <row>
2572     <col> physical_location </col> <col> Text </col> <col> <para/> </col>
2573     <col>
2574       Physical address and when applicable entry-details needed to get to the object.
2575     </col>
2576   </row>
2577   <row>
2578     <col> timezone </col> <col> Text </col> <col> <para/> </col>
2579     <col>
2580       The timezone where this object is located<footnote>For objects that
2581       move around like PDA's and laptops the timezone can be the place where
2582       a person is stationed or better GMT.</footnote>.
2583     </col>
2584   </row>
2585   <row>
2586     <col> remark </col> <col> Text </col> <col> <para/> </col>
2587     <col>
2588       Additional remarks that shouldn't be in the previous TEXT fields.
2589     </col>
2590   </row>
2591 </table>
2592 </subsubsection>
2593
2594 <subsubsection>
2595   <heading>The indexes.</heading>
2596
2597 <para>
2598 The <emph>object</emph> table is indexed on the following fields:
2599 </para>
2600
2601 <table cpos='lll'>
2602   <thead>
2603     <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
2604   </thead>
2605   <row>
2606     <col> obj_pk (object_objectid_key) </col> <col> objectid </col> <col> Primary key </col>
2607   </row>
2608   <row>
2609     <col> obj_objectname </col> <col> objectname </col> <col> Unique </col>
2610   </row>
2611   <row>
2612     <col> obj_objectcode </col> <col> objectcode </col> <col> Unique </col>
2613   </row>
2614   <row>
2615     <col> obj_mail_from </col> <col> mail_from </col> <col> <para/> </col>
2616   </row>
2617 </table>
2618 </subsubsection>
2619
2620 <subsubsection>
2621   <heading>The relationships.</heading>
2622
2623 <para>
2624 The relationships with other tables are listed below:
2625 </para>
2626
2627 <table cpos='llp{8cm}'>
2628   <thead>
2629     <col> Fieldname </col> <col> Remote Table </col> <col> Remarks </col>
2630   </thead>
2631   <row>
2632     <col> ObjectID </col> <col> Log (adv) </col>
2633     <col> Reference to processed log-entries </col>
2634   </row>
2635   <row>
2636     <col> <para/> </col> <col> Notification </col>
2637     <col>
2638       Reference to the table <emph>notification</emph> that contains the notifications
2639       that have been created.
2640     </col>
2641   </row>
2642   <row>
2643     <col> <para/> </col> <col> Object_issue </col>
2644     <col>
2645       Reference to the <emph>object_issue</emph> that indicates how notifications have to be handled .
2646     </col>
2647   </row>
2648   <row>
2649     <col> <para/> </col> <col> Object_priority </col>
2650     <col>
2651       Reference to the <emph>object_priority</emph> table that indicates how a
2652       certain level of priority has to be dealt with.
2653     </col>
2654   </row>
2655   <row>
2656     <col> <para/> </col> <col> Object_system_user </col>
2657     <col>
2658       Reference to a list of system user to discover abnormalities in user behaviour.
2659     </col>
2660   </row>
2661   <row>
2662     <col> <para/> </col> <col> Object_user </col>
2663     <col> Reference to the <emph>object_user</emph> </col>
2664   </row>
2665   <row>
2666     <col> <para/> </col> <col> Unprocessed_log </col>
2667     <col>
2668       Reference to the entries that have not been processed at all.
2669     </col>
2670   </row>
2671 </table>
2672
2673 <para>In the relationshipmodel this looks like this:</para>
2674 <para>
2675   <picture src="erd-object.png" eps="erd-object"/>
2676 </para>
2677 </subsubsection>
2678
2679 <subsubsection>
2680   <heading>Sample data.</heading>
2681 <para>
2682 There is no preset data and therefor it's an example has been created.
2683 The table has quite some fields so the example has the fieldname in the
2684 left column and the data in the right column.
2685 </para>
2686 <table cpos='lp{6cm}'>
2687       <thead>
2688         <col> Fieldname </col>
2689         <col> Sample data </col>
2690       </thead>
2691       <row>
2692         <col> Objectid </col>
2693         <col> 1 </col>
2694       </row>
2695       <row>
2696         <col> Objectname </col>
2697         <col> webber.dewinter.com </col>
2698       </row>
2699       <row>
2700         <col> Objectcode </col>
2701         <col> 7f0100 </col>
2702       </row>
2703       <row>
2704         <col> Scp_enabled </col>
2705         <col> T </col>
2706       </row>
2707       <row>
2708         <col> Scp_inet </col>
2709         <col> 192.168.221.212 </col>
2710       </row>
2711       <row>
2712         <col> Mail_enabled </col>
2713         <col> T </col>
2714       </row>
2715       <row>
2716         <col> Mail_from </col>
2717         <col> <reference href="mailto:gnucomo@maintenance.dewinter.com">gnucomo@maintenance.dewinter.com</reference> </col>
2718       </row>
2719       <row>
2720         <col> Sms_enabled </col>
2721         <col> T </col>
2722       </row>
2723       <row>
2724         <col> Sms_number </col>
2725         <col> 06-XXXXXXXX </col>
2726       </row>
2727       <row>
2728         <col> Fax_enabled </col>
2729         <col> T </col>
2730       </row>
2731       <row>
2732         <col> Fax_number </col>
2733         <col> 0318-XXXXXX </col>
2734       </row>
2735       <row>
2736         <col> Object_description </col>
2737         <col> 19 inch 4 units, AMD-300 with two 27Gb disks (RAID-0), 256Mb memory </col>
2738       </row>
2739       <row>
2740         <col> Object_owner </col>
2741         <col>
2742           <para>Brenno de Winter</para>
2743           <para>De Winter Information Solutions</para>
2744           <para>Your street here 32</para>
2745           <para>9999 XX YOUR CITY</para>
2746           <para>THE NETHERLANDS</para>
2747           <para>Phone: +31 XXX XXX XXX</para>
2748         </col>
2749       </row>
2750       <row>
2751         <col> Physical_location </col>
2752         <col>
2753           <para>Internet Provider XYZ</para>
2754           <para>Your street here 38</para>
2755           <para>9999 XX YOUR CITY</para>
2756           <para>THE NETHERLANDS</para>
2757           <para>Phone: +31 XXX XXX XXX</para>
2758           
2759           <para>Dataroom. System: Q7845</para>
2760         </col>
2761       </row>
2762       <row>
2763         <col> Remark </col>
2764         <col>
2765           <para>A replacement system is available at the office location. The following persons have been authorized to enter the data room at the ISP:</para>
2766           <para>* Arjen Baart</para>
2767           <para>* Peter Busser</para>
2768           <para>* Brenno de Winter</para>
2769         </col>
2770       </row>
2771     </table>
2772     <para/>
2773 </subsubsection>
2774 </subsection>
2775
2776 <subsection>
2777   <heading>object_issue. </heading>
2778 <para>
2779 This table will store the policy on a certain issue like the priority being
2780 recognized and special actions to take.
2781 Since policies are utilized by the systems continuously all other process will rely on this index,
2782 while users will change the values occasionally.
2783 </para>
2784
2785 <subsubsection>
2786   <heading>The fields.</heading>
2787
2788 <para>
2789 The fields of <emph>object_issue</emph>:
2790 </para>
2791
2792 <table cpos='lllp{6cm}'>
2793       <thead>
2794         <col>
2795           <para>Fieldname</para>
2796         </col>
2797         <col>
2798           <para>Fieldtype</para>
2799         </col>
2800         <col>
2801           <para>Size</para>
2802         </col>
2803         <col>
2804           <para>Remarks</para>
2805         </col>
2806       </thead>
2807       <row>
2808         <col>
2809           <para>objectid</para>
2810         </col>
2811         <col>
2812           <para>Bigint</para>
2813         </col>
2814         <col>
2815           <para>8</para>
2816         </col>
2817         <col>
2818           <para>Reference to the object</para>
2819         </col>
2820       </row>
2821       <row>
2822         <col>
2823           <para>type_of_notificationid</para>
2824         </col>
2825         <col>
2826           <para>Bigint</para>
2827         </col>
2828         <col>
2829           <para>8</para>
2830         </col>
2831         <col>
2832           <para>Reference to the <emph>type_of_notification</emph> indicating
2833            what type of notification we have here and what basic rules apply.</para>
2834         </col>
2835       </row>
2836       <row>
2837         <col>
2838           <para>default_priority</para>
2839         </col>
2840         <col>
2841           <para>Int</para>
2842         </col>
2843         <col>
2844           <para>4</para>
2845         </col>
2846         <col>
2847           <para>The priority that will be set automatically when this type of
2848            notification is entered into the system.</para>
2849         </col>
2850       </row>
2851       <row>
2852         <col>
2853           <para>escalation</para>
2854         </col>
2855         <col>
2856           <para>Boolean</para>
2857         </col>
2858         <col>
2859           <para/>
2860         </col>
2861         <col>
2862           <para>Will the system perform automatic escalation (T = Yes / F = No)</para>
2863         </col>
2864       </row>
2865       <row>
2866         <col>
2867           <para>escalation_time</para>
2868         </col>
2869         <col>
2870           <para>Time</para>
2871         </col>
2872         <col>
2873           <para/>
2874         </col>
2875         <col>
2876           <para>The time after which a higher priority is awarded to the notification.</para>
2877         </col>
2878       </row>
2879       <row>
2880         <col>
2881           <para>max_priority</para>
2882         </col>
2883         <col>
2884           <para>Int</para>
2885         </col>
2886         <col>
2887           <para/>
2888         </col>
2889         <col>
2890           <para>The maximum priority given to this type of notification.</para>
2891         </col>
2892       </row>
2893       <row>
2894         <col>
2895           <para>adjusted_setting</para>
2896         </col>
2897         <col>
2898           <para>Text</para>
2899         </col>
2900         <col>
2901           <para/>
2902         </col>
2903         <col>
2904           <para>Some checks can have a special settings (for instance alert
2905            after 5 failed login attempts instead of 3).</para>
2906         </col>
2907       </row>
2908 </table>
2909 </subsubsection>
2910
2911 <subsubsection>
2912   <heading>The indexes.</heading>
2913
2914 <para>
2915 These are the indices:
2916 </para>
2917 <table cpos='lll'>
2918       <thead>
2919         <col>
2920           <para>Indexname</para>
2921         </col>
2922         <col>
2923           <para>Field</para>
2924         </col>
2925         <col>
2926           <para>Characteristics</para>
2927         </col>
2928       </thead>
2929       <row>
2930         <col>
2931           <para>obi_pk</para>
2932         </col>
2933         <col>
2934           <para>objectid</para>
2935         </col>
2936         <col>
2937           <para>Primary key</para>
2938         </col>
2939       </row>
2940       <row>
2941         <col>
2942           <para/>
2943         </col>
2944         <col>
2945           <para>type_of_notification_id</para>
2946         </col>
2947         <col>
2948           <para>Primary key</para>
2949         </col>
2950       </row>
2951       <row>
2952         <col>
2953           <para>obi_objectid</para>
2954         </col>
2955         <col>
2956           <para>Objectid</para>
2957         </col>
2958         <col>
2959           <para/>
2960         </col>
2961       </row>
2962       <row>
2963         <col>
2964           <para>obi_type_of_notificationid</para>
2965         </col>
2966         <col>
2967           <para>type_of_notification_id</para>
2968         </col>
2969         <col>
2970           <para/>
2971         </col>
2972       </row>
2973     </table>
2974     </subsubsection>
2975
2976 <subsubsection>
2977    <heading>The relationships.</heading>
2978
2979 <para>
2980 Relationships with other tables:
2981 </para>
2982
2983 <table cpos='llp{6cm}'>
2984       <thead>
2985         <col>
2986           <para>Fieldname</para>
2987         </col>
2988         <col>
2989           <para>Remote Table</para>
2990         </col>
2991         <col>
2992           <para>Remarks</para>
2993         </col>
2994       </thead>
2995       <row>
2996         <col>
2997           <para>ObjectID</para>
2998         </col>
2999         <col>
3000           <para>Object</para>
3001         </col>
3002         <col>
3003           <para>Reference to the <emph>object</emph> (which object does this apply to).</para>
3004         </col>
3005       </row>
3006       <row>
3007         <col>
3008           <para>Type_of_issueid</para>
3009         </col>
3010         <col>
3011           <para>Type_of_issue</para>
3012         </col>
3013         <col>
3014           <para>Reference to the type of issue.</para>
3015         </col>
3016       </row>
3017     </table>
3018
3019 <para>In the model this look like this:</para>
3020 <para>
3021     <picture src="erd-objissue.png" eps="erd-objissue"/>
3022 </para>
3023
3024 </subsubsection>
3025 <subsubsection>
3026   <heading>Sample data.</heading>
3027
3028 <para>
3029 Some sample data:
3030 </para>
3031 <table cpos='lllllll'>
3032       <thead>
3033         <col>
3034           <para>Objectid</para>
3035         </col>
3036         <col>
3037           <para>Type_of_notification_id</para>
3038         </col>
3039         <col>
3040           <para>Default Priority</para>
3041         </col>
3042         <col>
3043           <para>Escalation</para>
3044         </col>
3045         <col>
3046           <para>Escalation_time</para>
3047         </col>
3048         <col>
3049           <para>Max_priority</para>
3050         </col>
3051         <col>
3052           <para>Adjusted_setting</para>
3053         </col>
3054       </thead>
3055       <row>
3056         <col>
3057           <para>1</para>
3058         </col>
3059         <col>
3060           <para>1</para>
3061         </col>
3062         <col>
3063           <para>3</para>
3064         </col>
3065         <col>
3066           <para>T</para>
3067         </col>
3068         <col>
3069           <para>00:15:00</para>
3070         </col>
3071         <col>
3072           <para>1</para>
3073         </col>
3074         <col>
3075           <para/>
3076         </col>
3077       </row>
3078       <row>
3079         <col>
3080           <para>1</para>
3081         </col>
3082         <col>
3083           <para>2</para>
3084         </col>
3085         <col>
3086           <para>4</para>
3087         </col>
3088         <col>
3089           <para>T</para>
3090         </col>
3091         <col>
3092           <para>00:30:00</para>
3093         </col>
3094         <col>
3095           <para>2</para>
3096         </col>
3097         <col>
3098           <para/>
3099         </col>
3100       </row>
3101       <row>
3102         <col>
3103           <para>1</para>
3104         </col>
3105         <col>
3106           <para>3</para>
3107         </col>
3108         <col>
3109           <para>5</para>
3110         </col>
3111         <col>
3112           <para>F</para>
3113         </col>
3114         <col>
3115           <para/>
3116         </col>
3117         <col>
3118           <para/>
3119         </col>
3120         <col>
3121           <para>7</para>
3122         </col>
3123       </row>
3124       <row>
3125         <col>
3126           <para>2</para>
3127         </col>
3128         <col>
3129           <para>1</para>
3130         </col>
3131         <col>
3132           <para>4</para>
3133         </col>
3134         <col>
3135           <para>T</para>
3136         </col>
3137         <col>
3138           <para>00:45:00</para>
3139         </col>
3140         <col>
3141           <para>2</para>
3142         </col>
3143         <col>
3144           <para/>
3145         </col>
3146       </row>
3147       <row>
3148         <col>
3149           <para>2</para>
3150         </col>
3151         <col>
3152           <para>3</para>
3153         </col>
3154         <col>
3155           <para>5</para>
3156         </col>
3157         <col>
3158           <para>F</para>
3159         </col>
3160         <col>
3161           <para/>
3162         </col>
3163         <col>
3164           <para/>
3165         </col>
3166         <col>
3167           <para>8</para>
3168         </col>
3169       </row>
3170     </table>
3171 </subsubsection>
3172 </subsection>
3173
3174 <subsection>
3175   <heading>object_priority.</heading>
3176
3177 <para>
3178 This table stores per object how a certain level of priority is being dealt with.
3179 What policies do apply. This table is mostly used for retrieval, so firm indexing is logic.
3180 </para>
3181
3182 <subsubsection>
3183   <heading>The fields.</heading>
3184
3185 <para>
3186 The fields are listed below:
3187 </para>
3188 <table cpos='lllp{6cm}'>
3189       <thead>
3190         <col>
3191           <para>Fieldname</para>
3192         </col>
3193         <col>
3194           <para>Fieldtype</para>
3195         </col>
3196         <col>
3197           <para>Size</para>
3198         </col>
3199         <col>
3200           <para>Remarks</para>
3201         </col>
3202       </thead>
3203       <row>
3204         <col>
3205           <para>objectid</para>
3206         </col>
3207         <col>
3208           <para>Bigint</para>
3209         </col>
3210         <col>
3211           <para>8</para>
3212         </col>
3213         <col>
3214           <para>Reference to the object</para>
3215         </col>
3216       </row>
3217       <row>
3218         <col>
3219           <para>priorityid</para>
3220         </col>
3221         <col>
3222           <para>Int</para>
3223         </col>
3224         <col>
3225           <para>4</para>
3226         </col>
3227         <col>
3228           <para>Priority.</para>
3229         </col>
3230       </row>
3231       <row>
3232         <col>
3233           <para>send_mail</para>
3234         </col>
3235         <col>
3236           <para>Boolean</para>
3237         </col>
3238         <col>
3239           <para/>
3240         </col>
3241         <col>
3242           <para>Send an e-mail if this priority is set? Yes = T / No = F</para>
3243         </col>
3244       </row>
3245       <row>
3246         <col>
3247           <para>send_sms</para>
3248         </col>
3249         <col>
3250           <para>Boolean</para>
3251         </col>
3252         <col>
3253           <para/>
3254         </col>
3255         <col>
3256           <para>Send a sms message if this priority is set? Yes = T / No = F</para>
3257         </col>
3258       </row>
3259       <row>
3260         <col>
3261           <para>send_fax</para>
3262         </col>
3263         <col>
3264           <para>Boolean</para>
3265         </col>
3266         <col>
3267           <para/>
3268         </col>
3269         <col>
3270           <para>Send a fax if this priority is set? Yes = T / No = F</para>
3271         </col>
3272       </row>
3273       <row>
3274         <col>
3275           <para>repeat_notification</para>
3276         </col>
3277         <col>
3278           <para>Boolean</para>
3279         </col>
3280         <col>
3281           <para/>
3282         </col>
3283         <col>
3284           <para>Repeat this notification if no action occurs since the notification. Yes = T / No = F</para>
3285         </col>
3286       </row>
3287       <row>
3288         <col>
3289           <para>interval_for_repeat</para>
3290         </col>
3291         <col>
3292           <para>Time</para>
3293         </col>
3294         <col>
3295           <para/>
3296         </col>
3297         <col>
3298           <para>Time interval that is set to wait for a response.</para>
3299         </col>
3300       </row>
3301     </table>
3302     </subsubsection>
3303
3304 <subsubsection>
3305   <heading>The indexes.</heading>
3306
3307 <para>
3308 Indices of the <emph>object_priority</emph> table:
3309 </para>
3310
3311 <table cpos='lll'>
3312       <thead>
3313         <col>
3314           <para>Indexname</para>
3315         </col>
3316         <col>
3317           <para>Field</para>
3318         </col>
3319         <col>
3320           <para>Characteristics</para>
3321         </col>
3322       </thead>
3323       <row>
3324         <col>
3325           <para>obi_pk</para>
3326         </col>
3327         <col>
3328           <para>objectid</para>
3329         </col>
3330         <col>
3331           <para>Primary key</para>
3332         </col>
3333       </row>
3334       <row>
3335         <col>
3336           <para/>
3337         </col>
3338         <col>
3339           <para>priorityid</para>
3340         </col>
3341         <col>
3342           <para>Primary key</para>
3343         </col>
3344       </row>
3345       <row>
3346         <col>
3347           <para>obi_objectid</para>
3348         </col>
3349         <col>
3350           <para>Objectid</para>
3351         </col>
3352         <col>
3353           <para/>
3354         </col>
3355       </row>
3356       <row>
3357         <col>
3358           <para>obi_type_of_notification_id</para>
3359         </col>
3360         <col>
3361           <para>type_of_notification_id</para>
3362         </col>
3363         <col>
3364           <para/>
3365         </col>
3366       </row>
3367     </table>
3368 </subsubsection>
3369
3370 <subsubsection>
3371   <heading>The relationships.</heading>
3372
3373 <para>
3374 Relationships with other tables:
3375 </para>
3376
3377 <table cpos='llp{6cm}'>
3378       <thead>
3379         <col>
3380           <para>Fieldname</para>
3381         </col>
3382         <col>
3383           <para>Remote Table</para>
3384         </col>
3385         <col>
3386           <para>Remarks</para>
3387         </col>
3388       </thead>
3389       <row>
3390         <col>
3391           <para>ObjectID</para>
3392         </col>
3393         <col>
3394           <para>Object</para>
3395         </col>
3396         <col>
3397           <para>Reference to the object (which object does this apply to).</para>
3398         </col>
3399       </row>
3400       <row>
3401         <col>
3402           <para>Priorityid</para>
3403         </col>
3404         <col>
3405           <para>Priority</para>
3406         </col>
3407         <col>
3408           <para>Reference to the priority.</para>
3409         </col>
3410       </row>
3411     </table>
3412
3413 <para>
3414 In the model this look like this:
3415 </para>
3416 <para>
3417 <picture src="erd-objprior.png" eps="erd-objprior"/>
3418 </para>
3419 </subsubsection>
3420 </subsection>
3421
3422 <subsection>
3423   <heading>object_service</heading>
3424
3425 <para>
3426 The object service table indicates which services can be expected on the system.
3427 If input fails to show up a notification can be generated.
3428 </para>
3429
3430 <subsubsection>
3431   <heading>The fields.</heading>
3432
3433 <para>
3434 The fields are listed below:
3435 </para>
3436
3437 <table cpos='lllp{6cm}'>
3438       <thead>
3439         <col>
3440           <para>Fieldname</para>
3441         </col>
3442         <col>
3443           <para>Fieldtype</para>
3444         </col>
3445         <col>
3446           <para>Size</para>
3447         </col>
3448         <col>
3449           <para>Remarks</para>
3450         </col>
3451       </thead>
3452       <row>
3453         <col>
3454           <para>objectid</para>
3455         </col>
3456         <col>
3457           <para>Bigint</para>
3458         </col>
3459         <col>
3460           <para>8</para>
3461         </col>
3462         <col>
3463           <para>Reference to the object</para>
3464         </col>
3465       </row>
3466       <row>
3467         <col>
3468           <para>servicecode</para>
3469         </col>
3470         <col>
3471           <para>Text</para>
3472         </col>
3473         <col>
3474           <para/>
3475         </col>
3476         <col>
3477           <para>Reference to service.</para>
3478         </col>
3479       </row>
3480       <row>
3481         <col>
3482           <para>expected_interval</para>
3483         </col>
3484         <col>
3485           <para>Bigint</para>
3486         </col>
3487         <col>
3488           <para>8</para>
3489         </col>
3490         <col>
3491           <para>The expected interval in minutes between two log entries.
3492           If this gives a time-out a notification is generated<footnote>To avoid many
3493           false positives it may be wise to give the system always 1 or 2 minutes extra time.
3494           If for some reason a connection is slow or a mail-daemon restarted
3495           the effect would generate tuns of notifications.</footnote>.
3496           The following values can be considered the most common:</para>
3497           <para>* 60 hourly entries</para>
3498           <para>* 120 two hourly entries</para>
3499           <para>* 240 four hourly entries</para>
3500           <para>* 480 eight hourly entries</para>
3501           <para>* 920 twelve hourly entries</para>
3502           <para>* 1840 daily entries</para>
3503           <para>* 12880 weekly entries</para>
3504         </col>
3505       </row>
3506       <row>
3507         <col>
3508           <para>last_entry</para>
3509         </col>
3510         <col>
3511           <para>Timestamp</para>
3512         </col>
3513         <col>
3514           <para/>
3515         </col>
3516         <col>
3517           <para>The timestamp of the last entry (for detecting exceeded interval).
3518           This field could be derived from the log-table as well, but the
3519           redundance gives a performance on detection that is useful, since a
3520           check should run every minute.</para>
3521         </col>
3522       </row>
3523       <row>
3524         <col>
3525           <para>default_priority</para>
3526         </col>
3527         <col>
3528           <para>Int</para>
3529         </col>
3530         <col>
3531           <para>4</para>
3532         </col>
3533         <col>
3534           <para>Priority given if this service didn't occur.</para>
3535         </col>
3536       </row>
3537       <row>
3538         <col>
3539           <para>maximum_priority</para>
3540         </col>
3541         <col>
3542           <para>Int</para>
3543         </col>
3544         <col>
3545           <para>4</para>
3546         </col>
3547         <col>
3548           <para>Maximum priority (in case of escalation)</para>
3549         </col>
3550       </row>
3551       <row>
3552         <col>
3553           <para>accepted</para>
3554         </col>
3555         <col>
3556           <para>Boolean</para>
3557         </col>
3558         <col>
3559           <para/>
3560         </col>
3561         <col>
3562           <para>If a service hasn't been set, the application user should
3563           indicate that this is valid (logs shouldn't just appear).
3564           New entries will be added automatically but still have to be verified.</para>
3565         </col>
3566       </row>
3567     </table>
3568 </subsubsection>
3569
3570 <subsubsection>
3571   <heading>The indexes.</heading>
3572
3573 <para>
3574 The table is indexed on the following fields:
3575 </para>
3576 <table cpos='lll'>
3577       <thead>
3578         <col>
3579           <para>Indexname</para>
3580         </col>
3581         <col>
3582           <para>Field</para>
3583         </col>
3584         <col>
3585           <para>Characteristics</para>
3586         </col>
3587       </thead>
3588       <row>
3589         <col>
3590           <para>obs_pk</para>
3591         </col>
3592         <col>
3593           <para>objectid</para>
3594         </col>
3595         <col>
3596           <para>Primary key</para>
3597         </col>
3598       </row>
3599       <row>
3600         <col>
3601           <para/>
3602         </col>
3603         <col>
3604           <para>servicecode</para>
3605         </col>
3606         <col>
3607           <para>Primary key</para>
3608         </col>
3609       </row>
3610       <row>
3611         <col>
3612           <para>obs_objectid</para>
3613         </col>
3614         <col>
3615           <para>objectid</para>
3616         </col>
3617         <col>
3618           <para/>
3619         </col>
3620       </row>
3621       <row>
3622         <col>
3623           <para>obs_servicecode</para>
3624         </col>
3625         <col>
3626           <para>servicecode</para>
3627         </col>
3628         <col>
3629           <para/>
3630         </col>
3631       </row>
3632       <row>
3633         <col>
3634           <para>obs_accepted</para>
3635         </col>
3636         <col>
3637           <para>accepted</para>
3638         </col>
3639         <col>
3640           <para/>
3641         </col>
3642       </row>
3643     </table>
3644 </subsubsection>
3645
3646 <subsubsection>
3647    <heading>The relationships.</heading>
3648
3649 <para>
3650 Relationships with other tables:
3651 </para>
3652
3653 <table cpos='llp{8cm}'>
3654       <thead>
3655         <col>
3656           <para>Fieldname</para>
3657         </col>
3658         <col>
3659           <para>Remote Table</para>
3660         </col>
3661         <col>
3662           <para>Remarks</para>
3663         </col>
3664       </thead>
3665       <row>
3666         <col>
3667           <para>objectID</para>
3668         </col>
3669         <col>
3670           <para>Object</para>
3671         </col>
3672         <col>
3673           <para>Reference to the object (which object does this apply to).</para>
3674         </col>
3675       </row>
3676       <row>
3677         <col>
3678           <para>servicecode</para>
3679         </col>
3680         <col>
3681           <para>Service</para>
3682         </col>
3683         <col>
3684           <para>Reference to the service table. </para>
3685         </col>
3686       </row>
3687     </table>
3688
3689 <para>In the model this look like this:</para>
3690 <para>
3691   <picture src="erd-objservice.png" eps="erd-objservice"/>
3692 </para>
3693 </subsubsection>
3694 </subsection>
3695
3696 <subsection>
3697   <heading>object_system_user</heading>
3698
3699 <para>
3700 This table will derive a list of users that can be identified based
3701 on the log-files in the system. This table is filled during data entry.
3702 But the filling of the table is dependent on the fact if the user has been entered before.
3703 So during the processing the read will be done more than the data entry and
3704 that makes heavy indexing logic.
3705 </para>
3706 <subsubsection>
3707   <heading>The fields.</heading>
3708
3709 <para>
3710 The fields of <emph>object_system_user</emph> are listed below:
3711 </para>
3712
3713 <table cpos='lllp{6cm}'>
3714       <thead>
3715         <col>
3716           <para>Fieldname</para>
3717         </col>
3718         <col>
3719           <para>Fieldtype</para>
3720         </col>
3721         <col>
3722           <para>Size</para>
3723         </col>
3724         <col>
3725           <para>Remarks</para>
3726         </col>
3727       </thead>
3728       <row>
3729         <col>
3730           <para>objectid</para>
3731         </col>
3732         <col>
3733           <para>Bigint</para>
3734         </col>
3735         <col>
3736           <para>8</para>
3737         </col>
3738         <col>
3739           <para>Reference to the object</para>
3740         </col>
3741       </row>
3742       <row>
3743         <col>
3744           <para>system_username</para>
3745         </col>
3746         <col>
3747           <para>Text</para>
3748         </col>
3749         <col>
3750           <para/>
3751         </col>
3752         <col>
3753           <para>Username on the object/system.</para>
3754         </col>
3755       </row>
3756       <row>
3757         <col>
3758           <para>can_login</para>
3759         </col>
3760         <col>
3761           <para>Boolean</para>
3762         </col>
3763         <col>
3764           <para/>
3765         </col>
3766         <col>
3767           <para>Can this user login (T = Yes / F = No)?</para>
3768         </col>
3769       </row>
3770       <row>
3771         <col>
3772           <para>can_be_root</para>
3773         </col>
3774         <col>
3775           <para>Boolean</para>
3776         </col>
3777         <col>
3778           <para/>
3779         </col>
3780         <col>
3781           <para>Can this user become root (T = Yes / F = No)?</para>
3782         </col>
3783       </row>
3784     </table>
3785     </subsubsection>
3786
3787 <subsubsection>
3788   <heading>The indexes.</heading>
3789
3790 <para>
3791 The table is indexed on the following fields:
3792 </para>
3793 <table cpos='lll'>
3794       <thead>
3795         <col>
3796           <para>Indexname</para>
3797         </col>
3798         <col>
3799           <para>Field</para>
3800         </col>
3801         <col>
3802           <para>Characteristics</para>
3803         </col>
3804       </thead>
3805       <row>
3806         <col>
3807           <para>osu_pk</para>
3808         </col>
3809         <col>
3810           <para>objectid</para>
3811         </col>
3812         <col>
3813           <para>Primary key</para>
3814         </col>
3815       </row>
3816       <row>
3817         <col>
3818           <para/>
3819         </col>
3820         <col>
3821           <para>system_username</para>
3822         </col>
3823         <col>
3824           <para>Primary key</para>
3825         </col>
3826       </row>
3827       <row>
3828         <col>
3829           <para>osu_objectid</para>
3830         </col>
3831         <col>
3832           <para>objectid</para>
3833         </col>
3834         <col>
3835           <para/>
3836         </col>
3837       </row>
3838       <row>
3839         <col>
3840           <para>osu_system_username</para>
3841         </col>
3842         <col>
3843           <para>system_username</para>
3844         </col>
3845         <col>
3846           <para/>
3847         </col>
3848       </row>
3849     </table>
3850     </subsubsection>
3851
3852 <subsubsection>
3853   <heading>The relationships.</heading>
3854
3855 <para>
3856 Relationships with other tables:
3857 </para>
3858 <table cpos='llp{8cm}'>
3859       <thead>
3860         <col>
3861           <para>Fieldname</para>
3862         </col>
3863         <col>
3864           <para>Remote Table</para>
3865         </col>
3866         <col>
3867           <para>Remarks</para>
3868         </col>
3869       </thead>
3870       <row>
3871         <col>
3872           <para>ObjectID</para>
3873         </col>
3874         <col>
3875           <para>Object</para>
3876         </col>
3877         <col>
3878           <para>Reference to the object (which object does this apply to).</para>
3879         </col>
3880       </row>
3881       <row>
3882         <col>
3883           <para>System_username</para>
3884         </col>
3885         <col>
3886           <para>Log</para>
3887         </col>
3888         <col>
3889           <para>Log entries can refer to the system username.</para>
3890         </col>
3891       </row>
3892     </table>
3893     <para>In the model this look like this:</para>
3894     <para/>
3895
3896     <para>
3897       <picture src="erd-objsysusr.png" eps="erd-objsysusr"/>
3898     </para>
3899     </subsubsection>
3900 </subsection>
3901
3902 <subsection>
3903   <heading>object_user</heading>
3904
3905 <para>
3906 This table will enable users to get access to the information belonging to an object.
3907 Also this table is mainly used for data retrieval and will rely on the indexes.
3908 </para>
3909 <subsubsection>
3910   <heading>The fields.</heading>
3911
3912 <para>
3913 The fields of <emph>object_user</emph> are listed below:
3914 </para>
3915
3916 <table cpos='lllp{6cm}'>
3917       <thead>
3918         <col>
3919           <para>Fieldname</para>
3920         </col>
3921         <col>
3922           <para>Fieldtype</para>
3923         </col>
3924         <col>
3925           <para>Size</para>
3926         </col>
3927         <col>
3928           <para>Remarks</para>
3929         </col>
3930       </thead>
3931       <row>
3932         <col>
3933           <para>Objectid</para>
3934         </col>
3935         <col>
3936           <para>Bigint</para>
3937         </col>
3938         <col>
3939           <para>8</para>
3940         </col>
3941         <col>
3942           <para>Reference to the <emph>object</emph></para>
3943         </col>
3944       </row>
3945       <row>
3946         <col>
3947           <para>Username</para>
3948         </col>
3949         <col>
3950           <para>Text</para>
3951         </col>
3952         <col>
3953           <para/>
3954         </col>
3955         <col>
3956           <para>Username in gnucomo. A reference to <emph>user</emph>.</para>
3957         </col>
3958       </row>
3959       <row>
3960         <col>
3961           <para>Security_level</para>
3962         </col>
3963         <col>
3964           <para>Int</para>
3965         </col>
3966         <col>
3967           <para/>
3968         </col>
3969         <col>
3970           <para>The security-level granted to this user.</para>
3971         </col>
3972       </row>
3973     </table>
3974 </subsubsection>
3975
3976 <subsubsection>
3977   <heading>The indexes.</heading>
3978 <para>
3979 The indices of the <emph>object_user</emph> table:
3980 </para>
3981 <table cpos='lll'>
3982       <thead>
3983         <col>
3984           <para>Indexname</para>
3985         </col>
3986         <col>
3987           <para>Field</para>
3988         </col>
3989         <col>
3990           <para>Characteristics</para>
3991         </col>
3992       </thead>
3993       <row>
3994         <col>
3995           <para>ous_pk</para>
3996         </col>
3997         <col>
3998           <para>objectid</para>
3999         </col>
4000         <col>
4001           <para>Primary key</para>
4002         </col>
4003       </row>
4004       <row>
4005         <col>
4006           <para/>
4007         </col>
4008         <col>
4009           <para>username</para>
4010         </col>
4011         <col>
4012           <para>Primary key</para>
4013         </col>
4014       </row>
4015       <row>
4016         <col>
4017           <para>ous_objectid</para>
4018         </col>
4019         <col>
4020           <para>objectid</para>
4021         </col>
4022         <col>
4023           <para/>
4024         </col>
4025       </row>
4026       <row>
4027         <col>
4028           <para>ous_username</para>
4029         </col>
4030         <col>
4031           <para>username</para>
4032         </col>
4033         <col>
4034           <para/>
4035         </col>
4036       </row>
4037       <row>
4038         <col>
4039           <para>ous_security_level</para>
4040         </col>
4041         <col>
4042           <para>ous_security_level</para>
4043         </col>
4044         <col>
4045           <para/>
4046         </col>
4047       </row>
4048     </table>
4049 </subsubsection>
4050
4051 <subsubsection>
4052   <heading>The relationships.</heading>
4053
4054 <para>
4055 Relationships with other tables:
4056 </para>
4057
4058 <table cpos='llp{8cm}'>
4059       <thead>
4060         <col>
4061           <para>Fieldname</para>
4062         </col>
4063         <col>
4064           <para>Remote Table</para>
4065         </col>
4066         <col>
4067           <para>Remarks</para>
4068         </col>
4069       </thead>
4070       <row>
4071         <col>
4072           <para>objectID</para>
4073         </col>
4074         <col>
4075           <para>object</para>
4076         </col>
4077         <col>
4078           <para>Reference to the object (which object does this apply to).</para>
4079         </col>
4080       </row>
4081       <row>
4082         <col>
4083           <para>username</para>
4084         </col>
4085         <col>
4086           <para>user</para>
4087         </col>
4088         <col>
4089           <para>Reference to the user.</para>
4090         </col>
4091       </row>
4092     </table>
4093
4094     <para>In the model this look like this:</para>
4095     <picture src="erd-objusr.png" eps="erd-objusr"/>
4096
4097 </subsubsection>
4098 </subsection>
4099
4100 <subsection>
4101 <heading>parameter</heading>
4102 <para>
4103 The parameter table stores the operational parameters of a monitored object.
4104 The parameters of an object describe the object's resources and configurations.
4105 For each object, a large set of parameters can be defined. They range from
4106 anything like file systems and installed packages to the system's users.
4107 </para>
4108
4109 <subsubsection>
4110 <heading>The fields</heading>
4111 <para>
4112 The fields of the <emph>parameter</emph> table are listed below:
4113 </para>
4114 <table cpos='lllp{6cm}'>
4115       <thead>
4116         <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
4117         <col> Remarks </col>
4118       </thead>
4119       <row>
4120         <col>paramid</col><col>bigserial</col><col>8</col>
4121         <col>Uniquely identifies the parameter. Used in property and history tables.</col>
4122       </row>
4123       <row>
4124         <col>objectid</col><col>bigint</col><col>8</col>
4125         <col>The object of which this is a parameter. Refers to the object table.</col>
4126       </row>
4127       <row>
4128         <col>name</col><col>text</col><col> </col>
4129         <col>Name of the parameter to identify the resource</col>
4130       </row>
4131       <row>
4132         <col>class</col><col>text</col><col> </col>
4133         <col>Similar parameters are in the same class</col>
4134       </row>
4135       <row>
4136         <col>description</col><col>text</col><col> </col>
4137         <col>A verbose description of the parameter</col>
4138       </row>
4139       
4140 </table>
4141
4142 <para>
4143 The combination of objectid, name and class must be unique.
4144 </para>
4145
4146 </subsubsection>
4147 <subsubsection>
4148 <heading>Sample data</heading>
4149
4150 <para>
4151 The table below lists a few examples of parameters
4152 </para>
4153 <table cpos='lllll'>
4154    <thead>
4155       <col>paramid</col><col>objectid</col><col>name</col><col>class</col><col>description</col>
4156    </thead>
4157    <row>
4158       <col>1</col><col>1</col><col>/</col><col>filesystem</col><col>The root filesystem</col>
4159    </row>
4160    <row>
4161       <col>2</col><col>1</col><col>/home</col><col>filesystem</col><col>Our users' homedirs</col>
4162    </row>
4163    <row>
4164       <col>3</col><col>1</col><col>glibc</col><col>package</col><col>The standard C library</col>
4165    </row>
4166    <row>
4167       <col>4</col><col>1</col><col>arjen</col><col>user</col><col>Arjen Baart</col>
4168    </row>
4169 </table>
4170 </subsubsection>
4171 </subsection>
4172
4173 <subsection>
4174   <heading>priority</heading>
4175
4176 <para>
4177 The priority table contains information on the levels that are recognized by the system.
4178 Mainly data retrieval so depending on indexing.
4179 It needs to be said that most likely only a couple of states will exist<footnote>By default
4180 we will use five states, but many states can be given to enable all
4181 types of differentiation.</footnote>.
4182 </para>
4183
4184 <subsubsection>
4185   <heading>The fields.</heading>
4186
4187 <para>
4188 The fields of the <emph>priority</emph> table are listed below:
4189 </para>
4190
4191 <table cpos='lllp{6cm}'>
4192       <thead>
4193         <col>
4194           <para>Fieldname</para>
4195         </col>
4196         <col>
4197           <para>Fieldtype</para>
4198         </col>
4199         <col>
4200           <para>Size</para>
4201         </col>
4202         <col>
4203           <para>Remarks</para>
4204         </col>
4205       </thead>
4206       <row>
4207         <col>
4208           <para>priority</para>
4209         </col>
4210         <col>
4211           <para>Int</para>
4212         </col>
4213         <col>
4214           <para>4</para>
4215         </col>
4216         <col>
4217           <para>Priority</para>
4218         </col>
4219       </row>
4220       <row>
4221         <col>
4222           <para>send_mail</para>
4223         </col>
4224         <col>
4225           <para>Boolean</para>
4226         </col>
4227         <col>
4228           <para/>
4229         </col>
4230         <col>
4231           <para>Send an e-mail if this priority is set? Yes = T / No = F</para>
4232         </col>
4233       </row>
4234       <row>
4235         <col>
4236           <para>send_sms</para>
4237         </col>
4238         <col>
4239           <para>Boolean</para>
4240         </col>
4241         <col>
4242           <para/>
4243         </col>
4244         <col>
4245           <para>Send a sms message if this priority is set? Yes = T / No = F</para>
4246         </col>
4247       </row>
4248       <row>
4249         <col>
4250           <para>send_fax</para>
4251         </col>
4252         <col>
4253           <para>Boolean</para>
4254         </col>
4255         <col>
4256           <para/>
4257         </col>
4258         <col>
4259           <para>Send a fax if this priority is set? Yes = T / No = F</para>
4260         </col>
4261       </row>
4262       <row>
4263         <col>
4264           <para>repeat_notification</para>
4265         </col>
4266         <col>
4267           <para>Boolean</para>
4268         </col>
4269         <col>
4270           <para/>
4271         </col>
4272         <col>
4273           <para>Repeat this notification if no action occurs since the notification. Yes = T / No = F</para>
4274         </col>
4275       </row>
4276       <row>
4277         <col>
4278           <para>interval_for_repeat</para>
4279         </col>
4280         <col>
4281           <para>Time</para>
4282         </col>
4283         <col>
4284           <para/>
4285         </col>
4286         <col>
4287           <para>Time interval that is set to wait for a response.</para>
4288         </col>
4289       </row>
4290     </table>
4291 </subsubsection>
4292
4293 <subsubsection>
4294   <heading>The indexes.</heading>
4295
4296 <para>
4297 The table is indexed on the following fields:
4298 </para>
4299
4300 <table cpos='lll'>
4301       <thead>
4302         <col>
4303           <para>Indexname</para>
4304         </col>
4305         <col>
4306           <para>Field</para>
4307         </col>
4308         <col>
4309           <para>Characteristics</para>
4310         </col>
4311       </thead>
4312       <row>
4313         <col>
4314           <para>pri_pk</para>
4315         </col>
4316         <col>
4317           <para>priority</para>
4318         </col>
4319         <col>
4320           <para>Primary key</para>
4321         </col>
4322       </row>
4323     </table>
4324 </subsubsection>
4325
4326 <subsubsection>
4327   <heading>The relationships.</heading>
4328
4329 <para>
4330 Relationships with other tables:
4331 </para>
4332 <table cpos='llp{8cm}'>
4333       <thead>
4334         <col>
4335           <para>Fieldname</para>
4336         </col>
4337         <col>
4338           <para>Remote Table</para>
4339         </col>
4340         <col>
4341           <para>Remarks</para>
4342         </col>
4343       </thead>
4344       <row>
4345         <col>
4346           <para>priority</para>
4347         </col>
4348         <col>
4349           <para>object_priority</para>
4350         </col>
4351         <col>
4352           <para>Reference to the object (which object does this apply to). </para>
4353         </col>
4354       </row>
4355     </table>
4356
4357     <para>In the model this look like this:</para>
4358     <para>
4359       <picture src="erd-prior.png" eps="erd-prior"/>
4360     </para>
4361 </subsubsection>
4362 </subsection>
4363
4364 <subsection>
4365 <heading>property</heading>
4366 <para>
4367 The property table stores the actual values of the properties of
4368 operational parameters of a monitored object.
4369 </para>
4370
4371 <subsubsection>
4372 <heading>The fields</heading>
4373 <para>
4374 The fields of the <emph>property</emph> table are listed below:
4375 </para>
4376 <table cpos='lllp{6cm}'>
4377       <thead>
4378         <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
4379         <col> Remarks </col>
4380       </thead>
4381       <row>
4382         <col>paramid</col><col>bigint</col><col>8</col>
4383         <col>The parameter to which this property belongs. Refers to the parameter table</col>
4384       </row>
4385       <row>
4386         <col>name</col><col>text</col><col> </col>
4387         <col>Name of the property</col>
4388       </row>
4389       <row>
4390         <col>value</col><col>text</col><col> </col>
4391         <col>The current value of the property</col>
4392       </row>
4393       <row>
4394         <col>type</col><col>enum</col><col> </col>
4395         <col>Dynamic or Static</col>
4396       </row>
4397       <row>
4398         <col>minimum</col><col>float</col><col>8</col>
4399         <col>The minimum value of the property (for numerical properties only)</col>
4400       </row>
4401       <row>
4402         <col>maximum</col><col>float</col><col>8</col>
4403         <col>The maximum value of the property (for numerical properties only)</col>
4404       </row>
4405       
4406 </table>
4407
4408 </subsubsection>
4409 <subsubsection>
4410 <heading>Sample data</heading>
4411
4412 <para>
4413 The table below lists a few examples of properties
4414 </para>
4415 <table cpos='llllll'>
4416    <thead>
4417       <col>paramid</col><col>name</col><col>value</col>
4418       <col>type</col><col>minimum</col><col>maximum</col>
4419    </thead>
4420    <row>
4421       <col>1</col><col>size</col><col>400000</col>
4422       <col>STATIC</col><col>100000</col><col>999999999</col>
4423    </row>
4424    <row>
4425       <col>1</col><col>used</col><col>200000</col>
4426       <col>DYNAMIC</col><col>50000</col><col>400000</col>
4427    </row>
4428    <row>
4429       <col>2</col><col>size</col><col>3000000</col>
4430       <col>STATIC</col><col>100000</col><col>999999999</col>
4431    </row>
4432    <row>
4433       <col>2</col><col>used</col><col>2000000</col>
4434       <col>DYNAMIC</col><col>50000</col><col>2700000</col>
4435    </row>
4436    <row>
4437       <col>3</col><col>version</col><col>2.2.5-39</col>
4438       <col>STATIC</col><col>0</col><col>0</col>
4439    </row>
4440 </table>
4441 </subsubsection>
4442 </subsection>
4443
4444 <subsection>
4445   <heading>service</heading>
4446
4447 <para>
4448 The table <emph>service</emph> indicates the service that can be handled by the system.
4449 Out of the servicelist the administrator can indicate what services to expect.
4450 </para>
4451 <subsubsection>
4452   <heading>The fields.</heading>
4453
4454 <para>
4455 The fields are listed below:
4456 </para>
4457 <table cpos='lllp{6cm}'>
4458       <thead>
4459         <col>
4460           <para>Fieldname</para>
4461         </col>
4462         <col>
4463           <para>Fieldtype</para>
4464         </col>
4465         <col>
4466           <para>Size</para>
4467         </col>
4468         <col>
4469           <para>Remarks</para>
4470         </col>
4471       </thead>
4472       <row>
4473         <col>
4474           <para>servicecode</para>
4475         </col>
4476         <col>
4477           <para>Text</para>
4478         </col>
4479         <col>
4480           <para/>
4481         </col>
4482         <col>
4483           <para>The code that is written for the service</para>
4484         </col>
4485       </row>
4486       <row>
4487         <col>
4488           <para>servicename</para>
4489         </col>
4490         <col>
4491           <para>Text</para>
4492         </col>
4493         <col>
4494           <para/>
4495         </col>
4496         <col>
4497           <para>The expanded name for the service</para>
4498         </col>
4499       </row>
4500       <row>
4501         <col>
4502           <para>default_priority</para>
4503         </col>
4504         <col>
4505           <para>Int</para>
4506         </col>
4507         <col>
4508           <para>4</para>
4509         </col>
4510         <col>
4511           <para>The advised priority if these log-entries don't
4512            come in<footnote>Advised priorities can be changed in the object_service
4513            table per object. </footnote>.</para>
4514         </col>
4515       </row>
4516       <row>
4517         <col>
4518           <para>max_priority</para>
4519         </col>
4520         <col>
4521           <para>Int</para>
4522         </col>
4523         <col>
4524           <para>4</para>
4525         </col>
4526         <col>
4527           <para>The maximum priority advised for this
4528           service<footnote>Advised priorities can be changed in the
4529           object_service table per object.</footnote>.</para>
4530         </col>
4531       </row>
4532     </table>
4533 </subsubsection>
4534
4535 <subsubsection>
4536   <heading>The indexes.</heading>
4537
4538 <para>
4539 The table is indexed on the following fields:
4540 </para>
4541 <table cpos='lll'>
4542       <thead>
4543         <col>
4544           <para>Indexname</para>
4545         </col>
4546         <col>
4547           <para>Field</para>
4548         </col>
4549         <col>
4550           <para>Characteristics</para>
4551         </col>
4552       </thead>
4553       <row>
4554         <col>
4555           <para>ser_pk</para>
4556         </col>
4557         <col>
4558           <para>servicecode</para>
4559         </col>
4560         <col>
4561           <para>Primary key</para>
4562         </col>
4563       </row>
4564       <row>
4565         <col>
4566           <para>ser_servicename</para>
4567         </col>
4568         <col>
4569           <para>servicename</para>
4570         </col>
4571         <col>
4572           <para>Unique</para>
4573         </col>
4574       </row>
4575     </table>
4576 </subsubsection>
4577
4578 <subsubsection>
4579   <heading>The relationships.</heading>
4580 <para>
4581 Relationships with other tables:
4582 </para>
4583 <table cpos='llp{8cm}'>
4584       <thead>
4585         <col>
4586           <para>Fieldname</para>
4587         </col>
4588         <col>
4589           <para>Remote Table</para>
4590         </col>
4591         <col>
4592           <para>Remarks</para>
4593         </col>
4594       </thead>
4595       <row>
4596         <col>
4597           <para>servicecode</para>
4598         </col>
4599         <col>
4600           <para>log</para>
4601         </col>
4602         <col>
4603           <para>What log entries have been tied to this type of service.</para>
4604         </col>
4605       </row>
4606       <row>
4607         <col>
4608           <para/>
4609         </col>
4610         <col>
4611           <para>object_service</para>
4612         </col>
4613         <col>
4614           <para>Settings for this service per object.</para>
4615         </col>
4616       </row>
4617       <row>
4618         <col>
4619           <para/>
4620         </col>
4621         <col>
4622           <para>unprocessed_log</para>
4623         </col>
4624         <col>
4625           <para>What unprocessed log entries have been tied to this type of service.</para>
4626         </col>
4627       </row>
4628     </table>
4629  
4630     <para>In the model this look like this:</para>
4631     <para>
4632       <picture src="erd-service.png" eps="erd-service"/>
4633     </para>
4634 </subsubsection>
4635 </subsection>
4636
4637 <subsection>
4638   <heading>status.</heading>
4639
4640 <para>
4641 The table <emph>status</emph> contains the possible states that a notification can have.
4642 As with the table <emph>priority</emph> these statuses are limited in number by
4643 default but can be expanded. Also here retrieval prevails above data entry and
4644 therefor indexing is important.
4645 </para>
4646
4647 <subsubsection>
4648   <heading>The fields.</heading>
4649
4650 <para>
4651 The fields of the <emph>status</emph> table are listed below:
4652 </para>
4653
4654 <table cpos='lllp{6cm}'>
4655       <thead>
4656         <col>
4657           <para>Fieldname</para>
4658         </col>
4659         <col>
4660           <para>Fieldtype</para>
4661         </col>
4662         <col>
4663           <para>Size</para>
4664         </col>
4665         <col>
4666           <para>Remarks</para>
4667         </col>
4668       </thead>
4669       <row>
4670         <col>
4671           <para>statuscode</para>
4672         </col>
4673         <col>
4674           <para>Varchar</para>
4675         </col>
4676         <col>
4677           <para>3</para>
4678         </col>
4679         <col>
4680           <para>The code for the status</para>
4681         </col>
4682       </row>
4683       <row>
4684         <col>
4685           <para>statusname</para>
4686         </col>
4687         <col>
4688           <para>Text</para>
4689         </col>
4690         <col>
4691           <para/>
4692         </col>
4693         <col>
4694           <para>What is the correct name for the status</para>
4695         </col>
4696       </row>
4697       <row>
4698         <col>
4699           <para>open_notification</para>
4700         </col>
4701         <col>
4702           <para>Boolean</para>
4703         </col>
4704         <col>
4705           <para/>
4706         </col>
4707         <col>
4708           <para>Is the notification still open when this status is set? Yes = T / No = F</para>
4709         </col>
4710       </row>
4711       <row>
4712         <col>
4713           <para>description</para>
4714         </col>
4715         <col>
4716           <para>Text</para>
4717         </col>
4718         <col>
4719           <para/>
4720         </col>
4721         <col>
4722           <para>Explanation of the code</para>
4723         </col>
4724       </row>
4725     </table>
4726 </subsubsection>
4727
4728 <subsubsection>
4729   <heading>The indexes.</heading>
4730 <para>
4731 The table is indexed on the following fields:
4732 </para>
4733
4734 <table cpos='lll'>
4735       <thead>
4736         <col>
4737           <para>Indexname</para>
4738         </col>
4739         <col>
4740           <para>Field</para>
4741         </col>
4742         <col>
4743           <para>Characteristics</para>
4744         </col>
4745       </thead>
4746       <row>
4747         <col>
4748           <para>sta_pk</para>
4749         </col>
4750         <col>
4751           <para>statuscode</para>
4752         </col>
4753         <col>
4754           <para>Primary key</para>
4755         </col>
4756       </row>
4757       <row>
4758         <col>
4759           <para>sta_statusname</para>
4760         </col>
4761         <col>
4762           <para>statusname</para>
4763         </col>
4764         <col>
4765           <para>Unique</para>
4766         </col>
4767       </row>
4768       <row>
4769         <col>
4770           <para>sta_open_notification</para>
4771         </col>
4772         <col>
4773           <para>open_notification</para>
4774         </col>
4775         <col>
4776           <para/>
4777         </col>
4778       </row>
4779     </table>
4780 </subsubsection>
4781
4782 <subsubsection>
4783   <heading>The relationships.</heading>
4784 <para>
4785 Relationships with other tables
4786 </para>
4787
4788 <table cpos='lll'>
4789       <thead>
4790         <col>
4791           <para>Fieldname</para>
4792         </col>
4793         <col>
4794           <para>Remote Table</para>
4795         </col>
4796         <col>
4797           <para>Remarks</para>
4798         </col>
4799       </thead>
4800       <row>
4801         <col>
4802           <para/>
4803         </col>
4804         <col>
4805           <para/>
4806         </col>
4807         <col>
4808           <para/>
4809         </col>
4810       </row>
4811     </table>
4812     <para>In the model this look like this:</para>
4813     <para>
4814       <picture src="erd-status.png" eps="erd-status"/>
4815     </para>
4816 </subsubsection>
4817
4818 <subsubsection>
4819   <heading>Default values.</heading>
4820 <para>The status values are default for the system and for that reason are predefined.</para>
4821 <table cpos='p{2cm}lp{1cm}p{6cm}'>
4822       <thead>
4823         <col>
4824           <para>Statuscode</para>
4825         </col>
4826         <col>
4827           <para>Statusname</para>
4828         </col>
4829         <col>
4830           <para>Open Notification</para>
4831         </col>
4832         <col>
4833           <para/>
4834         </col>
4835       </thead>
4836       <row>
4837         <col>
4838           <para>new</para>
4839         </col>
4840         <col>
4841           <para>New entry</para>
4842         </col>
4843         <col>
4844           <para>T</para>
4845         </col>
4846         <col>
4847           <para>Just detected nothing has been done yet.</para>
4848         </col>
4849       </row>
4850       <row>
4851         <col>
4852           <para>opn</para>
4853         </col>
4854         <col>
4855           <para>Open</para>
4856         </col>
4857         <col>
4858           <para>T</para>
4859         </col>
4860         <col>
4861           <para>The notification has been displayed, but nothing has been done yet.</para>
4862         </col>
4863       </row>
4864       <row>
4865         <col>
4866           <para>pen</para>
4867         </col>
4868         <col>
4869           <para>Pending</para>
4870         </col>
4871         <col>
4872           <para>T</para>
4873         </col>
4874         <col>
4875           <para>The notification is currently being worked on.</para>
4876         </col>
4877       </row>
4878       <row>
4879         <col>
4880           <para>ver</para>
4881         </col>
4882         <col>
4883           <para>Waiting for verification</para>
4884         </col>
4885         <col>
4886           <para>T</para>
4887         </col>
4888         <col>
4889           <para>The notification has been worked on.
4890           After it has been verified the notification can be closed.</para>
4891         </col>
4892       </row>
4893       <row>
4894         <col>
4895           <para>cls</para>
4896         </col>
4897         <col>
4898           <para>Closed</para>
4899         </col>
4900         <col>
4901           <para>F</para>
4902         </col>
4903         <col>
4904           <para>The notification has been closed</para>
4905         </col>
4906       </row>
4907       <row>
4908         <col>
4909           <para>rej</para>
4910         </col>
4911         <col>
4912           <para>Rejected</para>
4913         </col>
4914         <col>
4915           <para>F</para>
4916         </col>
4917         <col>
4918           <para>This was a false positive and has been rejected.</para>
4919         </col>
4920       </row>
4921       <row>
4922         <col>
4923           <para>inv</para>
4924         </col>
4925         <col>
4926           <para>Investigate</para>
4927         </col>
4928         <col>
4929           <para>T</para>
4930         </col>
4931         <col>
4932           <para>The notification is under investigation and awaiting additional details.</para>
4933         </col>
4934       </row>
4935     </table>
4936 </subsubsection>
4937 </subsection>
4938
4939 <subsection>
4940   <heading>type_of_issue.</heading>
4941
4942 <para>
4943 This table will contain a list of all available issues that can be detected.
4944 All issues have a suggested priority setting.
4945 This is typically data retrieval and good indexing is needed.</para>
4946
4947 <subsubsection>
4948   <heading>The fields.</heading>
4949
4950 <para>
4951 Fields of <emph>type_of_issue</emph> are:
4952 </para>
4953
4954 <table cpos='lllp{6cm}'>
4955       <thead>
4956         <col>
4957           <para>Fieldname</para>
4958         </col>
4959         <col>
4960           <para>Fieldtype</para>
4961         </col>
4962         <col>
4963           <para>Size</para>
4964         </col>
4965         <col>
4966           <para>Remarks</para>
4967         </col>
4968       </thead>
4969       <row>
4970         <col>
4971           <para>type_of_issueid</para>
4972         </col>
4973         <col>
4974           <para>Bigserial</para>
4975         </col>
4976         <col>
4977           <para>8</para>
4978         </col>
4979         <col>
4980           <para>The sequential code for the issue.</para>
4981         </col>
4982       </row>
4983       <row>
4984         <col>
4985           <para>name</para>
4986         </col>
4987         <col>
4988           <para>Text</para>
4989         </col>
4990         <col>
4991           <para/>
4992         </col>
4993         <col>
4994           <para>Name for the issue</para>
4995         </col>
4996       </row>
4997       <row>
4998         <col>
4999           <para>suggested_priority</para>
5000         </col>
5001         <col>
5002           <para>Int</para>
5003         </col>
5004         <col>
5005           <para>4</para>
5006         </col>
5007         <col>
5008           <para>The advised priority setting.</para>
5009         </col>
5010       </row>
5011       <row>
5012         <col>
5013           <para>description</para>
5014         </col>
5015         <col>
5016           <para>Text</para>
5017         </col>
5018         <col>
5019           <para/>
5020         </col>
5021         <col>
5022           <para>Description of the method and how this can be set.</para>
5023         </col>
5024       </row>
5025       <row>
5026         <col>
5027           <para>active</para>
5028         </col>
5029         <col>
5030           <para>Boolean</para>
5031         </col>
5032         <col>
5033           <para/>
5034         </col>
5035         <col>
5036           <para>Is this check currently being used in the system.</para>
5037         </col>
5038       </row>
5039     </table>
5040 </subsubsection>
5041
5042 <subsubsection>
5043   <heading>The indexes.</heading>
5044 <para>
5045 The table is indexed on the following fields:
5046 </para>
5047
5048 <table cpos='lll'>
5049       <thead>
5050         <col>
5051           <para>Indexname</para>
5052         </col>
5053         <col>
5054           <para>Field</para>
5055         </col>
5056         <col>
5057           <para>Characteristics</para>
5058         </col>
5059       </thead>
5060       <row>
5061         <col>
5062           <para>toi_pk</para>
5063           <para>(type_of_issue_type_of_issue_key)</para>
5064         </col>
5065         <col>
5066           <para>type_of_issueid</para>
5067         </col>
5068         <col>
5069           <para>Primary key</para>
5070         </col>
5071       </row>
5072       <row>
5073         <col>
5074           <para>toi_name</para>
5075         </col>
5076         <col>
5077           <para>name</para>
5078         </col>
5079         <col>
5080           <para>Unique</para>
5081         </col>
5082       </row>
5083       <row>
5084         <col>
5085           <para>toi_active</para>
5086         </col>
5087         <col>
5088           <para>active</para>
5089         </col>
5090         <col>
5091           <para/>
5092         </col>
5093       </row>
5094     </table>
5095 </subsubsection>
5096
5097 <subsubsection>
5098   <heading>The relationships.</heading>
5099 <table cpos='lll'>
5100       <thead>
5101         <col>
5102           <para>Fieldname</para>
5103         </col>
5104         <col>
5105           <para>Remote Table</para>
5106         </col>
5107         <col>
5108           <para>Remarks</para>
5109         </col>
5110       </thead>
5111       <row>
5112         <col>
5113           <para>type_of_issueid</para>
5114         </col>
5115         <col>
5116           <para>object_issue</para>
5117         </col>
5118         <col>
5119           <para/>
5120         </col>
5121       </row>
5122     </table>
5123
5124     <para>In the model this look like this:</para>
5125     <para>
5126       <picture src="erd-toi.png" eps="erd-toi"/>
5127     </para>
5128 </subsubsection>
5129
5130 <subsubsection>
5131   <heading>Default values.</heading>
5132
5133 <para>
5134 All checks are entered as code into the system.
5135 This table only works for the application only.
5136 The user can set specifics in the application only.
5137 </para>
5138 <table cpos='lllll'>
5139       <thead>
5140         <col>
5141           <para>Type_of_issueid</para>
5142         </col>
5143         <col>
5144           <para>Name</para>
5145         </col>
5146         <col>
5147           <para>Suggested_priority</para>
5148         </col>
5149         <col>
5150           <para>Description</para>
5151         </col>
5152         <col>
5153           <para>Active</para>
5154         </col>
5155       </thead>
5156       <row>
5157         <col>
5158           <para>1</para>
5159         </col>
5160         <col>
5161           <para>Manual entry</para>
5162         </col>
5163         <col>
5164           <para>4</para>
5165         </col>
5166         <col>
5167           <para>A manual entry of a notification.</para>
5168         </col>
5169         <col>
5170           <para>T</para>
5171         </col>
5172       </row>
5173 </table>
5174 </subsubsection>
5175 </subsection>
5176
5177 <subsection>
5178   <heading>unprocessed_log</heading>
5179
5180 <para>
5181 The <emph>user</emph> table contains the users that can login the monitoring application.
5182 It will also store if the users maintains the system.
5183 Mainly used for retrieval so properly indexed.
5184 </para>
5185
5186 <subsubsection>
5187   <heading>The fields.</heading>
5188
5189 <para>
5190 The fields are listed below:
5191 </para>
5192
5193 <table cpos='lllp{6cm}'>
5194       <thead>
5195         <col>
5196           <para>Fieldname</para>
5197         </col>
5198         <col>
5199           <para>Fieldtype</para>
5200         </col>
5201         <col>
5202           <para>Size</para>
5203         </col>
5204         <col>
5205           <para>Remarks</para>
5206         </col>
5207       </thead>
5208       <row>
5209         <col>
5210           <para>unprocessedid</para>
5211         </col>
5212         <col>
5213           <para>Bigserial</para>
5214         </col>
5215         <col>
5216           <para/>
5217         </col>
5218         <col>
5219           <para>Autonumber entry</para>
5220         </col>
5221       </row>
5222       <row>
5223         <col>
5224           <para>objectid</para>
5225         </col>
5226         <col>
5227           <para>Bigint</para>
5228         </col>
5229         <col>
5230           <para/>
5231         </col>
5232         <col>
5233           <para>Reference to the object</para>
5234         </col>
5235       </row>
5236       <row>
5237         <col>
5238           <para>servicecode</para>
5239         </col>
5240         <col>
5241           <para>Text</para>
5242         </col>
5243         <col>
5244           <para/>
5245         </col>
5246         <col>
5247           <para>The service that entered this data.</para>
5248         </col>
5249       </row>
5250       <row>
5251         <col>
5252           <para>logdata</para>
5253         </col>
5254         <col>
5255           <para>Text</para>
5256         </col>
5257         <col>
5258           <para/>
5259         </col>
5260         <col>
5261           <para>The data that comes from the file.</para>
5262         </col>
5263       </row>
5264     </table>
5265 </subsubsection>
5266
5267 <subsubsection>
5268   <heading>The indexes.</heading>
5269 <para>
5270 The indices of the table:
5271 </para>
5272
5273 <table cpos='lll'>
5274       <thead>
5275         <col>
5276           <para>Indexname</para>
5277         </col>
5278         <col>
5279           <para>Field</para>
5280         </col>
5281         <col>
5282           <para>Characteristics</para>
5283         </col>
5284       </thead>
5285       <row>
5286         <col>
5287           <para>unl_pk</para>
5288           <para>(unprocessed_l_unprocessedid_key)</para>
5289         </col>
5290         <col>
5291           <para>unprocessedid</para>
5292         </col>
5293         <col>
5294           <para>Primary key</para>
5295         </col>
5296       </row>
5297     </table>
5298 </subsubsection>
5299
5300 <subsubsection>
5301   <heading>The relationships.</heading>
5302 <para>
5303 Relationships with other tables:
5304 </para>
5305
5306 <table cpos='llp{8cm}'>
5307       <thead>
5308         <col>
5309           <para>Fieldname</para>
5310         </col>
5311         <col>
5312           <para>Remote Table</para>
5313         </col>
5314         <col>
5315           <para>Remarks</para>
5316         </col>
5317       </thead>
5318       <row>
5319         <col>
5320           <para>objectid</para>
5321         </col>
5322         <col>
5323           <para>object</para>
5324         </col>
5325         <col>
5326           <para>Reference to the object that is reporting the data</para>
5327         </col>
5328       </row>
5329       <row>
5330         <col>
5331           <para>servicecode</para>
5332         </col>
5333         <col>
5334           <para>service</para>
5335         </col>
5336         <col>
5337           <para>Reference to the servicecode that is mentioned in the filename.</para>
5338         </col>
5339       </row>
5340     </table>
5341     <para>In the model this look like this:</para>
5342     <para>
5343       <picture src="erd-unplog.png" eps="erd-unplog"/>
5344     </para>
5345 </subsubsection>
5346
5347 <subsubsection>
5348   <heading>Sample values.</heading>
5349     <para>To do</para>
5350 </subsubsection>
5351 </subsection>
5352
5353 <subsection>
5354   <heading>user_gnucomo</heading>
5355
5356 <para>
5357 The <emph>user</emph> table contains the users that can login the monitoring application.
5358 It will also store if the users maintains the system.
5359 Mainly used for retrieval so properly indexed.
5360 </para>
5361
5362 <subsubsection>
5363   <heading>The fields.</heading>
5364
5365 <para>
5366 The fields are listed in the table below:
5367 </para>
5368
5369 <table cpos='lllp{6cm}'>
5370       <thead>
5371         <col>
5372           <para>Fieldname</para>
5373         </col>
5374         <col>
5375           <para>Fieldtype</para>
5376         </col>
5377         <col>
5378           <para>Size</para>
5379         </col>
5380         <col>
5381           <para>Remarks</para>
5382         </col>
5383       </thead>
5384       <row>
5385         <col>
5386           <para>username</para>
5387         </col>
5388         <col>
5389           <para>Text</para>
5390         </col>
5391         <col>
5392           <para/>
5393         </col>
5394         <col>
5395           <para>Name the user is known by</para>
5396         </col>
5397       </row>
5398       <row>
5399         <col>
5400           <para>password</para>
5401         </col>
5402         <col>
5403           <para>Text</para>
5404         </col>
5405         <col>
5406           <para/>
5407         </col>
5408         <col>
5409           <para>Password</para>
5410         </col>
5411       </row>
5412       <row>
5413         <col>
5414           <para>active_sessionid</para>
5415         </col>
5416         <col>
5417           <para>Bigint</para>
5418         </col>
5419         <col>
5420           <para/>
5421         </col>
5422         <col>
5423           <para>Sessionnumber currently used by user.
5424           If this is set to 0 a user is not present on the system.
5425           Only one session can be open at a time.</para>
5426         </col>
5427       </row>
5428       <row>
5429         <col>
5430           <para>account_active</para>
5431         </col>
5432         <col>
5433           <para>Boolean</para>
5434         </col>
5435         <col>
5436           <para/>
5437         </col>
5438         <col>
5439           <para>Is the account currently active?</para>
5440         </col>
5441       </row>
5442       <row>
5443         <col>
5444           <para>security_level</para>
5445         </col>
5446         <col>
5447           <para>Int</para>
5448         </col>
5449         <col>
5450           <para/>
5451         </col>
5452         <col>
5453           <para>Given securitylevel to this user</para>
5454         </col>
5455       </row>
5456     </table>
5457 </subsubsection>
5458
5459 <subsubsection>
5460   <heading>The indexes</heading>
5461 <para>
5462 The table is indexed on the following fields:
5463 </para>
5464 <table cpos='lll'>
5465       <thead>
5466         <col>
5467           <para>Indexname</para>
5468         </col>
5469         <col>
5470           <para>Field</para>
5471         </col>
5472         <col>
5473           <para>Characteristics</para>
5474         </col>
5475       </thead>
5476       <row>
5477         <col>
5478           <para>usr_pk</para>
5479         </col>
5480         <col>
5481           <para>username</para>
5482         </col>
5483         <col>
5484           <para>Primary key</para>
5485         </col>
5486       </row>
5487       <row>
5488         <col>
5489           <para>usr_active_sessionid</para>
5490         </col>
5491         <col>
5492           <para>active_sessionid</para>
5493         </col>
5494         <col>
5495           <para>Unique</para>
5496         </col>
5497       </row>
5498     </table>
5499 </subsubsection>
5500
5501 <subsubsection>
5502   <heading>The relationships.</heading>
5503 <para>
5504 Relationships with other tables
5505 </para>
5506 <table cpos='lll'>
5507       <thead>
5508         <col>
5509           <para>Fieldname</para>
5510         </col>
5511         <col>
5512           <para>Remote Table</para>
5513         </col>
5514         <col>
5515           <para>Remarks</para>
5516         </col>
5517       </thead>
5518       <row>
5519         <col>
5520           <para>ObjectID</para>
5521         </col>
5522         <col>
5523           <para>Object</para>
5524         </col>
5525         <col>
5526           <para>Link to the object</para>
5527         </col>
5528       </row>
5529     </table>
5530     <para>In the model this look like this:</para>
5531     <para>
5532       <picture src="erd-usr.png" eps="erd-usr"/>
5533     </para>
5534 </subsubsection>
5535 </subsection>
5536 </section>
5537
5538 </chapter>
5539
5540 <chapter>
5541   <heading>Warnings that can be detected.</heading>
5542 </chapter>
5543
5544     <chapter>
5545       <heading>User Interface.</heading>
5546
5547     <para>To be determined in the near future.</para>
5548 </chapter>
5549
5550 <chapter>
5551   <heading>The installation process.</heading>
5552
5553 <para>
5554 Since the system must make maintenance and security easier to use,
5555 the burden of installation should as easy as possible.
5556 Where possible the installation script should take away as much work as possible.
5557 Where settings need to be done, this should be done through an interface.
5558 However at no point we take the user's right to understand and work with system.
5559 Configuration-files should be easy to understand and the choice must be there to do installation manually.
5560 For the time being, we will use the manual installation procedure outlined below:
5561 </para>
5562
5563 <para>
5564 Since there is no binary package available for Gnucomo yet, you will need
5565 to compile and install Gnucomo from the source code.
5566 Before making the Gnucomo binaries, make sure you have the following
5567 packages installed:
5568 <itemize>
5569 <item>postgresql, postgresql-server, postgresql-develop</item>
5570 <item>AXE</item>
5571 <item>libxml2, libxml2-develop</item>
5572 </itemize>
5573
5574 Make sure your PostgreSQL database server is up and running.
5575 If you also want to use the web interface, you will need Apache with PHP.
5576 The PHP module needs Postgresql and DOM-XML support.
5577 With all required packages installed, you should be able to go into
5578 the <emph>src</emph> directory and type <code>make</code> to create
5579 a binary <code>gcm_input</code>.
5580 </para>
5581
5582 <para>
5583 To use gnucomo, you need to create a database and a configuration file.
5584 To make the database in your PostgreSQL server, log in as a DBA (DataBase
5585 Administrator, usually the user 'postgres') and create the database and a
5586 user who can use the database.
5587 Here is an example:
5588
5589 <verbatim>
5590
5591   createdb gnucomo
5592   createuser arjen
5593
5594 </verbatim>
5595
5596 If you also want to be able to use the test scripts, you will need to
5597 create the <code>gnucomo_test</code> database as well.
5598 The configuration file for Gnucomo is a rather simple XML file that
5599 states at least what database Gnucomo uses and the userid with which
5600 Gnucomo will log in to the database server.
5601 These parameters should be the same as the database and user you just
5602 created in your role of DBA.
5603 There is an example configuration file, <code>gnucomo.conf</code> in the
5604 <emph>src</emph> directory.
5605 You should copy this config file to one of the following places:
5606 <enumerate>
5607 <item><code>/etc/gnucomo.conf</code></item>
5608 <item><code>/usr/local/etc/gnucomo.conf</code></item>
5609 </enumerate>
5610 With the database and the configuration file in place, you should
5611 be able to run <code>gcm_input</code> to read log files and store
5612 log entries in the database.
5613 </para>
5614     <section>
5615       <heading>Supported platforms.</heading>
5616
5617     <para>The following two Linux distributions have been selected to be actively supported:</para>
5618     <itemize>
5619       <item>
5620         <para>Debian GNU/Linux (.deb packages)</para>
5621       </item>
5622       <item>
5623         <para>RedHat Linux (.rpm packages)</para>
5624       </item>
5625     </itemize>
5626     <para>We will try and facilitate as many operating systems client-side and as many unices server-side, but efforts on testing out of the projects will be very minimalistic to ensure that the project keeps delivering new version and new features. </para>
5627     </section>
5628
5629     <section>
5630       <heading>Installation on the server.</heading>
5631
5632     <para>The following steps will be part of a script, that can automatically perform these steps:</para>
5633
5634 <enumerate>
5635     <item>
5636       <para>Create the user <emph>gnucomo</emph>.</para>
5637     </item>
5638     <item>
5639       <para>Make the directory as described in the chapter <emph>Sending messages to the central gnucomo system</emph> in the subchapter <emph>directories</emph>.(server-side).</para>
5640     </item>
5641 </enumerate>
5642     </section>
5643
5644     <section>
5645       <heading>Installation on a UNIX-client.</heading>
5646
5647     <para>The following steps will be part of a script, that can automatically perform these steps:</para>
5648 <enumerate>
5649     <item>
5650       <para>Create the user <emph>gcm_client</emph>.</para>
5651     </item>
5652     <item>
5653       <para>Make the directory as described in the chapter <emph>Sending messages to the central gnucomo system</emph> in the subchapter <emph>directories</emph> (client-side).</para>
5654     </item>
5655     <item>
5656       <para>Creation of the database user gcm_input. This user has only the right to enter data into the database. There are no deletion, update or select-permissions.</para>
5657     </item>
5658 </enumerate>
5659
5660     </section>
5661     </chapter>
5662
5663 <chapter>
5664   <heading>Dependency on other free software.</heading>
5665
5666 <para>The following list is a set of applications that will be used on to make our application work:</para>
5667     <table cpos='lp{8cm}l'>
5668       <thead>
5669         <col>
5670           <para>Application</para>
5671         </col>
5672         <col>
5673           <para>Needed for</para>
5674         </col>
5675         <col>
5676           <para>Client/Server</para>
5677         </col>
5678       </thead>
5679       <row>
5680         <col>
5681           <para>gpg</para>
5682         </col>
5683         <col>
5684           <para>The encryption of the information being transferred between the two systems.</para>
5685         </col>
5686         <col>
5687           <para>Client</para>
5688           <para>Server</para>
5689         </col>
5690       </row>
5691       <row>
5692         <col>
5693           <para>GNU/Linux</para>
5694         </col>
5695         <col>
5696           <para>The basic operating system. Allthough the system might work very well on all types on versions of Linux, FreeBSD, OpenBSD or any unices the main focus for distribution is given to: Debian GNU/Linux and RedHat Linux (the downloadable iso-version). </para>
5697         </col>
5698         <col>
5699           <para>Server</para>
5700         </col>
5701       </row>
5702       <row>
5703         <col>
5704           <para>mail</para>
5705         </col>
5706         <col>
5707           <para>The application enabling the sending of messages.</para>
5708         </col>
5709         <col>
5710           <para>Client</para>
5711           <para>Server</para>
5712         </col>
5713       </row>
5714       <row>
5715         <col>
5716           <para>openssh</para>
5717         </col>
5718         <col>
5719           <para>If e-mail is not used this application will deliver the file-copy</para>
5720         </col>
5721         <col>
5722           <para>Client</para>
5723           <para>Server</para>
5724         </col>
5725       </row>
5726       <row>
5727         <col>
5728           <para>PostgreSQL</para>
5729         </col>
5730         <col>
5731           <para>The database where all the signals from client will be stored.</para>
5732         </col>
5733         <col>
5734           <para>Client</para>
5735         </col>
5736       </row>
5737     </table>
5738 <section>
5739 <heading>Related projects</heading>
5740
5741 <para>
5742 There are a number of projects that can help <strong>Gnucomo</strong> or perform
5743 similar funtions:
5744
5745 <itemize>
5746    <item>
5747    <reference href='http://crm114.sourceforge.net/'>CRM114</reference> - The Controllable
5748    Regex Mutilator.
5749    </item>
5750 </itemize>
5751 </para>
5752 </section>
5753 </chapter>
5754
5755 <chapter>
5756   <heading>Settings on the server machine.</heading>
5757
5758 <section>
5759   <heading>Required.</heading>
5760
5761 <para>The following settings are required to ensure that the functionality is as much as expected.</para>
5762
5763 <subsection>
5764   <heading>Timezone in GMT (UTC).</heading>
5765
5766 <para>Since all international traffic registers all entries in UTC (Universal Time Coordinate) this system will do so as well. Therefore the clock has to be adjusted to that as well as the system settings.</para>
5767 <para>These settings can found on a RedHat computer in the <code>/etc/sysconfig/clock-file</code>. On Debian this stored in the file <code>/etc/timezone</code>.</para>
5768 </subsection>
5769 </section>
5770
5771 <section>
5772   <heading>Suggested.</heading>
5773
5774 <subsection>
5775   <heading>Use NTP.</heading>
5776
5777 <para>If a computer is running for some time the clocks tend to be off the correct time. This makes it harder to detect what exactly happened exactly at what moment in time and reduce value of log-entries. Especially considering that ultimately all data is gathered in one central system. To overcome this Network Time Protocol (NTP RFC 13025 March 1992) has been created that explains a protocol to synchronize clocks through the Internet. Many operating systems like Microsoft Windows 2000 Server and FreeBSD, OpenBSD and Linux  support this. A ntp-server (or ntpd) can be found at: http://www.eecis.udel.edu/~ntp/ It is strongly recommended that you use this.</para>
5778
5779     </subsection>
5780     </section>
5781     </chapter>
5782
5783     <chapter>
5784       <heading>Settings on the client machine.</heading>
5785
5786     <section>
5787       <heading>Required.</heading>
5788     </section>
5789
5790     <section>
5791       <heading>Suggested.</heading>
5792
5793     <subsection>
5794       <heading>Use NTP.</heading>
5795
5796     <para>If a computer is running for some time the clocks tend to be off the correct time. This makes it harder to detect what exactly happened exactly at what moment in time and reduce value of log-entries. Especially considering that ultimately all data is gathered in one central system. To overcome this Network Time Protocol (NTP RFC 13025 March 1992) has been created that explains a protocol to synchronize clocks through the Internet. Many operating systems like Microsoft Windows 2000 Server and FreeBSD, OpenBSD and Linux  support this. A ntp-server (or ntpd) can be found at: http://www.eecis.udel.edu/~ntp/ It is strongly recommended that you use this.</para>
5797
5798     </subsection>
5799     </section>
5800     </chapter>
5801
5802     <chapter>
5803       <heading>Appendices.</heading>
5804
5805     <section>
5806       <heading>Appendix A. GNU Public License Version 2, June 1991.</heading>
5807
5808     <para>Copyright (C) 1989, 1991 Free Software Foundation, Inc.</para>
5809     <para>59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</para>
5810     <para>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</para>
5811
5812     <subsection>
5813       <heading>Preamble</heading>
5814     <para>The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. </para>
5815     <para>When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.</para>
5816     <para>To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.</para>
5817     <para>For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.</para>
5818     <para>We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. </para>
5819     <para>Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.</para>
5820     <para>Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.</para>
5821     <para>The precise terms and conditions for copying, distribution and modification follow.</para>
5822     <para>GNU GENERAL PUBLIC LICENSE</para>
5823     </subsection>
5824
5825     <subsection>
5826       <heading>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</heading>
5827
5828 <enumerate>
5829     <item>
5830       <para>This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The &quot;Program&quot;, below, refers to any such program or work, and a &quot;work based on the Program&quot; means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term &quot;modification&quot;.) Each licensee is addressed as &quot;you&quot;.</para>
5831     <para>Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. </para>
5832     </item>
5833     <item>
5834       <para>You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.</para>
5835     <para>You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.</para>
5836     </item>
5837     <item>
5838       <para>You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:</para>
5839     <para>a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.</para>
5840     <para>b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.</para>
5841     <para>c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)</para>
5842     <para>These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.</para>
5843     <para>Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.</para>
5844     <para>In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.</para>
5845     </item>
5846     <item>
5847       <para>You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:</para>
5848     <para>a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, </para>
5849     <para>b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,</para>
5850     <para>c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)</para>
5851     <para>The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.</para>
5852     <para>If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.</para>
5853     </item>
5854     <item>
5855       <para>You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.</para>
5856     </item>
5857     <item>
5858       <para>You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.</para>
5859     </item>
5860     <item>
5861       <para>Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein.</para>
5862     <para>You are not responsible for enforcing compliance by third parties to this License.</para>
5863     </item>
5864     <item>
5865       <para>If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.</para>
5866     <para>If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.</para>
5867     <para>It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.</para>
5868     <para>This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.</para>
5869     </item>
5870     <item>
5871       <para>If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.</para>
5872     </item>
5873     <item>
5874       <para>The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.</para>
5875     <para>Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and &quot;any later version&quot;, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.</para>
5876     </item>
5877     <item>
5878       <para>If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.</para>
5879     </item>
5880 </enumerate>
5881     </subsection>
5882     <subsection>
5883       <heading>NO WARRANTY</heading>
5884 <enumerate>
5885     <item>
5886       <para>BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVidE THE PROGRAM &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</para>
5887     </item>
5888     <item>
5889       <para>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</para>
5890     </item>
5891 </enumerate>
5892     <para>END OF TERMS AND CONDITIONS</para>
5893     </subsection>
5894     <subsection>
5895       <heading>How to Apply These Terms to Your New Programs</heading>
5896     <para>If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. </para>
5897     <para>To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the &quot;copyright&quot; line and a pointer to where the full notice is found.</para>
5898     <para>&lt;one line to give the program's name and a brief idea of what it does.&gt; Copyright (C) &lt;year&gt; &lt;name of author&gt; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</para>
5899     <para>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</para>
5900     <para>You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</para>
5901     <para>Also add information on how to contact you by electronic and paper mail.</para>
5902     <para>If the program is interactive, make it output a short notice like this when it starts in an interactive mode:</para>
5903     <para>Gnomovision version 69, Copyright (C) year name of author</para>
5904     <para>Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.</para>
5905     <para>This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.</para>
5906     <para/>
5907     <para>The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.</para>
5908     <para>You should also get your employer (if you work as a programmer) or your school, if any, to sign a &quot;copyright disclaimer&quot; for the program, if necessary. Here is a sample; alter the names:</para>
5909     <para>Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. </para>
5910     <para>&lt;signature of Ty Coon&gt;, 1 April 1989 Ty Coon, President of Vice</para>
5911     <para>This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.</para>
5912     </subsection>
5913     </section>
5914     </chapter>
5915   </book>
5916 </doc>