Validating Logfile Adapter FMT Files
Validating Logfile Adapter FMT Files
files with the extension fmt, for IBM Tivoli® Monitoring V6.2.3.
validating_logfile_adapter_fmt_files.ppt Page 1 of 17
This presentation assumes that you know what the Tivoli Monitoring V6.2.3 log file
agent format file is being used for. It also assumes that you have access to an installed
IBM Tivoli Enterprise Console. This console does not have to be running.
validating_logfile_adapter_fmt_files.ppt Page 2 of 17
When you complete this presentation, you can differentiate between the two types of
pattern matching that are used in the format file. And you can validate that your
generated format file matches selected entries.
validating_logfile_adapter_fmt_files.ppt Page 3 of 17
The Tivoli Monitoring V6.2.3 log file agent requires a format file in order to work
correctly. You must customize the format file to match the log files that you want to
monitor. Since the log file agent is the successor to the Tivoli Enterprise Console log file
adapter, it is compatible with the legacy Tivoli Enterprise Console style. It also supports
regular expressions as an alternative method for matching entries in a log file. You can
use both styles of pattern matching within the same format file. Subsequent slides show
you the difference between the two styles and describe how to test your pattern
matching expression.
validating_logfile_adapter_fmt_files.ppt Page 4 of 17
In this example, you want to match the line: Error: disk failure on device /dev/sd0: bad
sector. A sample format file that uses the legacy pattern matching style is shown here,
along with the result of the match. Notice that, in the format file, the entries for
hostname, fully-qualified hostname, and origin have the value DEFAULT. In the result,
this value is replaced with the appropriate value from the agent. This functionality allows
you to use the same format file on different machines. To learn more about the legacy
Tivoli Enterprise Console pattern matching style, see the link at the bottom of this slide.
validating_logfile_adapter_fmt_files.ppt Page 5 of 17
The next few slides show you how to validate your legacy Tivoli Enterprise Console-
style format file. These steps require that you have Tivoli Enterprise Console installed in
your Tivoli Framework. Without it, you cannot test your Tivoli Enterprise Console-style
format file.
Start Tivoli Desktop, right-click the EventServer icon, and choose the Configure
Logfile menu item.
validating_logfile_adapter_fmt_files.ppt Page 6 of 17
In the new window that opens, go to the File menu and choose Open Format to select
the format file that you want to test.
validating_logfile_adapter_fmt_files.ppt Page 7 of 17
Next, choose a rule base. From the File menu, choose Open Classes. You can choose
any of the displayed rule bases. It does not matter which one you use.
validating_logfile_adapter_fmt_files.ppt Page 8 of 17
The last step is to choose the log file that your agent modifies that you want to use to
test your format file.
validating_logfile_adapter_fmt_files.ppt Page 9 of 17
This screen capture shows a successful test. The entry in the log file matches a rule in
the format file. The field named “This message matches” show the format file entry that
matched the selected log file message.
validating_logfile_adapter_fmt_files.ppt Page 10 of 17
This screen capture shows an unsuccessful test. None of the format file entries
matched the selected log file message. The “This message matches” field does not
show any values. You will have to check and edit your format file. The Logfile Format
Editor does not help you to edit the format file. Its purpose is to help you to test your
format file.
validating_logfile_adapter_fmt_files.ppt Page 11 of 17
Here is an example of a format file in the new style that uses a regular expression. Just
as in the old style, the values for hostname, fully-qualified hostname, and origin are
replaced later with appropriate values from the IBM Tivoli Monitoring V6.2.3 agent. For
detailed information about the new regular expression log file agent style, see the link at
the bottom of this slide.
validating_logfile_adapter_fmt_files.ppt Page 12 of 17
IBM does not provide a tool to test the regular expressions. The linked page is useful
because it accepts the regular expression format and it is easy to understand. However,
be aware that this is not an official IBM website.
validating_logfile_adapter_fmt_files.ppt Page 13 of 17
Here are two screen captures that describe the usage of this website. Fill in the two
fields; then, press Show Match. A new window opens and gives you the results.
To interpret the results, make sure that the first line is always “Match at position 0.” The
second line shows the used subject string. The remaining lines show the matches of the
used regular expression in the order they occur. It means that the first regular
expression match is displayed in Line 3, second regular expression match is displayed
in Line 4, and so on. It tells you exactly which value is matched in which slot.
validating_logfile_adapter_fmt_files.ppt Page 14 of 17
Here is an example of no match. When you press the button Show Match, a new
window opens and shows the message “No match.” In this case, you must check your
regular expressions.
validating_logfile_adapter_fmt_files.ppt Page 15 of 17
This presentation gave a short overview of the two different styles of the format file that
the IBM Tivoli Monitoring V6.2.3 log file agent supports. Additionally, it showed how to
validate the format file.
validating_logfile_adapter_fmt_files.ppt Page 16 of 17
validating_logfile_adapter_fmt_files.ppt Page 17 of 17