Syslog is a protocol for forwarding log messages in an Internet protocol (IP) network. Within the syslog protocol, a syslog sender, such as a device or application, sends a small textual message (e.g., less than 1024 bytes) to a syslog receiver, commonly referred to as a syslog daemon, which typically executes on a syslog server.
Syslog messages contain information that may concern any one of a variety of events. For example, a syslog message may be transmitted when a device first logs on to the network, a syslog message may be transmitted when an error occurs, a syslog message may be transmitted when an intruder on the network is detected, a syslog message may be transmitted when a virus is detected, etc.
The syslog messages received by the syslog daemon are normally stored in a message repository such that a record is maintained as to operation of the network and the various devices that it comprises. Such a record is particularly useful when a problem arises. Specifically, when a problem occurs, the record comprises a paper trail of the events that preceded the problem and can be used to determine why the problem occurred and/or how to devise a proactive defense against undesired activity (e.g., network intrusion).
Syslog messages normally comprise a specific format that is dictated by Request for Comments (RFC) 3164. More and more frequently, however, syslog messages are being transmitted that have alternative formats. Currently, syslog messages that do not conform to an expected format are often discarded. Such discarding is performed as a precaution given that certain messages can be detrimental to the system in terms of compromising system security or simply filling the message repository with useless or false information.
The discarding of syslog messages having unexpected formats can be undesirable in some cases. For example, the standard to which syslog messages are to adhere may change over time. Furthermore, even if the official standard does not change, alternative formats may become popular and may therefore come into widespread use. Moreover, even if a particular set of devices or applications use a format that is not widely used, the information provided in syslog messages sent by the devices/applications may still be of high importance to the network and therefore should be retained.
Currently, relatively complicated procedures are used to accommodate new syslog message formats, if at all. In one known technique, a complex parsing algorithm must be modified so that it will recognize the new format(s). Such modification may, however, be beyond the skill of typical network administrators.
Disclosed are systems and methods for managing syslog messages. In one embodiment, a method for managing syslog messages includes receiving a syslog message, determining whether the syslog message is valid by comparing the syslog message to one of a plurality of separate syslog message templates to identify whether a format of the syslog message matches a format of the syslog message template, and if the syslog message format does not match the format of the syslog message template, individually comparing the syslog message format with formats of the other syslog message templates until a match is found or it is determined that the syslog message format matches none of the formats of the syslog message templates.
In a further embodiment, a method for managing syslog messages includes identifying a syslog message format that is not currently accepted, composing a syslog message template that corresponds to the syslog message format, the syslog message template comprising a regular expression having a general arrangement the corresponds to the syslog message format such that validity of future syslog messages can be determined through comparison of the future syslog messages to the regular expression, and storing the syslog message template in a location at which the syslog message template will be considered by a syslog daemon in making a message validity determination.
The disclosed systems and methods can be better understood with reference to the following drawings. The components in the drawings are not necessarily to scale.
As described above, it can be undesirable for a syslog daemon to discard syslog messages having an unfamiliar format given that the messages may be legitimate and important to network operation and security. As described below, systems and methods are described with which a syslog system can be dynamically modified so as to enable validation of syslog messages having a previously unknown or unacceptable format.
In some embodiments, incoming syslog messages are validated through comparison with one or more syslog message templates. In such a case, a syslog message will be considered valid as long as its format matches the format of at least one of the templates. When a new syslog message format is encountered that is deemed to be acceptable, the syslog system can be dynamically modified to validate messages having that format by creating a new template reflective of the new format. Once the new template has been stored, syslog messages having the new format will not be discarded and therefore will be available for consideration if and when a problem occurs.
Referring now in more detail to the drawings, in which like numerals indicate corresponding parts throughout the several views,
As can be appreciated from the foregoing, the server computer 104 operates as a syslog server that receives and stores syslog messages transmitted over the network 106 by syslog senders. As described in greater detail below, the server computer 104 can comprise a syslog daemon that is used to validate incoming syslog messages and store validated syslog messages.
The network 106 can comprise a single network, such as a local area network (LAN), or may comprise a collection of networks (LANs and/or wide area networks (WANs)) that are communicatively coupled to each other. In some embodiments, the network 106 may comprise part of the Internet.
The processing device 200 can include a central processing unit (CPU) or an auxiliary processor among several processors associated with the computer 102, or a semiconductor based microprocessor (in the form of a microchip). The memory 202 includes any one of or a combination of volatile memory elements (e.g., RAM) and nonvolatile memory elements (e.g., hard disk, ROM, tape, etc.).
The user interface 204 comprises the components with which a user interacts with the computer 102. The user interface 204 may comprise, for example, a keyboard, mouse, and a display, such as a cathode ray tube (CRT) or liquid crystal display (LCD) monitor. The one or more I/O devices 206 are adapted to facilitate communications with other devices and may include one or more communication components such as a modulator/demodulator (e.g., modem), wireless (e.g., radio frequency (RF)) transceiver, network card, etc.
The memory 202 comprises various programs including an operating system 210 and one or more applications 212. The operating system 210 controls the execution of other programs and provides scheduling, input-output control, file and data management, memory management, and communication control and related services. The applications 212 can comprise any application that executes on the computer 102 and is capable of transmitting a syslog message to the server computer 104. Accordingly, one or more of the applications 212 can be considered to comprise syslog senders.
As indicated in
Example systems having been described above, operation of the systems will now be discussed. In the discussions that follow, flow diagrams are provided. Process steps or blocks in the flow diagrams may represent modules, segments, or portions of code that include one or more executable instructions for implementing specific logical functions or steps in the process. Although particular example process steps are described, alternative implementations are feasible. Moreover, steps may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved.
Turning to decision block 404, if the syslog message format is valid, the syslog message is stored in a syslog message repository, (e.g., repository 314 in
If the syslog system is not to be modified to validate messages having the newly encountered syslog message format, flow returns to block 400 at which a new syslog message is received. If, on the other hand, the syslog system is to be modified, a new syslog message template is added to the system to be used in the validation process as indicated in block 410. As described in greater detail in relation to
By way of example, the syslog message template comprises a regular expression. As used herein, the term “regular expression” refers to a string of characters arranged in a format indicative of the format of a syslog message that is to be considered acceptable when making the validation determination. The regular expression therefore has the general arrangement, composition, pattern, or syntax of an actual syslog message, i.e., the real expression is a string of characters comprising the various entries or fields of an actual syslog message without specifying particular pieces of information for each of those entries or fields. Therefore, assuming an acceptable syslog message contains separate entries for facility, severity, hostname, timestamp, and message as per RFC 3164, the regular expression of a corresponding syslog message template will comprise those same entries without specifying a particular facility, severity, hostname, timestamp, or message. To take a specific example, if the timestamp of a syslog message to be accepted includes a three-letter designation of a month in which the message was transmitted, the corresponding regular expression will contain an entry that includes a three-letter designation for each month of the year and, therefore, will not specify a particular month.
Examples of an actual syslog message and a corresponding syslog message regular expression are provided below:
As can be appreciated from the above, the example syslog message regular expression has the same general configuration of the example syslog message and therefore can be used as a reference in adjudging whether a syslog message is valid. Therefore, returning to
Referring next to decision block 506, if through the comparison the format of the received syslog message matches the format of the syslog message template, flow continues down to block 512 at which the syslog message is stored in the syslog message repository. If, however, the format of the received syslog message does not match the format of the syslog message template, flow continues to decision block 508 at which it is determined whether all templates contained in the template repository have been considered. If not, flow returns to block 502 at which a different syslog message template is accessed for the purpose of comparison with the received syslog message and the process described above is repeated. Assuming, however, that each template of the template repository has been considered, meaning that there are no syslog message templates contained within the repository having a format that matches the format of the received syslog message, the received syslog message is deemed invalid and is discarded, as indicated in block 510.
Using the validation process described above in relation to
In
Irrespective of the manner in which the decision to modify the syslog system is reached, the new syslog message format can be identified, as indicated at block 600 of
Next, with reference to block 604, the composed syslog message template is stored in a location that the syslog daemon will reference when conducting the message validation process. That location has been described above as the syslog message template repository. The “repository” can comprise any construct that can be accessed by the syslog daemon. In one example, the repository comprises a directory containing separate files, each file pertaining to a separate template. In another example, the repository comprises a single file having multiple entries or lines, each entry or line corresponding to a different templates. In another example, the repository having a table comprises separate entries, each entry corresponding to a separate template.
Irrespective of the nature of the syslog message template repository, once the new syslog message template is stored in a location accessible by the syslog daemon, the template can be used to validate incoming messages having a corresponding format, for example in the manner described above in relation to
As can be appreciated from the foregoing, the disclosed systems and methods can be used to simplify both the message validation process and the process of modifying the syslog system to accept newly discovered syslog message formats. Given that the system can be adjusted to accept alternative message formats by simply composing a new regular expression and storing it in a location at which it will be consulted by the syslog daemon, a high level of programming skill is not required, as may be the case when a validation algorithm is used to validate incoming syslog messages. Therefore, it is relatively quick and easy for network administrators to extend the acceptance of syslog messages, thereby reducing the need for reliance on outside technical assistance personnel.
Although particular embodiments of systems and methods have been described in the foregoing, those embodiments are mere examples of the disclosed systems and methods. Therefore, other embodiments are possible and are considered to fall within the scope of the present disclosure.
This application is related to commonly-assigned patent application entitled “Syslog Message Handling” filed on May 25, 2005, and accorded Ser. No. 11/137,885 and “Pattern Matching Algorithm To Determine Valid Syslog Messages” filed on May 25, 2005, and accorded Ser. No. 11/138,530, both of which are entirely incorporated herein by reference.