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">
8 <subtitle>GNU COMPUTER MONITORING</subtitle>
9 <subtitle>A system for interactive system monitoring.</subtitle>
10 <subtitle>Development manifest</subtitle>
12 <author>Brenno J.S.A.A.F. de Winter, De Winter Information Solutions</author>
13 <author>Arjen Baart, Andromeda Technology & Automation</author>
14 <date>November 07, 2002.</date>
16 <infoitem label="Version">0.21</infoitem>
24 <heading>About this document.</heading>
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.
34 <heading>History of the document.</heading>
36 <table cpos='lp{3cm}lp{5cm}'>
38 <col>Version</col><col>Author</col><col>Date</col><col>Remarks</col>
41 <col>0.l</col><col>Brenno de Winter</col><col>Jul 11, 2002</col>
47 <col>0.11</col><col>Arjen Baart</col><col>Jul 12, 2002</col>
49 Additional guidelines and dataflow diagram.
53 <col>0.12</col><col>Brenno de Winter</col><col>Jul 15, 2002</col>
59 <col>0.13</col><col>Arjen Baart</col><col>Jul 16, 2002</col>
61 Entity-relationship model added.
65 <col>0.14</col><col>Brenno de Winter</col><col>Jul 17, 2002</col>
67 Based on feedback. Small changes to the datamodel and finishing touches
68 in lay-out of the tables. Added some examples.
72 <col>0.15</col><col>Brenno de Winter, Arjen Baart</col><col>Jul 21, 2002</col>
74 Additional feedback processed, indexes added, ERD added and SQL-script created.
78 <col>0.16</col><col>Brenno de Winter</col><col>Aug 7, 2002</col>
80 Communication handling added.
84 <col>0.17</col><col>Brenno de Winter</col><col>Aug 11, 2002</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>
94 <col>0.18</col><col>Brenno de Winter, Peter Roozemaal</col><col>Aug 15, 2002</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>
102 <col>0.19</col><col>Arjen Baart</col><col>Aug 27, 2002</col>
108 <col>0.20</col><col>Arjen Baart</col><col>Oct 20, 2002</col>
110 Minor layout improvements
114 <col>0.21</col><col>Arjen Baart</col><col>Nov 07, 2002</col>
116 Installation instructions added.
117 Combined chapters 4 through 7 into one chapter (4).
126 <heading>Aim of the project.</heading>
129 The number of log-files in a system and the tools in general do not make
130 monitoring a system simple. Quite often there is so much information that
131 attention for logfiles seems to fade away. For that reason monitoring routers
132 and clients is often not an option. Instead of timely detection of problems,
133 logs more often are used to find out what went wrong. When a system is
134 under attack early signals can often easily be detected<footnote>Just as in
135 real life there a signals that things are not going in the right direction.
136 For the attacks on September 11th 2001 there were many signals available
137 that could to have led to early detection: warnings of several intelligence
138 agencies, warnings within the FBI, flight schools that report strange
139 customers that want to steer a plane and don't seem to care about take
140 off and landing, people opening accounts under fake names.</footnote>
141 and preventive measures could have been taken if the time was only available.
145 The Gnucomo project is meant to make pro-active monitoring of computers
146 and devices easier. It will contain a set of applications that will
147 retrieve all types of monitoring information from devices and place
148 it into a database. Devices can be server computers, desktop computers,
149 PBX'es or other systems. By running checks the manual process of
150 watching log files can be reduced. Also an intelligent script can
151 see things that a human being will easy overlook. Gnucomo won't
152 relieve an administrator of all manual work on log-files, but will
153 increase the changes on actual monitoring.
156 With all this data being available at one central location the gnucomo-server
157 acts as some kind of black box for computer systems. If something does
158 happen the evidence will be available at a remote location available
159 for exploration<footnote>This analogy is based on a remarkable anecdote:
160 One a trip to US I spoke to a 747-captain of Air France. While talking
161 over several subjects we touched security. When we went some deeper I
162 touched the subject gnucomo and he told me that Air France was doing
163 the very same with real black boxes. By sending all the data to Paris
164 errors can be detected earlier and be resolved. In any less fortunate
165 case the cause of the crash might be detected sooner (or fuller).
166 For me this was a signal there is a point in working gnucomo because
167 the analogy is valid.</footnote>. Forensics will be made easier.
168 Also the collected data is available from multiple locations make
169 it easier to found more about an attack. The change that you overlook
170 things will be reduced.
173 Based on the entered data all sorts of analysis will be performed to discover
174 abnormalities a normal maintenance tool or IDS wouldn't be looking at.
175 An example could be a website in Dutch that suddenly obtains a lot of
176 attention from Greek visitors (based on the location of their
177 IP<footnote>That IP could also warn for other things like: excessive
178 data traffic from wireless connections at times that you wouldn't be
179 expecting traffic at all, absence of traffic when you would be expecting
180 some traffic at least or even what article is liked in which part of the world,
181 what regions poses the highest threat to the security of the system (based
182 on the location of the IP address).</footnote>). These abnormalities will
183 be presented as user-friendly as possible to increase awareness of the
184 state of the system. By doing that the system can also be used for more
185 complex analysis. One than can look at long-term trends like hacking
186 attempts that take place, new exploits that are tried all of a sudden
187 or signs of distributed attacks or a certain pattern of attempts<footnote>A portscan
188 that last three days is hard to detect with a real-time IDS,
189 while gnucomo would discover this anyhow. With correct intelligence
190 one portscan from multiple IP-addresses can be related.</footnote>.
193 Also extra data will be gathered where ever possible to save time to
194 the administrator. If IP address attract attention of gnucomo the next
195 logical step would be to use tools like dig, whois and visiting arin-related
196 websites. This data will automatically be collected in an early stage and
197 stored in the database.
200 The results will be gathered in a warning system.
201 Those warnings will be presented to the administrative person
202 who is responsible for that particular machine or network.
203 Having multiple systems in the system can add to the intelligence that
204 can be gathered. The interface will be web-based and aimed at user-friendliness.
207 Since multiple systems can enter data into the Gnucomo database more
208 intelligent hardware and security detection can be done.
209 When things do go wrong Gnucomo contains as much information as
210 possible to figure out what happened and assist in the forensics.
211 Since research on the signals afterwards is broader more attention
212 will be given as much data as possible and do less filtering.
215 With the data in the database also policies can be checked automatically
216 retro-actively so that the security leaves some room to stretch some rules.
217 This may sound not logic, because one of the main functions of security is
218 to enforce rules. But some rules are made with the different meanings.
219 For instance: a rule may be that private browsing isn't allowed.
220 The background of such a rule might be to try and reduce the amount
221 of data traffic (too many people downloading mp3's, or people not
222 getting to work anymore). By monitoring that specific fact
223 (bandwidth spent on non-business related Internet use)
224 it's possible to be relaxed on that rule and enable many good-willing
225 users reading his/hers daily newspaper.
228 The scope of the project is clearly limited to monitoring and not to
229 offer automated maintenance or web-based maintenance.
230 There are other projects currently being able to provide that
231 functionality. We will focus on intelligence and user-friendliness
232 of representation of facts presented. A warning should trigger
233 an administrator to get up and do something using the tools he or she values the most.
236 Also we are not aiming to replace great tools like SNORT as a real-time IDS.
237 These tools can do thing, that in the beginning won't be a part of gnucomo
238 out of performance reasons. Also there is no need to duplicate what they
239 already did. If that energy is placed in intelligent we're very complimentary.
240 Gnucomo can however be a reality check on an existing NIDS (Network Intrusion
241 Detection System). For instance if warnings keep coming it may be time to
242 rethink the rules that have been set.
246 This evolves to the following list of functions gnucomo can provide:
249 <item> Intrusion detection </item>
250 <item> Detecting hacker attempts </item>
251 <item> Early detection of system failures </item>
252 <item> Exhaustion of system resources </item>
253 <item> Capacity planning for future expansion </item>
254 <item> Spotting bottlenecks in a system. </item>
255 <item> Verifying system integrity </item>
256 <item> Assistance with troubleshooting </item>
257 <item> Perform post-mortem forensics </item>
258 <item> Incident response system. </item>
263 <heading>Decisions for the overall system.</heading>
266 In order to get the project running we have to make some decisions before
267 we can start. Of course are the decisions always open for review,
268 but initially our main aim is to get a system running. This doesn't
269 mean that we allow a lesser architecture, but more that we create an
270 environment that will lead to results.
273 The following decisions apply to the system in general:
277 The major part of the system will be used for security features.
278 The solution itself has to be secure.
281 In general we strive to be as platform and application independent as possible.
282 However to achieve software to get ready and to assure progress some selections
283 will have to be made excluding options for applications<footnote>An example is
284 in the database. By using stored procedures and triggers MySQL cannot be used.
285 However the data integrity at that point is more important than the ability to
286 use MySQL.</footnote>. Where possible we will enable ports to other applications
290 The computers collecting the data will only be Linux machines,
291 with future support for other Unices. However it is not aim our
292 to port this part of the project to other platforms just now.
295 The database system will make heavy use of stored procedures and
296 triggers and thus lock out some less feature-full database.
299 Although we're not married to a database system initially this will be
300 PostgreSQL only so that we can build for results. The code however
301 shouldn't be build to deliberately lock outer systems.
302 Other database that might be interesting to add: DB2, Oracle
303 (if the rainfall of security advisories seems to be over) and Informix.
306 The interface for the user will be a web-interface written in PHP
307 with PostgreSQL-database access. Despite the fact that initially
308 this will be the preferred way to communicate with our system,
309 other interfaces are welcome and should be supported.
312 The technologies used for the daemons on the central site and remote
313 site are open for discussion. A decision is made when it is clear what
314 exactly will be needed to code.
317 The original logfiles on systems will not be harmed in any way,
318 but will be saved the way they presented to gnucomo.
321 In the database processed data as well as raw data will be stored.
324 Our main aim is to ease the life of the administrator when dealing with
325 the symptoms of a machine so that he doesn't miss important notifications.
326 The project will be made around detection. We won't focus on making a
327 maintenance applications but solely on monitoring, because other applications
328 like webmin or linuxconf do already deliver such functionality.
329 We are complementary to those applications. This doesn't mean that
330 the system cannot send SMS'es, e-mails or make alarms sound.
333 Any output of the logbook will be stored and sent within a certain
334 interval which can be set. By doing that the mechanism will not flood
335 the total mechanism and overload machines.
338 When applications for gnucomo we will try and do the non-server part
339 as platform independent as possible. This in order to prevent writing
340 a same application multiple times. For instance one for Unices, one
341 for Macintosh and one for Microsoft.
344 To ensure the quality of software and to prevent any unwanted functionality
345 rolling into the project all code will be reviewed by one of the lead members
346 before it is accepted. Since this project is aimed at throughput speed no
347 formal procedures will be enforced, but we promise not to let software in
348 that hasn't been checked.
355 <heading>Overall system Architecture</heading>
358 The overall systems aims to make maintenance data better accessible and by
359 doing that lowering the barrier to be on alert for intrusions,
360 system failure and other misery that can happen to computer systems.
361 Also more systems can be monitored and even focus can be placed on desktop computers,
362 something that nowadays rarely happens. Since the solution is only aimed at
363 monitoring (with some responses possible) other people can watch their system(s)
364 without being Administrator<footnote>This can be interesting for people using
365 this service and not doing their own maintenance (smaller companies).
366 If technical action needs to be taken a warning can be send to an administrator.
367 This saves costs and time.</footnote>.
370 The main system will know to sides:
374 <item> Central Application - server </item>
375 <item> Monitored System - client </item>
379 The project has been setup as a two sided system in order to be able to
380 guard many computers at the same time.
381 However it may be obvious that both sides of the application can very
382 well be installed on a single system.
385 When events<footnote>A signal can be the outcome of process that finished,
386 logbook entries, warnings from intrusion detection systems,
387 etc. </footnote> happen they will be stored in a file.
388 When this file is delivered to a certain directory a daemon will detect
389 this and start the transfer of the file. The file will be transferred
390 to the central application or the client. This transfer will be triggered
391 immediately after a process has finished or with a certain time-interval
392 when it concerns a logbook. All output will be placed in a directory where
393 the daemon detects it and ensures the transport. For transport currently
394 only two mechanisms will be supported:
398 Encrypted file copy relying on the SSH protocol.
399 On Unix-based systems this will scp (secure copy).
402 E-Mail. The e-mail is encrypted and signed using gpg and then sent to the server.
403 Since the file format will identify the type-of-output the Subject-field of
404 the e-mail is not really needed.
409 <heading>Central Application: signal handler.</heading>
414 <picture src="architecture.png" eps="architecture"/>
415 Illustration 1 Basic overview of the processes on the server.
418 On one machine signals from the network will come in.
419 These signals can be logfiles, result files from applications,
420 remarks entered by the administrator or whatever.
421 Data delivery takes place into a certain directory.
422 A daemon detects that data has come in and will enter it into the database.
423 Once in the database stored procedures and triggers will recognize certain
424 behavior and generate alerts. The user responsible for the server will be
425 confronted with the alerts and can mark them, add comments to it or ignore them.
426 Also it will be possible to do intelligent analysis on not so logical relations
427 per computer or across computers<footnote>A good example could be a portscan
428 on a system that takes place during a week. Normal a simple portscan takes
429 place in a couple of minutes and will thus be easy to detect.
430 By taking a longer period such a scan is harder to detect. </footnote>. Such
431 scripts make detection possible, that is too time consuming to do during
432 processing of the data.
437 <heading>Data processing.</heading>
439 <para>The data processing has four tasks:</para>
442 Extracting data from e-mail and store it in the input-buffer.
443 This can be done by a daemon that checks the e-mail<footnote>It would be logical
444 to place an e-mail server like sendmail or postfix on the server.
445 In many cases the monitored computer will be featuring a SMTP daemon.
446 If a system is comprimised no evidence that comes through will be really
447 trustworthy. By sending it to another machine all evidence that is
448 available will have left the system the moment a hack takes place.</footnote>
449 with a certain interval extracts the e-mails and leave the content
450 in a file in the input buffer. This daemon has only rights to write
451 to the directory it has to write to. <emph>We may as well have the
452 email captured directly by a program with a
453 "gnucomo: |/usr/local/bin/gnucomo-input" - like alias.</emph>
456 Detect files in the input buffer decrypt the content and verify the signature.
457 Another daemon will see the log-files and starts checking if the origin is
458 correct (by verifying the signature) and decrypting the content.
459 The legible files will be processed by entering the data into the database.
462 The database will accept the data and perform a certain number of
463 checks as the data comes in. During the processing of the data
464 abnormalities will be detected and entered into a notification table.
465 The database system will also carry out more complex tasks on given
466 moments in time and enter them as well in the notification table.
469 The database system must be able to undertake action when high
470 alerts are being entered into the database.
471 This can be a couple of things to begin with:
472 send an e-mail or SMS. In a later stage other technologies may be added as well.
473 In this scheme we also make a possibility to escalate problems when no
474 action is taken in a certain amount of time.
480 <heading>Web interface.</heading>
483 The web interface will used to interact with the user.
484 The interface should be intuitive and easy to understand.
485 More important warnings should directly draw attention.
486 The user must be able to perform settings so that warnings
487 can be rated differently than the original settings.
490 The interface will do the following things:
494 Show a list of warnings that are currently open.
497 It must be possible to sort the list on all the fields shown.
500 Deliver detailed information (logbook entries) upon request that have led to the warning.
503 Undertake certain actions like sending
504 <reference href="mailto:abuse@internet-provider.net">abuse@internet-provider.net</reference>
505 e-mails with information.
508 Monitor actions on outstanding issues.
515 <heading>Priority mechanism.</heading>
517 Each notification has a certain priority that requires a different handling
518 of the issue. How each priority will be dealt with is something that can
519 be set per server. The priority mechanism is a simple system of five
520 categories (can be more or less).
526 <heading>The dataflow diagram.</heading>
527 <para>The main dataflow will be as follows.</para>
529 <picture src="dataflow.png" eps="dataflow" scale="0.7"/>
535 <heading>Sending messages to the central gnucomo system.</heading>
538 One of the main tasks is getting all the messages to the database.
539 Ultimately gnucomo will support multiple ways of receiving the data.
540 Basically anything goes, but two mechanisms will be supported in the project
545 E-mail. Messages and elements from logfiles will be sent through e-mail.
548 File copy. Using technologies like scp or ftp (not preferred due to
549 the insecure nature) can place files directly in the receiving directory.
554 <heading>Ensuring data integrity.</heading>
555 <para><TO BE DESCRIBED></para>
559 <heading>Directories and filenames on the server.</heading>
562 Files will be dealt with as if gnucomo were a user (actually there will
563 be a user gnucomo). The files will be placed in the <code>/home/gnucomo/</code> directory.
564 Only <code>/home/gnucomo/incoming/dropbox/</code> can be used to save data in
565 from external systems. All other directories are only available for the user gnucomo.
566 The filename will represent the data that is received. The details are seperated with
567 underscores. When data is sent by e-mail the filename will be written in the first
568 line of the e-mail. A typical filename looks like this:
572 <strong>3_messages_20020807235208_1.asc</strong>
576 the logic behind this is following:
580 <emph>urgency_typeofmessage_timestamp_objectid.typeoffile.</emph>
583 <table cpos='lp{10cm}'>
586 <para>Part of filename</para>
589 <para>Explanation</para>
597 <para>This indicates the urgency of the file. The lower the number the higher
598 it will rank when an overview is given. Standard files are ranked value 3.
599 The ranking works as follows:</para>
600 <para>* 1 <strong>Urgent flash message.</strong> Something urgent needs to
601 be reported. This is only used for emergencies like serious alarms.</para>
602 <para>* 2 <strong>Rapid delivery.</strong> An important message has to get
603 through that is more important than normal delivery, but is not top
604 priority like an emergency.</para>
605 <para>* 3 <strong>Normal.</strong> This is used in most
606 case for normal messages.</para>
607 <para>* 4 <strong>Low priority.</strong> This is data would be useful
608 to place into the system as nice to have.</para>
613 <para>TypeOfMessage</para>
616 <para>This is an indicator what type of data is delivered to gnucomo.
617 There are several categories:</para>
618 <para>* <strong>cron.</strong> This data comes from the /var/log/cron-log (unix).</para>
619 <para>* <strong>httpaccess.</strong> This data comes from the normal http-log (Apache).</para>
620 <para>* <strong>httperror.</strong> This data comes from the http_error-log (Apache).</para>
621 <para>* <strong>maillog.</strong> This data comes from the /var/log/maillog (unix).</para>
622 <para>* <strong>messages.</strong> The data delivered here comes from
623 the /var/log/messages file (unix)</para>
624 <para>* <strong>text.</strong> This file contains a message in plaintext
625 generated by a gnucomo-client and can be anything.
626 It will be dealt with as plaintext.</para>
631 <para>Timestamp</para>
634 <para>The timestamp is made in war-log (YYYYMMDDHHMMSS) format.
635 The timestamp is generated on the client in GMT (to discover
636 discrepancies in timing).</para>
641 <para>Objectid</para>
644 <para>The objectid is the id that is used within the central
645 gnucomo system to recognize the client.
646 Based on this entry the database can link the data to the correct object.
647 Also gpg can obtain the correct e-mail address (by running a query
648 in the database) for verification of the signature of the crypted message.</para>
653 <para>TypeOfFile</para>
656 <para>Indicates the file type:</para>
657 <para>* <strong>asc.</strong> Plaintext ASCII</para>
658 <para>* <strong>gpg.</strong> gpg-crypted data.</para>
659 <para>* <strong>und.</strong> Undertermined data. When files
660 come in by e-mail it is not 100% sure if they are crypted
661 or not. These data has first to be analyzed before it is
662 moved to the correct queue. </para>
668 <heading>Directory for incoming data.</heading>
671 For incoming messages there will be separate directories
672 (<code>/home/gnucomo/incoming/</code>)for:
676 Dropbox. This directory is ready to receive data from all sorts of systems.
677 This directory is world writeable (<strong><emph>but not deleteable!</emph></strong>):
678 <code>/home/gnucomo/incoming/dropbox/</code>
681 Encrypted messages. In this directory messages will be placed that are still
682 gpg-crypted. In this directory the files await decryption and verification of
683 the signature. This directory is: <code>/home/gnucomo/incoming/crypted/</code>
686 Decrypted with errors. During the decryption exercise anything can go wrong.
687 Decrypting can fail or the signature may show errors. If this happens the
688 original message is moved to a different directory:
689 <code>/home/gnucomo/incoming/cryptfail/</code>
692 Inbox. After successful decryption the decrypted message is moved to the inbox.
693 Data that is not encrypted can be moved here from the dropbox after certain
694 verifications. The directory is: <code>/home/gnucomo/incoming/inbox/</code>
697 Processed. After processing the data the file is stored in the directory
698 processed for further reference for a certain amount of time.
699 The directory is: <code>/home/gnucomo/incoming/processed/</code>
702 Archive. After a certain period the files will be archived.
703 Since not every system will archive everything this directory may
704 also be a symbolic link to <code>/dev/null</code>.
705 The used directory is: <code>/home/gnucomo/archive/</code>
711 <heading>Directory for outgoing data.</heading>
714 For outgoing messages the directory <code>/home/gnucomo/outgoing</code> will
715 be used. This directory knows a couple of sub directories:
720 Dropbox. This directory is used by the central gnucomo system to
721 place outgoing messages in.
722 The used directory is: <code>/home/gnucomo/outgoing/dropbox/</code>
725 Outbox. After processing the message (including signing and encrypting
726 when applicable) the messages are placed in the outbox:
727 <code>/home/gnucomo/outgoing/outbox/</code>
730 Processed. After processing the data the file is stored in the
731 directory processed for further reference for a certain amount
732 of time. After sending a message a confirmation will be made that
733 is saved as an incoming message.
734 The directory is: <code>/home/gnucomo/outgoing/processed/</code>
737 Archive. After a certain period the files will be archived.
738 Since not every system will archive everything this directory
739 may also be a symbolic link to <code>/dev/null</code>.
740 The used directory is: <code>/home/gnucomo/archive/</code>
747 <heading>Overview. </heading>
749 <para>The total directory-structure looks like this:</para>
753 /home/gnucomo/archive
754 /home/gnucomo/incoming
755 /home/gnucomo/incoming/crypted
756 /home/gnucomo/incoming/cryptfail
757 /home/gnucomo/incoming/dropbox
758 /home/gnucomo/incoming/inbox
759 /home/gnucomo/incoming/processed
760 /home/gnucomo/outgoing
761 /home/gnucomo/outgoing/dropbox
762 /home/gnucomo/outgoing/outbox
763 /home/gnucomo/outgoing/processed
770 <heading>Directories on the client-side.</heading>
773 On the client-side the files that need to be transmitted will be placed in a
774 directory system as well. In the future this system may not be in use at all
775 devices (routers, certain MS Windows-machine, IP Telephones, etc.). For those
776 systems a different mechanism will become be described here.
777 Initially we focus on Linux systems that will enter data into the database.
780 The filename convention will be totally identical to the filename
781 convention on the server, since this the same mechanism.
784 To facilitate gnucomo client and server on one and the same machine
785 the gnucomo-client should have a different default user.
786 For this purpose the user <strong>gcm_client</strong> will be created.
790 <heading>Directory for incoming data.</heading>
792 For incoming messages there will be separate directories
793 (<code>/home/gnucomo/incoming/</code>)for:
797 Dropbox. This directory is ready to receive data from all sorts of systems.
798 This directory is world writeable (<emph><strong>but not deleteable!</strong></emph>):
799 <code>/home/gcm_client/incoming/dropbox/</code>
802 Encrypted messages. In this directory messages will be placed that
803 are still gpg-crypted. In this directory the files await decryption
804 and verification of the signature.
805 This directory is: <code>/home/gcm_client/incoming/crypted/</code>
808 Decrypted with errors. During the decryption exercise anything can go wrong.
809 Decrypting can fail or the signature may show errors.
810 If this happens the original message is moved to a different directory:
811 <code>/home/gcm_client/incoming/cryptfail/</code>
814 Inbox. After successful decryption the decrypted message is moved
815 to the inbox. Data that is not encrypted can be moved here from
816 the dropbox after certain verifications. The directory is:
817 <code>/home/gcm_client/incoming/inbox/</code>
820 Processed. After processing the data the file is stored
821 in the directory processed for further reference for a
822 certain amount of time. The directory is:
823 <code>/home/gcm_client/incoming/processed/</code>
830 <heading>Directory for outgoing data.</heading>
833 For outgoing messages the directory <code>/home/gcm_client/outgoing</code> will be used.
834 This directory knows a couple of sub directories:
838 Dropbox. This directory is used by the central gnucomo system to place
839 outgoing messages in.
840 The used directory is: <code>/home/gcm_client/outgoing/dropbox/</code>
843 Outbox. After processing the message (including signing and
844 encrypting when applicable) the messages are placed in the outbox:
845 <code>/home/gcm_client/outgoing/outbox/</code>
848 Processed. After processing the data the file is stored in the
849 directory processed for further reference for a certain amount
850 of time. After sending a message a confirmation will be made
851 that is saved as an incoming message.
852 The directory is: <code>/home/gcm_client/outgoing/processed/</code>
858 <heading>Overview. </heading>
859 <para>The total directory-structure looks like this:</para>
863 /home/gcm_client/archive
864 /home/gcm_client /incoming
865 /home/gcm_client/incoming/crypted
866 /home/gcm_client/incoming/cryptfail
867 /home/gcm_client/incoming/dropbox
868 /home/gcm_client/incoming/inbox
869 /home/gcm_client/incoming/processed
870 /home/gcm_client/outgoing
871 /home/gcm_client/outgoing/dropbox
872 /home/gcm_client/outgoing/outbox
873 /home/gcm_client/outgoing/processed
880 <heading>Getting data into the database.</heading>
883 The files in the /home/gnucomo/incoming/inbox/ should be stored in the database.
884 For this purpose there is a table <emph>unprocessed_log</emph>.
885 The data of the filename as well as the content of the file need
886 to be placed in one record.
889 There are some fields that have to be addressed immediately:
893 Servicecode: The servicecode will be obtained out of the filename the
894 is the type_of_message-field in the filename.
897 Objectid: This data is given in the filename it can be found
898 in the <emph>objectid</emph>-part of the filename.
901 Logdata: The data is saved as follows: filename (unaltered)
902 <CR>textual data of the file.
906 The daemon application that delivers the data is called <strong>gcm-input</strong>.
907 It performs the following steps with no extra functionality:
912 <para>Detect if a file is available.</para>
915 <para>Write the data in the database.</para>
920 To write the data in the database a database user gcm_input exists.
921 This user has only the right to enter data into the database.
922 There are no deletion, update or select-permissions.
929 <heading><label name='database'/>The database.</heading>
932 The database is the heart of the system.
933 It will contain all event-data of multiple computers.
934 The intelligence that can be performed on the database will be placed there.
935 To do this as integratedly as possible stored procedures and triggers will be used.
936 To begin with we have selected checks to be performed that will be
937 expanded throughout time.
940 Since the gnucomo database and files contain sensitive data
941 security measures have to be in place. Several database users
942 will exist that have limited rights to perform a certain task
943 ensuring some protection against unauthorized access.
944 However these mechanisms on it's own will work fine, bad maintenance may still
945 screw-up good security. Good database maintenance is needed.
946 For the gnucomo the protection of the valid authentic nature of
947 the data in the database has our highest priority.
950 A <emph>table-name</emph> in this chapter is written in cursive writing.
954 <heading>Database conventions.</heading>
957 The database will be built according the following conventions:
961 All names for tables, indexes and fields will be written in lower
962 case and will be singular. Spaces in names are not allowed.
965 If a table contains field referring to other tables the mother-tables are
966 mentioned in alphabetical order with an underscore between the table-names.
967 So <emph>object</emph> and <emph>user</emph>
968 will make a third table <emph>object_user</emph>
971 A data access user (being the interface) is not allowed to write to
972 the log-entries and the warnings. To change the state of a warning
973 a stored procedure will do so by having a different entry in a table.
974 This should make it possible to discover who did what at which moment in time.
977 The name of two related fields that make the relationship between two
978 tables will be the same to avoid confusion.
984 <heading>Database design.</heading>
987 In the design we anticipate to deliver an as best as possible database performance.
988 That means that data that needs to be entered occasionally can be heavily indexed
989 to increase performance. However data that is mainly stored will only be indexed
990 marginally to have the best possible performance on data entry. If during one of
991 the checks on data-entry a notification is made, the information related to that
992 notification will be indexed very well to increase retrieval performance.
993 What we will try to avoid is that the user interface will cause full table
994 scan and affect the performance of the overall system dramatically.
995 One of the techniques to increase performance on display is to work with views.
996 So where it is feasible we will use them.
1000 The following model pictures the database as described in the remainder
1004 <picture src="erd.png" eps="erd" scale="0.7"/>
1008 In general the database must also be maintained well.
1009 So daily maintenance scripts should keep the performance good<footnote>PostgreSQL seems
1010 to have very good features to do proper maintenance and they have to be exploited to
1011 the full extend.</footnote>.
1016 <heading>Actual design.</heading>
1019 In this part of the chapter the tables will be explained and then described
1020 with all important elements. Per table a sub-chapter will be created.
1021 Each table will have a table design, indexes, relationships and the required data
1022 (for those tables where the data itself is relevant in the design or sample data
1023 (for those cases where no set data is needed). For the relationships beside a
1024 description the subset of the total schema has been incorporated in
1025 the document so that it is more clear what exactly is meant.
1026 Due to the complex nature of the design those drawings sometimes will seem funny.
1029 For the fieldtypes the types of PostgreSQL will be used.
1030 These values can be found in Chapter 3 of the PostgreSQL User Manual
1031 (<reference href="http://www.postgresql.org/">http://www.postgresql.org</reference>).
1034 For indexes primary keys are always <emph>unique</emph> and called
1035 primary key in the name. Since unique indexes within PostgreSQL only
1036 work on B-Tree indexes (which is default) we will use B-Tree for all indexes.
1037 In cases where an exception is made the used type of index will be indicated
1038 in the characteristics. A footnote will explain why a different type of
1039 index has been selected.
1043 <heading>action</heading>
1046 In the table action all recognized actions that can be taken are stored.
1047 Several actions will lead to change in <emph>statuscode</emph>.
1048 However this doesn't apply to all actions<footnote>A status NEW
1049 of a notification that cannot be dealt with automatically will
1050 <strong>not</strong> change before a user looked at it.</footnote>.
1051 Actions take place through background processes and the interface.
1052 This table mainly is used for retrieval so indexing will be done as much as possible.
1056 <heading>The fields.</heading>
1059 The table below describes the fields:
1063 <table cpos='lllp{6cm}'>
1065 <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1071 <col> actionid </col> <col> Bigserial </col> <col> 8 </col>
1073 Autonumber bigint (eight bit)
1077 <col> actionname </col> <col> Text </col> <col> <para/> </col>
1079 Short descriptive name for the type of action
1083 <col> statuscode </col> <col> Varchar </col> <col> 3 </col>
1085 New status that will be given to a notification when this action takes place.
1089 <col> description </col> <col> Text </col> <col> <para/> </col>
1091 A longer description (without limit) on the action.
1100 <heading>The indexes.</heading>
1103 Indices for this table are:
1107 <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1110 <col> act_pk </col> <col> actionID </col> <col> Primary key </col>
1113 <col> act_actionname </col> <col> actionname </col> <col> Unique </col>
1116 <col> act_statuscode </col> <col> statuscode </col> <col> <para/> </col>
1123 <heading>The relationships.</heading>
1126 Relationships with other tables:
1128 <table cpos='llp{7cm}'>
1130 <col> Fieldname </col> <col> Remote Table </col> <col> Remarks </col>
1133 <col> actionid </col> <col> action_notification_user </col>
1135 Each action that takes place will be log. The Actionid will bring
1136 classification to the individual records. This relationship has to be enforced.
1140 <para>In the model this looks like this:</para>
1142 <picture src="erd-action.png" eps="erd-action"/>
1147 <heading>Default data in table.</heading>
1150 The data in this table is standard for the system and part of the design.
1151 The user cannot change this or add value to it.
1154 <table cpos='p{1cm}p{2cm}p{1.5cm}p{6cm}'>
1156 <col>Actionid</col><col>Actionname</col><col>Statuscode</col>
1162 <col>1</col><col>Entry in the system</col><col>NEW</col>
1164 This indicates that a notification is entered into the system. The status is a <strong>NEW</strong>.
1168 <col>2</col><col>Displayed to user</col><col>OPN</col>
1170 The notification has been displayed to the user.
1171 It is not guaranteed that the user has read the notification,
1172 but he/she should be aware of it.
1173 The status will now be changed to <strong>OPEN</strong> if the current
1174 status is <strong>NEW</strong>.
1178 <col>3</col><col>Remarks added</col><col>PEN</col>
1180 Remarks have been added to the notification. The status has now been
1181 changed to <strong>PENDING</strong>.
1185 <col>4</col><col>Priority changed manually</col><col>PEN</col>
1187 The priority of the notification has been changed by the user.
1188 The new status is now <strong>PENDING</strong>.
1192 <col>5</col><col>Priority changed automatically</col><col>PEN</col>
1194 The priority of the notification has been changed by the system.
1195 If the status is not <strong>OPEN</strong> or <strong>NEW</strong> the new
1196 status is become <strong>PENDING</strong>.
1200 <col>6</col><col>Action taken</col><col>PEN</col>
1202 A action has been taken. The status is now <strong>PENDING</strong>.
1206 <col>7</col><col>Assignment to user</col><col>PEN</col>
1208 A notification has been explicitly assigned to another user.
1209 The status is now <strong>PENDING</strong>.
1213 <col>8</col><col>More information or research needed.</col><col>INV</col>
1215 The notification is relevant and will be handled, however more information
1216 or research will be needed. The status is <strong>UNDER INVESTIGATION</strong>.
1220 <col>9</col><col>Make output reference.</col><col>REF</col>
1222 Automated output from an object has been sent to gnucomo.
1223 The input has been identified as a valid reference for future.
1224 Status is now <strong>REFERENCE</strong><footnote>A reference is used to
1225 find differences in output. This feature must reduce the number of wrongful alerts.
1226 Only if a change has taken place a notification is generated.
1227 First time reports will always generate a notification.
1228 By signing this off the system will be silent again.</footnote>.
1232 <col>10</col><col>Job output no longer reference.</col><col>CLS</col>
1234 By making a newer job output reference this output has been obsoleted.
1235 Since once it was a reference the notification can be closed.
1236 The new status for the notification is now <strong>CLOSED</strong>.
1240 <col>11</col><col>Action taken please verify.</col><col>VRF</col>
1242 An action has been taken and things should have been resolved.
1243 Before the notification can be closed a verification has to be done.
1244 New status is now <strong>VERIFY</strong>.
1248 <col>12</col><col>Action not accepted.</col><col>PEN</col>
1250 A check has been done and the results were not good.
1251 New verification is needed.
1252 New status is now <strong>PENDING</strong>.
1256 <col>13</col><col>Action verified</col><col>CLS</col>
1258 The verification for the action has been done and the action is approved.
1259 The new status is now <strong>CLOSED</strong>.
1263 <col>14</col><col>E-mail sent</col>
1264 <col>OPN<footnote>Only if the status is <strong>NEW</strong>.</footnote></col>
1266 An e-mail has been sent.
1270 <col>15</col><col> SMS sent </col>
1271 <col>OPN<footnote>Only if the status is <strong>NEW</strong>.</footnote></col>
1273 A SMS has been sent.
1277 <col>16</col><col>Fax sent</col>
1278 <col>OPN<footnote>Only if the status is <strong>NEW</strong>.</footnote></col>
1280 A fax has been sent.
1284 <col>17</col><col>Log-entries shown</col><col>XXXX</col>
1286 The log entries have been shown. No changes to the status made.
1290 <col>18</col><col>Notification closed</col><col>CLS</col>
1292 Notification has been closed.
1296 <col>19</col><col>Notification reopened</col><col>OPN</col>
1298 Notification has been re-opened
1307 <heading>Action_notification_user.</heading>
1310 In the table action_notification_user each step that is taken regarding a
1311 notification is logged. This table is very important for later use if
1312 something goes wrong, but is also relevant for the interface.
1313 All steps of a notification can be traced here.
1314 There will be a lot of entries here, but retrieval is more crucial for
1315 performance than data entry. So indexing on logic fields is very relevant.
1316 Processing might be slower, but that's worth the price.
1320 <heading>The fields.</heading>
1323 The table below describes the fields:
1326 <table cpos='lllp{6cm}'>
1328 <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1334 <col> actionstepid </col> <col> Bigserial </col> <col> 8 </col>
1336 Autonumber bigint (eight bit)
1340 <col> actionid </col> <col> Bigint </col> <col> 8 </col>
1342 Reference to the action that is being registered here.
1346 <col> username </col> <col> Text </col> <col> <para/> </col>
1348 The username of the user that is involved in the action.
1352 <col> notificationid </col> <col> Bigint </col> <col> 8 </col>
1354 Reference to the notification.
1358 <col> timestamp </col> <col> Timestamp </col> <col> <para/> </col>
1360 The time when the action has been entered into the system.
1361 This is the time without the timezone<footnote>The timestamp without
1362 time has been selected, since this is the system time.
1363 To have the system functioning without any physical borders one
1364 of the settings on the system is time in GMT (UTC).
1365 This ensures also the added value of the system log.</footnote>.
1366 This will be automatically added when the record is added into the database.
1370 <col> statuscode </col> <col> Varchar </col> <col> 3 </col>
1372 The status of the Notification
1376 <col> remarks </col> <col> Text </col> <col> <para/> </col>
1378 Remarks entered by the user if it concerns a manual action
1379 or the text of automatically generated warnings.
1387 <heading>The indexes.</heading>
1390 The table is indexed on the following fields:
1395 <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1398 <col> anu_pk (action_user_actionstepid_key) </col> <col> actionstepid </col>
1399 <col> Primary key </col>
1402 <col> anu_actionid </col> <col> actionid </col> <col> <para/> </col>
1405 <col> anu_username </col> <col> username </col> <col> <para/> </col>
1408 <col> anu_notificationid </col> <col> notificationid </col> <col> <para/> </col>
1411 <col> anu_timestamp </col> <col> timestamp </col> <col> <para/> </col>
1414 <col> anu_statuscode </col> <col> statuscode </col> <col> <para/> </col>
1420 <heading>The relationships.</heading>
1423 Relationships with other tables:
1425 <table cpos='llp{7cm}'>
1427 <col> Fieldname </col> <col> Remote Table </col>
1428 <col> Remarks </col>
1431 <col> actionid </col> <col> action </col>
1433 Indicates the action that has been taken. The relationship has to be enforced.
1437 <col> notificationid </col> <col> notification </col>
1439 Each action that takes place is registered in this table.
1440 By using the notification the relevant notification. The relationship has to be enforced.
1444 <col> username </col> <col> user </col>
1446 Each step in the process has to be related to the user.
1447 If the system itself generates an action the user will be
1448 <strong>gnucomo</strong><footnote>This implies that the system
1449 automatically has an username gnucomo.</footnote>.
1455 In the model this looks like this:
1458 <picture src="erd-anu.png" eps="erd-anu"/>
1464 <heading>Sample data.</heading>
1467 Since no data is delivered automatically a couple of sample records are shown here.
1470 <table cpos='p{1cm}p{1cm}p{1cm}lllp{4cm}'>
1472 <col> Actionstepid </col> <col> Actionid </col> <col> Notificationid </col>
1473 <col> Username </col> <col> Timestamp </col> <col> Status </col>
1474 <col> Remarks </col>
1477 <col> 1 </col> <col> 1 </col> <col> 1 </col> <col> Gnucomo </col>
1478 <col> 2002-07-14 16:14:09 </col> <col> NEW </col>
1480 Gnucomo detected a portscan
1484 <col> 2 </col> <col> 5 </col> <col> 1 </col> <col> Gnucomo </col>
1485 <col> 2002-07-14 16:14:09 </col> <col> NEW </col>
1491 <col> 3 </col> <col> 5 </col> <col> 1 </col> <col> Gnucomo </col>
1492 <col> 2002-07-14 16:14:09 </col> <col> OPN </col>
1494 <para>Automatic e-mail to user:
1495 <reference href="mailto:brenno@dewinter.com">brenno@dewinter.com</reference>:</para>
1496 <para>Gnucomo detected a portscan on system
1497 <reference href="http://gnucomo.dewinter.com/">gnucomo.dewinter.com</reference></para>
1501 <col> 4 </col> <col> 2 </col> <col> 1 </col> <col> Brenno </col>
1502 <col> 2002-07-14 16:18:09 </col> <col> OPN </col>
1504 Notification shown through webinterface.
1508 <col> 5 </col> <col> 17 </col> <col> 1 </col> <col> Brenno </col>
1509 <col> 2002-07-14 16:18:12 </col> <col> PEN </col>
1515 <col> 6 </col> <col> 4 </col> <col> 1 </col> <col> Brenno </col>
1516 <col> 2002-07-14 16:20:37 </col> <col> PEN </col>
1522 <col> 7 </col> <col> 3 </col> <col> 1 </col> <col> Brenno </col>
1523 <col> 2002-07-1416:21:58 </col> <col> PEN </col>
1525 After reviewing the logs I see a portscan. On very specific ports. More analysis needed.
1529 <col> 8 </col> <col> 3 </col> <col> 1 </col> <col> Brenno </col>
1530 <col> 2002-07-14 16:24:59 </col> <col> PEN </col>
1532 Services tables learns me that all services are aimed at Windows-based services.
1533 Attempts for platform specific expoits.
1537 <col> 9 </col> <col> 4 </col> <col> 1 </col> <col> Brenno </col>
1538 <col> 2002-07-14 16:25:03 </col> <col> PEN </col>
1544 <col> 10 </col> <col> 2 </col> <col> 1 </col> <col> Brenno </col>
1545 <col> 2002-07-14 16:30:09 </col> <col> PEN </col>
1547 Notification shown through webinterface.
1551 <col> 11 </col> <col> 3 </col> <col> 1 </col> <col> Brenno </col>
1552 <col> 2002-07-14 16:31:48 </col> <col> PEN </col>
1554 Portscan has finished and no other action seems to take place now.
1558 <col> 12 </col> <col> 18 </col> <col> 1 </col> <col> Brenno </col>
1559 <col> 2002-07-14 16:43:03 </col> <col> CLS </col>
1569 <heading>log & log_adv. </heading>
1572 To store the log-data there are two tables in use that have a one-on-one relationship.
1573 The logic behind this is the difference between raw-always needed data and the somewhat
1574 processed data to support basic retrieval.
1575 The last category isn't always used and when it's used it is redundant.
1576 Also the raw log is very important to the integrity of the system.
1577 For these reasons the processed data has been physically separated in a
1578 second table called <emph>log_adv</emph>.
1579 If needed a view will be available that combines the two tables.
1580 Despite the load indexing on <emph>log_adv</emph> will be done thoroughly.
1585 <heading>log.</heading>
1588 <heading>The fields of log.</heading>
1591 The fields in log are focussed around the raw data and the data needed
1592 to link this to other tables in the system.
1595 <table cpos='lllp{6cm}'>
1597 <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1603 <col> logid </col> <col> Bigserial </col> <col> 8 </col>
1605 Autonumber bigint (eight bit)
1609 <col> objectid </col> <col> Bigint </col> <col> 8 </col>
1611 Reference to the object that submitted this log entry
1615 <col> original_filename </col> <col> Text </col> <col> <para/> </col>
1617 This field refers to the filename that contained this entry.
1618 The original entries as received by the gnucomo-server (flat files).
1619 The files are sent in batches, which makes it very hard to find where the
1620 original logline is. This will enable to see the files to detect
1621 bugs in gnucomo if any occur.
1622 It may well be that in a later stage this functionality becomes obsolete.
1626 <col> servicecode </col> <col> Text </col> <col> <para/> </col>
1628 This field explains what service was recognized (for instance 'kernel, 'httpd' or 'smtp')
1632 <col> type_of_logid </col> <col> Bigint </col> <col> 8 </col>
1634 Reference to the table type_of_log that contains information on what
1635 type of log/report we have here (how gnucomo recognized it).
1639 <col> object_timestamp </col> <col> Timestamp </col> <col> 8 </col>
1641 Timestamp as has been written into the log.
1645 <col> timestamp </col> <col> Timestamp </col> <col> <para/> </col>
1647 The time when the action has been entered into the system.
1648 This is the time without the timezone<footnote>The timestamp without time
1649 has been selected, since this is the system time.
1650 To have the system functioning without any physical borders one of
1651 the settings on the system is time in GMT (UTC).
1652 This ensures also the added value of the system log.</footnote>.
1653 This will be generated upon entry into the database.
1657 <col> rawdata </col> <col> TEXT </col> <col> <para/> </col>
1666 <heading>The indexes.</heading>
1669 The indices of the table:
1674 <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1677 <col> log_pk (log_logid_key) </col> <col> logid </col> <col> Primary key </col>
1680 <col> log_objectid </col> <col> objectid </col> <col> <para/> </col>
1683 <col> log_original_filename </col> <col> original_filename </col> <col> <para/> </col>
1686 <col> log_servicecode </col> <col> servicecode </col> <col> <para/> </col>
1689 <col> log_type_of_logid </col> <col> type_of_logid </col> <col> <para/> </col>
1692 <col> log_object_timestamp </col> <col> object_timestamp </col> <col> <para/> </col>
1695 <col> log_timestamp </col> <col> timestamp </col> <col> <para/> </col>
1701 <heading>The relationships.</heading>
1704 Relationships with other tables:
1707 <table cpos='llp{6cm}'>
1709 <col> Fieldname </col> <col> Remote Table </col>
1715 <col> objectid </col> <col> object </col>
1717 This make the link from what object the logline came
1721 <col> type_of_logid </col> <col> type_of_log </col>
1723 Each logbook has a certain type of reporting.
1724 This explains what type of log was received (and thus which rules for detection was applied).
1728 <col> systemuser </col> <col> user </col>
1730 Links a registered user of an object to this log
1731 entry<footnote>Upon entry of an object most of the times the
1732 passwd-file (UNIX-systems) or the userlist will serve as the entrypoint of users.
1733 Non existing users will be added and will have to be verified by an
1734 administrator before this entry become definite.</footnote>.
1739 <para>In the model this looks like this:</para>
1742 <picture src="erd-log.png" eps="erd-log"/>
1748 <heading>The fields of log_adv.</heading>
1751 The fields of the table <emph>log_adv</emph> are shown below:
1754 <table cpos='lllp{6cm}'>
1756 <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1762 <col> logid </col> <col> Bigint </col> <col> 8 </col>
1764 Bigint (eight bit) 1-to-1 relationship with log
1768 <col> source_ip </col> <col> Inet </col> <col> <para/> </col>
1770 This is the IP-address (V4) of the host that sended the data.
1774 <col> destination_ip </col> <col> Inet </col> <col> <para/> </col>
1776 This is the IP-address (V4) of the host that was targetted.
1780 <col> mac_address </col> <col> Macaddr </col> <col> <para/> </col>
1782 This is the MAC-address logged
1786 <col> packetlength </col> <col> Int </col> <col> <para/> </col>
1788 The length of the packet
1792 <col> protocol </col> <col> Text </col> <col> <para/> </col>
1794 The protocol used for transmission(mostly TCP/UDP/ICMP).
1798 <col> source_port </col> <col> Int </col> <col> <para/> </col>
1800 The portnumber used at origin.
1804 <col> destination_port </col> <col> Int </col> <col> <para/> </col>
1806 The portnumber for the target
1810 <col> messageid </col> <col> Text </col> <col> <para/> </col>
1812 Messageid for e-mails
1816 <col> system_username </col> <col> Text </col> <col> <para/> </col>
1818 Username on the object
1822 <col> networkdevice </col> <col> Text </col> <col> <para/> </col>
1824 When this is about network-traffic the device that worked the data
1831 <heading>The indexes.</heading>
1834 The table is indexed on the following fields:
1839 <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
1842 <col> loa_logid </col> <col> logid </col> <col> Primary key </col>
1845 <col> loa_source_ip </col> <col> source_ip </col> <col> <para/> </col>
1848 <col> loa_destination_ip </col> <col> destination_ip </col> <col> <para/> </col>
1851 <col> loa_mac_address </col> <col> mac_address </col> <col> <para/> </col>
1854 <col> loa_packetlength </col> <col> packetlength </col> <col> <para/> </col>
1857 <col> loa_protocol </col> <col> protocol </col> <col> <para/> </col>
1860 <col> loa_source_port </col> <col> source_port </col> <col> <para/> </col>
1863 <col> loa_destination_port </col> <col> destination_port </col> <col> <para/> </col>
1866 <col> loa_messageid </col> <col> messageid </col> <col> <para/> </col>
1869 <col> loa_system_username </col> <col> system_username </col> <col> <para/> </col>
1872 <col> networkdevice </col> <col> networkdevice </col> <col> <para/> </col>
1878 <heading>The relationships.</heading>
1881 There is only one relation with this table.
1884 <table cpos='llp{6cm}'>
1886 <col> Fieldname </col> <col> Remote Table </col>
1892 <col> Logid </col> <col> Log </col>
1894 This will make a link to the table <emph>log</emph>. The relationship is a one-on-one relationship.
1901 <heading>Sample data combined from log and log_adv.</heading>
1904 The sample data derrived here has been gathered in logs.
1905 Since the tablestructure is very long the representation is somewhat different:
1908 <table cpos='lp{8cm}'>
1910 <col> Fieldname </col> <col> Value. </col>
1913 <col> Logid </col> <col> 1 </col>
1916 <col> Objectid </col> <col> 1 </col>
1919 <col> Original_filename </col> <col> 7f0100.messages.20020714231801 </col>
1922 <col> Rawdata </col>
1924 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
1928 <col> Type_of_logid </col> <col> 1 </col>
1931 <col> Timestamp </col> <col> 2002-07-14 23:29:01 </col>
1934 <col> Object_timestamp </col> <col> 2002-07-14 18:16:42 </col>
1937 <col> Source_ip </col> <col> 193.79.237.146 </col>
1940 <col> Destination_ip </col> <col> 212.204.216.11 </col>
1943 <col> Mac_address </col> <col> 00:60:67:36:61:a5:00:90:69:60:c0:5d:08:00 </col>
1946 <col> Packetlength </col> <col> 40 </col>
1949 <col> Protocol </col> <col> TCP </col>
1952 <col> Source_port </col> <col> 36375 </col>
1955 <col> Destination_port </col> <col> 113 </col>
1958 <col> Messageid </col> <col> <para/> </col>
1961 <col> Systemuser </col> <col> <para/> </col>
1964 <col> Networkdevice </col> <col> eth0 </col>
1971 <heading>log_notification. </heading>
1974 In the log_notification the logbook entries that have caused an alert to occur are saved.
1975 When this table is used something has been detected.
1976 As this is clearly an intermediate table we anticipate to design checks where
1977 multiple entries in a log-file can lead to one notification.
1978 For forensics indexing will be focussed on retrieval speed.
1982 <heading>The fields.</heading>
1985 The fields are listed below:
1988 <table cpos='lllp{6cm}'>
1990 <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
1996 <col> notificationid </col> <col> Bigint </col> <col> 8 </col>
1998 Reference to the notification
2002 <col> logid </col> <col> Bigint </col> <col> 8 </col>
2004 Reference to the logbook
2011 <heading>The indexes.</heading>
2014 The table is indexed on the following fields:
2018 <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
2021 <col> lon_pk </col> <col>notificationid </col> <col>Primary key </col>
2024 <col> <para/> </col> <col>logid </col> <col>Primary key (second field) </col>
2027 <col>lon_notificationid </col> <col> notificationid </col> <col> <para/> </col>
2030 <col> lon_logid </col> <col>logid </col> <col> <para/> </col>
2036 <heading>The relationships.</heading>
2039 Relationships with other tables:
2042 <table cpos='llp{8cm}'>
2044 <col> Fieldname </col> <col> Remote Table </col>
2050 <col> Logid </col> <col> Log </col>
2052 Indicates the log-entry that was on of the triggers that led to the notification.
2056 <col> NotificationID </col> <col> Notification </col>
2058 Indicates the notification where the entry in the log was a trigger.
2063 <para>In the model this look like this:</para>
2065 <picture src="erd-lognotif.png" eps="erd-lognotif"/>
2070 <heading>Sample data.</heading>
2077 <col> LogID </col> <col> NotificationID </col>
2080 <col> 4 </col> <col> 1 </col>
2083 <col> 5 </col> <col> 1 </col>
2086 <col> 8 </col> <col> 1 </col>
2089 <col> 9 </col> <col> 1 </col>
2092 <col> 5 </col> <col> 2 </col>
2095 <col> 6 </col> <col> 2 </col>
2098 <col> 11 </col> <col> 2 </col>
2105 <heading>notification. </heading>
2108 In this table all detected issues per object will be written.
2109 Issues are entered based on immediate detection, periodical detection or manually.
2110 Since this table is mostly used to work from in the interface being in control is crucial.
2111 When systems function properly more retrieval than data entry will take place.
2112 Also data retrieval will be done in all sorts of ways. Indexing must be huge to facilitate that.
2116 <heading>The fields.</heading>
2119 The fields of the <emph>notification</emph> table are:
2122 <table cpos='lllp{6cm}'>
2124 <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
2130 <col> notificationid </col> <col> Bigserial </col> <col> 8 </col>
2136 <col> objectid </col> <col> Bigint </col> <col> 8 </col>
2138 Reference to the <emph>object</emph>
2142 <col> type_of_notification_id </col> <col> Bigint </col> <col> 8 </col>
2144 Reference to the <emph>type_of_notification</emph> indicating what
2145 type of notification we have here and what basic rules apply.
2149 <col> timestamp </col> <col> Timestamp </col> <col> <para/> </col>
2151 Timestamp that this notification was created.
2155 <col> statuscode </col> <col> Varchar </col> <col> 3 </col>
2157 The status the actual status a notification has.
2161 <col> priority </col> <col> Int </col> <col> 4 </col>
2163 The priority that is given to this issue<footnote>Basically there will be
2164 five priority levels. The rule is that the lower the number gets the more
2165 urgent the issue is. At the moment the priority level is set by the system
2166 pre-defined actions will take place.</footnote>.
2170 <col> escalation_count_timestamp </col> <col> Timestamp </col> <col> <para/> </col>
2172 Timestamp since the last escalation took place<footnote>The system offers
2173 the possibility to automatically escalate issue if no action has been
2174 taken within a certain amount of time.
2175 Based on the status and the type of notification escalation can take place.</footnote>.
2179 <col> repeat_notification_timestamp </col> <col> Timestamp </col> <col> <para/> </col>
2181 Timestamp at which moment in time a repeat notification should occur<footnote>After
2182 this time has passed a notification is being resent.
2183 After a resent automatically a new time is set for another resent.
2184 If any actions takes place (except automated entries of course)
2185 the time is emptied so that an administrator will no longer be bothered by the system.</footnote>.
2189 <col> securitylevel_view </col> <col> Int </col> <col> 4 </col>
2191 The securitylevel that is needed to view this entry.
2195 <col> securitylevel_add </col> <col> Int </col> <col> 4 </col>
2197 Securitylevel to add information to this item or to undertake action
2201 <col> securitylevel_close </col> <col> Int </col> <col> 4 </col>
2203 The securitylevel needed to be able to close this notification.
2210 <heading>The indexes.</heading>
2217 <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
2220 <col> not_pk (notification_notificationid_key) </col> <col> notificationid </col>
2221 <col> Primary key </col>
2224 <col> not_objectid </col> <col> objectid </col> <col> <para/> </col>
2227 <col> not_type_of_notificationid </col> <col> type_of_notificationid </col>
2228 <col> <para/> </col>
2231 <col> not_timestamp </col> <col> timestamp </col> <col> <para/> </col>
2234 <col> not_statuscode </col> <col> statuscode </col> <col> <para/> </col>
2237 <col> not_priority </col> <col> priority </col> <col> <para/> </col>
2240 <col> not_escalation_count_timestamp </col> <col> escalation_count_timestamp </col>
2241 <col> <para/> </col>
2245 <para>not_repeat_notification_timestamp</para>
2246 <para>(not_repeat_notification_timesta)</para>
2248 <col> repeat_notification_timestamp </col> <col> <para/> </col>
2254 <heading>The relationships.</heading>
2257 Relationships with other tables:
2260 <table cpos='llp{8cm}'>
2262 <col> Fieldname </col> <col> Remote Table </col> <col> Remarks </col>
2265 <col> Logid </col> <col> Log </col>
2267 Indicates the log-entry that was on of the triggers that led to the notification.
2271 <col> NotificationID </col> <col> Notification </col>
2273 Indicates the notification where the entry in the log was a trigger.
2278 <para>In the model this look like this:</para>
2280 <picture src="erd-notif.png" eps="erd-notif"/>
2285 <heading>Sample data.</heading>
2288 The following data is an example of a notification placed in the database.
2292 <col> Fieldname </col> <col> Data </col>
2295 <col> Notificationid </col> <col> 1 </col>
2298 <col> ObjectID </col> <col> 1 </col>
2301 <col> Type_of_notification_id </col> <col> 1 </col>
2304 <col> Timestamp </col> <col> 17-07-2002 16:07 </col>
2307 <col> Statuscode </col> <col> NEW </col>
2310 <col> Priority </col> <col> 3 </col>
2313 <col> Escalation_count_timestamp </col> <col> 17-07-2002 16:07 </col>
2316 <col> Repeat_notification_timestamp </col> <col> 17-07-2002 20:48PM </col>
2319 <col> Securitylevel_view </col> <col> 3 </col>
2322 <col> Securitylevel_add </col> <col> 3 </col>
2325 <col> Securitylevel_close </col> <col> 4 </col>
2332 <heading>object</heading>
2335 The <emph>object</emph> table contains general information on the objects being monitored.
2336 The table object will more be used for retrieval, since adding objects will be an
2337 occasional process. Anything that for some reason can be indexed ought to be indexed.
2341 <heading>The fields.</heading>
2346 <table cpos='lllp{6cm}'>
2348 <col> Fieldname </col> <col> Fieldtype </col> <col> Size </col>
2354 <col> objectid </col> <col> Bigserial </col> <col> 8 </col>
2356 Autonumbering code for the computer or device.
2360 <col> objectname </col> <col> Text </col> <col> <para/> </col>
2362 The hostname of the object
2366 <col> objectcode </col> <col> Text </col> <col> <para/> </col>
2368 Unique identifier (if existent) on the system<footnote>In Linux this will
2369 typically be the <emph>hostid</emph>.</footnote>.
2373 <col> scp_enabled </col> <col> Boolean </col> <col> <para/> </col>
2375 Can communication occur through scp (T = Yes / F = No)
2379 <col> scp_inet </col> <col> Inet </col> <col> <para/> </col>
2381 IP Address of the object for scp-data transfer.
2385 <col> mail_enabled </col> <col> Boolean </col> <col> <para/> </col>
2387 Can communication occur through e-mail (T = Yes/F = No).
2391 <col> mail_from </col> <col> Text </col> <col> <para/> </col>
2393 The e-mail address where e-mail will come from.
2397 <col> sms_enabled </col> <col> Boolean </col> <col> <para/> </col>
2399 Can communication occur through SMS (T = Yes/F = No).
2403 <col> sms_number </col> <col> Text </col> <col> <para/> </col>
2405 The SMS-number to send a notification to.
2409 <col> fax_enabled </col> <col> Boolean </col> <col> <para/> </col>
2411 Can communication occur through Fax (T = Yes/F = No).
2415 <col> fax_number </col> <col> Text </col> <col> <para/> </col>
2417 The fax-number to send a notification to.
2431 Description of the object. What type of system is it
2435 <col> object_owner </col> <col> Text </col> <col> <para/> </col>
2441 <col> physical_location </col> <col> Text </col> <col> <para/> </col>
2443 Physical address and when applicable entry-details needed to get to the object.
2447 <col> timezone </col> <col> Text </col> <col> <para/> </col>
2449 The timezone where this object is located<footnote>For objects that
2450 move around like PDA's and laptops the timezone can be the place where
2451 a person is stationed or better GMT.</footnote>.
2455 <col> remark </col> <col> Text </col> <col> <para/> </col>
2457 Additional remarks that shouldn't be in the previous TEXT fields.
2464 <heading>The indexes.</heading>
2467 The <emph>object</emph> table is indexed on the following fields:
2472 <col> Indexname </col> <col> Field </col> <col> Characteristics </col>
2475 <col> obj_pk (object_objectid_key) </col> <col> objectid </col> <col> Primary key </col>
2478 <col> obj_objectname </col> <col> objectname </col> <col> Unique </col>
2481 <col> obj_objectcode </col> <col> objectcode </col> <col> Unique </col>
2484 <col> obj_mail_from </col> <col> mail_from </col> <col> <para/> </col>
2490 <heading>The relationships.</heading>
2493 The relationships with other tables are listed below:
2496 <table cpos='llp{8cm}'>
2498 <col> Fieldname </col> <col> Remote Table </col> <col> Remarks </col>
2501 <col> ObjectID </col> <col> Log (adv) </col>
2502 <col> Reference to processed log-entries </col>
2505 <col> <para/> </col> <col> Notification </col>
2507 Reference to the table <emph>notification</emph> that contains the notifications
2508 that have been created.
2512 <col> <para/> </col> <col> Object_issue </col>
2514 Reference to the <emph>object_issue</emph> that indicates how notifications have to be handled .
2518 <col> <para/> </col> <col> Object_priority </col>
2520 Reference to the <emph>object_priority</emph> table that indicates how a
2521 certain level of priority has to be dealt with.
2525 <col> <para/> </col> <col> Object_system_user </col>
2527 Reference to a list of system user to discover abnormalities in user behaviour.
2531 <col> <para/> </col> <col> Object_user </col>
2532 <col> Reference to the <emph>object_user</emph> </col>
2535 <col> <para/> </col> <col> Unprocessed_log </col>
2537 Reference to the entries that have not been processed at all.
2542 <para>In the relationshipmodel this looks like this:</para>
2544 <picture src="erd-object.png" eps="erd-object"/>
2549 <heading>Sample data.</heading>
2551 There is no preset data and therefor it's an example has been created.
2552 The table has quite some fields so the example has the fieldname in the
2553 left column and the data in the right column.
2555 <table cpos='lp{6cm}'>
2558 <para>Fieldname</para>
2561 <para>Sample data</para>
2566 <para>Objectid</para>
2574 <para>Objectname</para>
2577 <para>webber.dewinter.com</para>
2582 <para>Objectcode</para>
2590 <para>Scp_enabled</para>
2598 <para>Scp_inet</para>
2601 <para>192.168.221.212</para>
2606 <para>Mail_enabled</para>
2614 <para>Mail_from</para>
2618 <reference href="mailto:gnucomo@maintenance.dewinter.com">gnucomo@maintenance.dewinter.com</reference>
2624 <para>Sms_enabled</para>
2632 <para>Sms_number</para>
2635 <para>06-XXXXXXXX</para>
2640 <para>Fax_enabled</para>
2648 <para>Fax_number</para>
2651 <para>0318-XXXXXX</para>
2656 <para>Object_description</para>
2659 <para>19 inch 4 units, AMD-300 with two 27Gb disks (RAID-0), 256Mb memory</para>
2664 <para>Object_owner</para>
2667 <para>Brenno de Winter</para>
2668 <para>De Winter Information Solutions</para>
2669 <para>Your street here 32</para>
2670 <para>9999 XX YOUR CITY</para>
2671 <para>THE NETHERLANDS</para>
2672 <para>Phone: +31 XXX XXX XXX</para>
2677 <para>Physical_location</para>
2680 <para>Internet Provider XYZ</para>
2681 <para>Your street here 38</para>
2682 <para>9999 XX YOUR CITY</para>
2683 <para>THE NETHERLANDS</para>
2684 <para>Phone: +31 XXX XXX XXX</para>
2686 <para>Dataroom. System: Q7845</para>
2694 <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>
2695 <para>* Arjen Baart</para>
2696 <para>* Peter Busser</para>
2697 <para>* Brenno de Winter</para>
2706 <heading>object_issue. </heading>
2708 This table will store the policy on a certain issue like the priority being
2709 recognized and special actions to take.
2710 Since policies are utilized by the systems continuously all other process will rely on this index,
2711 while users will change the values occasionally.
2715 <heading>The fields.</heading>
2718 The fields of <emph>object_issue</emph>:
2721 <table cpos='lllp{6cm}'>
2724 <para>Fieldname</para>
2727 <para>Fieldtype</para>
2733 <para>Remarks</para>
2738 <para>objectid</para>
2747 <para>Reference to the object</para>
2752 <para>type_of_notificationid</para>
2761 <para>Reference to the <emph>type_of_notification</emph> indicating
2762 what type of notification we have here and what basic rules apply.</para>
2767 <para>default_priority</para>
2776 <para>The priority that will be set automatically when this type of
2777 notification is entered into the system.</para>
2782 <para>escalation</para>
2785 <para>Boolean</para>
2791 <para>Will the system perform automatic escalation (T = Yes / F = No)</para>
2796 <para>escalation_time</para>
2805 <para>The time after which a higher priority is awarded to the notification.</para>
2810 <para>max_priority</para>
2819 <para>The maximum priority given to this type of notification.</para>
2824 <para>adjusted_setting</para>
2833 <para>Some checks can have a special settings (for instance alert
2834 after 5 failed login attempts instead of 3).</para>
2841 <heading>The indexes.</heading>
2844 These are the indices:
2849 <para>Indexname</para>
2855 <para>Characteristics</para>
2863 <para>objectid</para>
2866 <para>Primary key</para>
2874 <para>type_of_notification_id</para>
2877 <para>Primary key</para>
2882 <para>obi_objectid</para>
2885 <para>Objectid</para>
2893 <para>obi_type_of_notificationid</para>
2896 <para>type_of_notification_id</para>
2906 <heading>The relationships.</heading>
2909 Relationships with other tables:
2912 <table cpos='llp{6cm}'>
2915 <para>Fieldname</para>
2918 <para>Remote Table</para>
2921 <para>Remarks</para>
2926 <para>ObjectID</para>
2932 <para>Reference to the <emph>object</emph> (which object does this apply to).</para>
2937 <para>Type_of_issueid</para>
2940 <para>Type_of_issue</para>
2943 <para>Reference to the type of issue.</para>
2948 <para>In the model this look like this:</para>
2950 <picture src="erd-objissue.png" eps="erd-objissue"/>
2955 <heading>Sample data.</heading>
2960 <table cpos='lllllll'>
2963 <para>Objectid</para>
2966 <para>Type_of_notification_id</para>
2969 <para>Default Priority</para>
2972 <para>Escalation</para>
2975 <para>Escalation_time</para>
2978 <para>Max_priority</para>
2981 <para>Adjusted_setting</para>
2998 <para>00:15:00</para>
3021 <para>00:30:00</para>
3067 <para>00:45:00</para>
3104 <heading>object_priority.</heading>
3107 This table stores per object how a certain level of priority is being dealt with.
3108 What policies do apply. This table is mostly used for retrieval, so firm indexing is logic.
3112 <heading>The fields.</heading>
3115 The fields are listed below:
3117 <table cpos='lllp{6cm}'>
3120 <para>Fieldname</para>
3123 <para>Fieldtype</para>
3129 <para>Remarks</para>
3134 <para>objectid</para>
3143 <para>Reference to the object</para>
3148 <para>priorityid</para>
3157 <para>Priority.</para>
3162 <para>send_mail</para>
3165 <para>Boolean</para>
3171 <para>Send an e-mail if this priority is set? Yes = T / No = F</para>
3176 <para>send_sms</para>
3179 <para>Boolean</para>
3185 <para>Send a sms message if this priority is set? Yes = T / No = F</para>
3190 <para>send_fax</para>
3193 <para>Boolean</para>
3199 <para>Send a fax if this priority is set? Yes = T / No = F</para>
3204 <para>repeat_notification</para>
3207 <para>Boolean</para>
3213 <para>Repeat this notification if no action occurs since the notification. Yes = T / No = F</para>
3218 <para>interval_for_repeat</para>
3227 <para>Time interval that is set to wait for a response.</para>
3234 <heading>The indexes.</heading>
3237 Indices of the <emph>object_priority</emph> table:
3243 <para>Indexname</para>
3249 <para>Characteristics</para>
3257 <para>objectid</para>
3260 <para>Primary key</para>
3268 <para>priorityid</para>
3271 <para>Primary key</para>
3276 <para>obi_objectid</para>
3279 <para>Objectid</para>
3287 <para>obi_type_of_notification_id</para>
3290 <para>type_of_notification_id</para>
3300 <heading>The relationships.</heading>
3303 Relationships with other tables:
3306 <table cpos='llp{6cm}'>
3309 <para>Fieldname</para>
3312 <para>Remote Table</para>
3315 <para>Remarks</para>
3320 <para>ObjectID</para>
3326 <para>Reference to the object (which object does this apply to).</para>
3331 <para>Priorityid</para>
3334 <para>Priority</para>
3337 <para>Reference to the priority.</para>
3343 In the model this look like this:
3346 <picture src="erd-objprior.png" eps="erd-objprior"/>
3352 <heading>object_service</heading>
3355 The object service table indicates which services can be expected on the system.
3356 If input fails to show up a notification can be generated.
3360 <heading>The fields.</heading>
3363 The fields are listed below:
3366 <table cpos='lllp{6cm}'>
3369 <para>Fieldname</para>
3372 <para>Fieldtype</para>
3378 <para>Remarks</para>
3383 <para>objectid</para>
3392 <para>Reference to the object</para>
3397 <para>servicecode</para>
3406 <para>Reference to service.</para>
3411 <para>expected_interval</para>
3420 <para>The expected interval in minutes between two log entries.
3421 If this gives a time-out a notification is generated<footnote>To avoid many
3422 false positives it may be wise to give the system always 1 or 2 minutes extra time.
3423 If for some reason a connection is slow or a mail-daemon restarted
3424 the effect would generate tuns of notifications.</footnote>.
3425 The following values can be considered the most common:</para>
3426 <para>* 60 hourly entries</para>
3427 <para>* 120 two hourly entries</para>
3428 <para>* 240 four hourly entries</para>
3429 <para>* 480 eight hourly entries</para>
3430 <para>* 920 twelve hourly entries</para>
3431 <para>* 1840 daily entries</para>
3432 <para>* 12880 weekly entries</para>
3437 <para>last_entry</para>
3440 <para>Timestamp</para>
3446 <para>The timestamp of the last entry (for detecting exceeded interval).
3447 This field could be derived from the log-table as well, but the
3448 redundance gives a performance on detection that is useful, since a
3449 check should run every minute.</para>
3454 <para>default_priority</para>
3463 <para>Priority given if this service didn't occur.</para>
3468 <para>maximum_priority</para>
3477 <para>Maximum priority (in case of escalation)</para>
3482 <para>accepted</para>
3485 <para>Boolean</para>
3491 <para>If a service hasn't been set, the application user should
3492 indicate that this is valid (logs shouldn't just appear).
3493 New entries will be added automatically but still have to be verified.</para>
3500 <heading>The indexes.</heading>
3503 The table is indexed on the following fields:
3508 <para>Indexname</para>
3514 <para>Characteristics</para>
3522 <para>objectid</para>
3525 <para>Primary key</para>
3533 <para>servicecode</para>
3536 <para>Primary key</para>
3541 <para>obs_objectid</para>
3544 <para>objectid</para>
3552 <para>obs_servicecode</para>
3555 <para>servicecode</para>
3563 <para>obs_accepted</para>
3566 <para>accepted</para>
3576 <heading>The relationships.</heading>
3579 Relationships with other tables:
3582 <table cpos='llp{8cm}'>
3585 <para>Fieldname</para>
3588 <para>Remote Table</para>
3591 <para>Remarks</para>
3596 <para>objectID</para>
3602 <para>Reference to the object (which object does this apply to).</para>
3607 <para>servicecode</para>
3610 <para>Service</para>
3613 <para>Reference to the service table. </para>
3618 <para>In the model this look like this:</para>
3620 <picture src="erd-objservice.png" eps="erd-objservice"/>
3626 <heading>object_system_user</heading>
3629 This table will derive a list of users that can be identified based
3630 on the log-files in the system. This table is filled during data entry.
3631 But the filling of the table is dependent on the fact if the user has been entered before.
3632 So during the processing the read will be done more than the data entry and
3633 that makes heavy indexing logic.
3636 <heading>The fields.</heading>
3639 The fields of <emph>object_system_user</emph> are listed below:
3642 <table cpos='lllp{6cm}'>
3645 <para>Fieldname</para>
3648 <para>Fieldtype</para>
3654 <para>Remarks</para>
3659 <para>objectid</para>
3668 <para>Reference to the object</para>
3673 <para>system_username</para>
3682 <para>Username on the object/system.</para>
3687 <para>can_login</para>
3690 <para>Boolean</para>
3696 <para>Can this user login (T = Yes / F = No)?</para>
3701 <para>can_be_root</para>
3704 <para>Boolean</para>
3710 <para>Can this user become root (T = Yes / F = No)?</para>
3717 <heading>The indexes.</heading>
3720 The table is indexed on the following fields:
3725 <para>Indexname</para>
3731 <para>Characteristics</para>
3739 <para>objectid</para>
3742 <para>Primary key</para>
3750 <para>system_username</para>
3753 <para>Primary key</para>
3758 <para>osu_objectid</para>
3761 <para>objectid</para>
3769 <para>osu_system_username</para>
3772 <para>system_username</para>
3782 <heading>The relationships.</heading>
3785 Relationships with other tables:
3787 <table cpos='llp{8cm}'>
3790 <para>Fieldname</para>
3793 <para>Remote Table</para>
3796 <para>Remarks</para>
3801 <para>ObjectID</para>
3807 <para>Reference to the object (which object does this apply to).</para>
3812 <para>System_username</para>
3818 <para>Log entries can refer to the system username.</para>
3822 <para>In the model this look like this:</para>
3826 <picture src="erd-objsysusr.png" eps="erd-objsysusr"/>
3832 <heading>object_user</heading>
3835 This table will enable users to get access to the information belonging to an object.
3836 Also this table is mainly used for data retrieval and will rely on the indexes.
3839 <heading>The fields.</heading>
3842 The fields of <emph>object_user</emph> are listed below:
3845 <table cpos='lllp{6cm}'>
3848 <para>Fieldname</para>
3851 <para>Fieldtype</para>
3857 <para>Remarks</para>
3862 <para>Objectid</para>
3871 <para>Reference to the <emph>object</emph></para>
3876 <para>Username</para>
3885 <para>Username in gnucomo. A reference to <emph>user</emph>.</para>
3890 <para>Security_level</para>
3899 <para>The security-level granted to this user.</para>
3906 <heading>The indexes.</heading>
3908 The indices of the <emph>object_user</emph> table:
3913 <para>Indexname</para>
3919 <para>Characteristics</para>
3927 <para>objectid</para>
3930 <para>Primary key</para>
3938 <para>username</para>
3941 <para>Primary key</para>
3946 <para>ous_objectid</para>
3949 <para>objectid</para>
3957 <para>ous_username</para>
3960 <para>username</para>
3968 <para>ous_security_level</para>
3971 <para>ous_security_level</para>
3981 <heading>The relationships.</heading>
3984 Relationshiips with other tables:
3987 <table cpos='llp{8cm}'>
3990 <para>Fieldname</para>
3993 <para>Remote Table</para>
3996 <para>Remarks</para>
4001 <para>objectID</para>
4007 <para>Reference to the object (which object does this apply to).</para>
4012 <para>username</para>
4018 <para>Reference to the user.</para>
4023 <para>In the model this look like this:</para>
4024 <picture src="erd-objusr.png" eps="erd-objusr"/>
4030 <heading>priority</heading>
4033 The priority table contains information on the levels that are recognized by the system.
4034 Mainly data retrieval so depending on indexing.
4035 It needs to be said that most likely only a couple of states will exist<footnote>By default
4036 we will use five states, but many states can be given to enable all
4037 types of differentiation.</footnote>.
4041 <heading>The fields.</heading>
4044 The fields of the <emph>priority</emph> table are listed below:
4047 <table cpos='lllp{6cm}'>
4050 <para>Fieldname</para>
4053 <para>Fieldtype</para>
4059 <para>Remarks</para>
4064 <para>priority</para>
4073 <para>Priority</para>
4078 <para>send_mail</para>
4081 <para>Boolean</para>
4087 <para>Send an e-mail if this priority is set? Yes = T / No = F</para>
4092 <para>send_sms</para>
4095 <para>Boolean</para>
4101 <para>Send a sms message if this priority is set? Yes = T / No = F</para>
4106 <para>send_fax</para>
4109 <para>Boolean</para>
4115 <para>Send a fax if this priority is set? Yes = T / No = F</para>
4120 <para>repeat_notification</para>
4123 <para>Boolean</para>
4129 <para>Repeat this notification if no action occurs since the notification. Yes = T / No = F</para>
4134 <para>interval_for_repeat</para>
4143 <para>Time interval that is set to wait for a response.</para>
4150 <heading>The indexes.</heading>
4153 The table is indexed on the following fields:
4159 <para>Indexname</para>
4165 <para>Characteristics</para>
4173 <para>priority</para>
4176 <para>Primary key</para>
4183 <heading>The relationships.</heading>
4186 Relationships with other tables:
4188 <table cpos='llp{8cm}'>
4191 <para>Fieldname</para>
4194 <para>Remote Table</para>
4197 <para>Remarks</para>
4202 <para>priority</para>
4205 <para>object_priority</para>
4208 <para>Reference to the object (which object does this apply to). </para>
4213 <para>In the model this look like this:</para>
4215 <picture src="erd-prior.png" eps="erd-prior"/>
4221 <heading>service</heading>
4224 The table <emph>service</emph> indicates the service that can be handled by the system.
4225 Out of the servicelist the administrator can indicate what services to expect.
4228 <heading>The fields.</heading>
4231 The fields are listed below:
4233 <table cpos='lllp{6cm}'>
4236 <para>Fieldname</para>
4239 <para>Fieldtype</para>
4245 <para>Remarks</para>
4250 <para>servicecode</para>
4259 <para>The code that is written for the service</para>
4264 <para>servicename</para>
4273 <para>The expanded name for the service</para>
4278 <para>default_priority</para>
4287 <para>The advised priority if these log-entries don't
4288 come in<footnote>Advised priorities can be changed in the object_service
4289 table per object. </footnote>.</para>
4294 <para>max_priority</para>
4303 <para>The maximum priority advised for this
4304 service<footnote>Advised priorities can be changed in the
4305 object_service table per object.</footnote>.</para>
4312 <heading>The indexes.</heading>
4315 The table is indexed on the following fields:
4320 <para>Indexname</para>
4326 <para>Characteristics</para>
4334 <para>servicecode</para>
4337 <para>Primary key</para>
4342 <para>ser_servicename</para>
4345 <para>servicename</para>
4355 <heading>The relationships.</heading>
4357 Relationships with other tables:
4359 <table cpos='llp{8cm}'>
4362 <para>Fieldname</para>
4365 <para>Remote Table</para>
4368 <para>Remarks</para>
4373 <para>servicecode</para>
4379 <para>What log entries have been tied to this type of service.</para>
4387 <para>object_service</para>
4390 <para>Settings for this service per object.</para>
4398 <para>unprocessed_log</para>
4401 <para>What unprocessed log entries have been tied to this type of service.</para>
4406 <para>In the model this look like this:</para>
4408 <picture src="erd-service.png" eps="erd-service"/>
4414 <heading>status.</heading>
4417 The table <emph>status</emph> contains the possible states that a notification can have.
4418 As with the table <emph>priority</emph> these statuses are limited in number by
4419 default but can be expanded. Also here retrieval prevails above data entry and
4420 therefor indexing is important.
4424 <heading>The fields.</heading>
4427 The fields of the <emph>status</emph> table are listed below:
4430 <table cpos='lllp{6cm}'>
4433 <para>Fieldname</para>
4436 <para>Fieldtype</para>
4442 <para>Remarks</para>
4447 <para>statuscode</para>
4450 <para>Varchar</para>
4456 <para>The code for the status</para>
4461 <para>statusname</para>
4470 <para>What is the correct name for the status</para>
4475 <para>open_notification</para>
4478 <para>Boolean</para>
4484 <para>Is the notification still open when this status is set? Yes = T / No = F</para>
4489 <para>description</para>
4498 <para>Explanation of the code</para>
4505 <heading>The indexes.</heading>
4507 The table is indexed on the following fields:
4513 <para>Indexname</para>
4519 <para>Characteristics</para>
4527 <para>statuscode</para>
4530 <para>Primary key</para>
4535 <para>sta_statusname</para>
4538 <para>statusname</para>
4546 <para>sta_open_notification</para>
4549 <para>open_notification</para>
4559 <heading>The relationships.</heading>
4561 Relationships with other tables
4567 <para>Fieldname</para>
4570 <para>Remote Table</para>
4573 <para>Remarks</para>
4588 <para>In the model this look like this:</para>
4590 <picture src="erd-status.png" eps="erd-status"/>
4595 <heading>Default values.</heading>
4596 <para>The status values are default for the system and for that reason are predefined.</para>
4597 <table cpos='p{2cm}lp{1cm}p{6cm}'>
4600 <para>Statuscode</para>
4603 <para>Statusname</para>
4606 <para>Open Notification</para>
4617 <para>New entry</para>
4623 <para>Just detected nothing has been done yet.</para>
4637 <para>The notification has been displayed, but nothing has been done yet.</para>
4645 <para>Pending</para>
4651 <para>The notification is currently being worked on.</para>
4659 <para>Waiting for verification</para>
4665 <para>The notification has been worked on.
4666 After it has been verified the notification can be closed.</para>
4680 <para>The notification has been closed</para>
4688 <para>Rejected</para>
4694 <para>This was a false positive and has been rejected.</para>
4702 <para>Investigate</para>
4708 <para>The notification is under investigation and awaiting additional details.</para>
4716 <heading>type_of_issue.</heading>
4719 This table will contain a list of all available issues that can be detected.
4720 All issues have a suggested priority setting.
4721 This is typically data retrieval and good indexing is needed.</para>
4724 <heading>The fields.</heading>
4727 Fields of <emph>type_of_issue</emph> are:
4730 <table cpos='lllp{6cm}'>
4733 <para>Fieldname</para>
4736 <para>Fieldtype</para>
4742 <para>Remarks</para>
4747 <para>type_of_issueid</para>
4750 <para>Bigserial</para>
4756 <para>The sequential code for the issue.</para>
4770 <para>Name for the issue</para>
4775 <para>suggested_priority</para>
4784 <para>The advised priority setting.</para>
4789 <para>description</para>
4798 <para>Description of the method and how this can be set.</para>
4806 <para>Boolean</para>
4812 <para>Is this check currently being used in the system.</para>
4819 <heading>The indexes.</heading>
4821 The table is indexed on the following fields:
4827 <para>Indexname</para>
4833 <para>Characteristics</para>
4839 <para>(type_of_issue_type_of_issue_key)</para>
4842 <para>type_of_issueid</para>
4845 <para>Primary key</para>
4850 <para>toi_name</para>
4861 <para>toi_active</para>
4874 <heading>The relationships.</heading>
4878 <para>Fieldname</para>
4881 <para>Remote Table</para>
4884 <para>Remarks</para>
4889 <para>type_of_issueid</para>
4892 <para>object_issue</para>
4900 <para>In the model this look like this:</para>
4902 <picture src="erd-toi.png" eps="erd-toi"/>
4907 <heading>Default values.</heading>
4910 All checks are entered as code into the system.
4911 This table only works for the application only.
4912 The user can set specifics in the application only.
4914 <table cpos='lllll'>
4917 <para>Type_of_issueid</para>
4923 <para>Suggested_priority</para>
4926 <para>Description</para>
4937 <para>Manual entry</para>
4943 <para>A manual entry of a notification.</para>
4954 <heading>unprocessed_log</heading>
4957 The <emph>user</emph> table contains the users that can login the monitoring application.
4958 It will also store if the users maintains the system.
4959 Mainly used for retrieval so properly indexed.
4963 <heading>The fields.</heading>
4966 The fields are listed below:
4969 <table cpos='lllp{6cm}'>
4972 <para>Fieldname</para>
4975 <para>Fieldtype</para>
4981 <para>Remarks</para>
4986 <para>unprocessedid</para>
4989 <para>Bigserial</para>
4995 <para>Autonumber entry</para>
5000 <para>objectid</para>
5009 <para>Reference to the object</para>
5014 <para>servicecode</para>
5023 <para>The service that entered this data.</para>
5028 <para>logdata</para>
5037 <para>The data that comes from the file.</para>
5044 <heading>The indexes.</heading>
5046 The indices of the table:
5052 <para>Indexname</para>
5058 <para>Characteristics</para>
5064 <para>(unprocessed_l_unprocessedid_key)</para>
5067 <para>unprocessedid</para>
5070 <para>Primary key</para>
5077 <heading>The relationships.</heading>
5079 Relationships with other tables:
5082 <table cpos='llp{8cm}'>
5085 <para>Fieldname</para>
5088 <para>Remote Table</para>
5091 <para>Remarks</para>
5096 <para>objectid</para>
5102 <para>Reference to the object that is reporting the data</para>
5107 <para>servicecode</para>
5110 <para>service</para>
5113 <para>Reference to the servicecode that is mentioned in the filename.</para>
5117 <para>In the model this look like this:</para>
5119 <picture src="erd-unplog.png" eps="erd-unplog"/>
5124 <heading>Sample values.</heading>
5130 <heading>user_gnucomo</heading>
5133 The <emph>user</emph> table contains the users that can login the monitoring application.
5134 It will also store if the users maintains the system.
5135 Mainly used for retrieval so properly indexed.
5139 <heading>The fields.</heading>
5142 The fields are listed in the table below:
5145 <table cpos='lllp{6cm}'>
5148 <para>Fieldname</para>
5151 <para>Fieldtype</para>
5157 <para>Remarks</para>
5162 <para>username</para>
5171 <para>Name the user is known by</para>
5176 <para>password</para>
5185 <para>Password</para>
5190 <para>active_sessionid</para>
5199 <para>Sessionnumber currently used by user.
5200 If this is set to 0 a user is not present on the system.
5201 Only one session can be open at a time.</para>
5206 <para>account_active</para>
5209 <para>Boolean</para>
5215 <para>Is the account currently active?</para>
5220 <para>security_level</para>
5229 <para>Given securitylevel to this user</para>
5236 <heading>The indexes</heading>
5238 The table is indexed on the following fields:
5243 <para>Indexname</para>
5249 <para>Characteristics</para>
5257 <para>username</para>
5260 <para>Primary key</para>
5265 <para>usr_active_sessionid</para>
5268 <para>active_sessionid</para>
5278 <heading>The relationships.</heading>
5280 Relationships with other tables
5285 <para>Fieldname</para>
5288 <para>Remote Table</para>
5291 <para>Remarks</para>
5296 <para>ObjectID</para>
5302 <para>Link to the object</para>
5306 <para>In the model this look like this:</para>
5308 <picture src="erd-usr.png" eps="erd-usr"/>
5317 <heading>Warnings that can be detected.</heading>
5321 <heading>User Interface.</heading>
5323 <para>To be determined in the near future.</para>
5327 <heading>The installation process.</heading>
5330 Since the system must make maintenance and security easier to use,
5331 the burden of installation should as easy as possible.
5332 Where possible the installation script should take away as much work as possible.
5333 Where settings need to be done, this should be done through an interface.
5334 However at no point we take the user's right to understand and work with system.
5335 Configuration-files should be easy to understand and the choice must be there to do installation manually.
5336 For the time being, we will use the manual installation procedure outlined below:
5340 Since there is no binary package available for Gnucomo yet, you will need
5341 to compile and install Gnucomo from the source code.
5342 Before making the Gnucomo binaries, make sure you have the following
5345 <item>postgresql, postgresql-server, postgresql-develop</item>
5347 <item>libxml2, libxml2-develop</item>
5350 Make sure your PostgreSQL database server is up and running.
5351 If you also want to use the web interface, you will need Apache with PHP.
5352 The PHP module needs Postgresql and DOM-XML support.
5353 With all required packages installed, you should be able to go into
5354 the <emph>src</emph> directory and type <code>make</code> to create
5355 a binary <code>gcm_input</code>.
5359 To use gnucomo, you need to create a database and a configuration file.
5360 To make the database in your PostgreSQL server, log in as a DBA (DataBase
5361 Administrator, usually the user 'postgres') and create the database and a
5362 user who can use the database.
5372 If you also want to be able to use the test scripts, you will need to
5373 create the <code>gnucomo_test</code> database as well.
5374 The configuration file for Gnucomo is a rather simple XML file that
5375 states at least what database Gnucomo uses and the userid with which
5376 Gnucomo will log in to the database server.
5377 These parameters should be the same as the database and user you just
5378 created in your role of DBA.
5379 There is an example configuration file, <code>gnucomo.conf</code> in the
5380 <emph>src</emph> directory.
5381 You should copy this config file to one of the following places:
5383 <item><code>/etc/gnucomo.conf</code></item>
5384 <item><code>/usr/local/etc/gnucomo.conf</code></item>
5386 With the database and the configuration file in place, you should
5387 be able to run <code>gcm_input</code> to read log files and store
5388 log entries in the database.
5391 <heading>Supported platforms.</heading>
5393 <para>The following two Linux distributions have been selected to be actively supported:</para>
5396 <para>Debian GNU/Linux (.deb packages)</para>
5399 <para>RedHat Linux (.rpm packages)</para>
5402 <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>
5406 <heading>Installation on the server.</heading>
5408 <para>The following steps will be part of a script, that can automatically perform these steps:</para>
5412 <para>Create the user <emph>gnucomo</emph>.</para>
5415 <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>
5421 <heading>Installation on a UNIX-client.</heading>
5423 <para>The following steps will be part of a script, that can automatically perform these steps:</para>
5426 <para>Create the user <emph>gcm_client</emph>.</para>
5429 <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>
5432 <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>
5440 <heading>Dependency on other free software.</heading>
5442 <para>The following list is a set of applications that will be used on to make our application work:</para>
5443 <table cpos='lp{8cm}l'>
5446 <para>Application</para>
5449 <para>Needed for</para>
5452 <para>Client/Server</para>
5460 <para>The encryption of the information being transferred between the two systems.</para>
5469 <para>GNU/Linux</para>
5472 <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>
5483 <para>The application enabling the sending of messages.</para>
5492 <para>openssh</para>
5495 <para>If e-mail is not used this application will deliver the file-copy</para>
5504 <para>PostgreSQL</para>
5507 <para>The database where all the signals from client will be stored.</para>
5515 <heading>Related projects</heading>
5518 There are a number of projects that can help <strong>Gnucomo</strong> or perform
5523 <reference href='http://crm114.sourceforge.net/'>CRM114</reference> - The Controllable
5532 <heading>Settings on the server machine.</heading>
5535 <heading>Required.</heading>
5537 <para>The following settings are required to ensure that the functionality is as much as expected.</para>
5540 <heading>Timezone in GMT (UTC).</heading>
5542 <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>
5543 <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>
5548 <heading>Suggested.</heading>
5551 <heading>Use NTP.</heading>
5553 <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>
5560 <heading>Settings on the client machine.</heading>
5563 <heading>Required.</heading>
5567 <heading>Suggested.</heading>
5570 <heading>Use NTP.</heading>
5572 <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>
5579 <heading>Appendices.</heading>
5582 <heading>Appendix A. GNU Public License Version 2, June 1991.</heading>
5584 <para>Copyright (C) 1989, 1991 Free Software Foundation, Inc.</para>
5585 <para>59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</para>
5586 <para>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</para>
5589 <heading>Preamble</heading>
5590 <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>
5591 <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>
5592 <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>
5593 <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>
5594 <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>
5595 <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>
5596 <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>
5597 <para>The precise terms and conditions for copying, distribution and modification follow.</para>
5598 <para>GNU GENERAL PUBLIC LICENSE</para>
5602 <heading>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</heading>
5606 <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 "Program", below, refers to any such program or work, and a "work based on the Program" 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 "modification".) Each licensee is addressed as "you".</para>
5607 <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>
5610 <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>
5611 <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>
5614 <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>
5615 <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>
5616 <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>
5617 <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>
5618 <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>
5619 <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>
5620 <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>
5623 <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>
5624 <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>
5625 <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>
5626 <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>
5627 <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>
5628 <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>
5631 <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>
5634 <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>
5637 <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>
5638 <para>You are not responsible for enforcing compliance by third parties to this License.</para>
5641 <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>
5642 <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>
5643 <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>
5644 <para>This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.</para>
5647 <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>
5650 <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>
5651 <para>Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", 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>
5654 <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>
5659 <heading>NO WARRANTY</heading>
5662 <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 "AS IS" 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>
5665 <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>
5668 <para>END OF TERMS AND CONDITIONS</para>
5671 <heading>How to Apply These Terms to Your New Programs</heading>
5672 <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>
5673 <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 "copyright" line and a pointer to where the full notice is found.</para>
5674 <para><one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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>
5675 <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>
5676 <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>
5677 <para>Also add information on how to contact you by electronic and paper mail.</para>
5678 <para>If the program is interactive, make it output a short notice like this when it starts in an interactive mode:</para>
5679 <para>Gnomovision version 69, Copyright (C) year name of author</para>
5680 <para>Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.</para>
5681 <para>This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.</para>
5683 <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>
5684 <para>You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:</para>
5685 <para>Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. </para>
5686 <para><signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice</para>
5687 <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>