$('a[name]').remove(); $('#ic-homepage__footer').before('

'); $("#tabs").tabs({ selected: 1 }); $("#ic-homepage__ic-tips").append( quickTipHTML() ); unhideOneProductTip(); $("#ic-homepage__product-tips").wrapInner('

'); $("#ic-homepage__feed-tips").wrapInner('

'); });

IBM Tivoli Monitoring > Version 6.3 > User's Guides > Agent Builder User's Guide IBM Tivoli Monitoring, Version 6.3


Dynamic file name support

Use dynamic file name support to specify a file name pattern instead of an actual file name.

Some application programs create an output file name that is subject to change. The name changes based on specific criteria such as the current day, month, year, or a file name that includes an incrementing sequence number. In these cases, you can specify the file name pattern instead of the actual file name. There are two pattern formats that are recognized when you specify the file name pattern:


Regular expression file name patterns

To specify file name patterns, you can use regular expressions according to the International Components for Unicode (ICU) syntax that is documented in (ICU regular expressions). To use this capability, select the File names match regular expression check box on the Advanced Log File Attribute Group Information page. When you specify regular expression patterns, you must also select an option from the When Multiple Files Match list on the Advanced Log File Attribute Group Informationpage to specify the guidelines for selecting the most current matching file.

Regular expressions is the preferred method to specify file name patterns.

For more information about how to configure advanced log file attribute group properties, see ( Monitor a log file), Step (6). For example, if you specified a file name pattern:

This pattern searches for file names that start with tivoli in the d:\program files\logs directory. Regular expressions can be specified only for the file name portion, and not the path name.


Dynamic file name syntax

With the dynamic file name syntax, only one file at a time can be monitored. The File Data Provider inspects all files in the designated path location, seeking files that match the defined pattern. The File Data Provider always monitors the most current matching file that is based on whichever matching file name has the highest number or date-time value. The appropriate file to monitor is determined by file name, instead of by file creation or other criteria.

Patterns can be specified for file names with any number of parts. For example, Log{###} matches on one-part file names such as Log010 or Log456. In multi-part file names, pattern characters can be specified in any part of the file name or in multiple parts. For example, aaa.bbb{???}.ccc is a valid pattern, and aaa.bbb{???}.ccc{###} is also valid.

Regular expressions rather than dynamic file name syntax is the preferred method to specify file name patterns, for more about regular expressions, see Regular expression file name patterns

The following examples illustrate file name pattern specification:

{########}.abc

Matches numeric file names of length 8 and the file extension .abc, such as 10252006.abc or 10262006.abc. File 10262006.abc is monitored because 10262006 is greater than 10252006.

{########}.*

Matches numeric file names of length 8 and ignores the file extension. Examples include 20061025.log, 20061101.log, and 10252006.abc. File 20061101.log is monitored because 20061101 is the largest number.

{######??}.abc

Matches numeric file names of length 8 and file extension .abc, and ignores the last two positions in the name portion. Examples include 02110199.abc, 02110200.abc, and 021101AZ.abc. File 02110200.abc is monitored because 021102 is the largest number.

Console.{######}

Matches file names that contain Console in the name portion and a six-digit number in the extension portion. Examples include Console.000133, Console.000201, and Console.000134. File Console.000201is monitored.

IN{######}.log

Matches file names that start with IN followed by six numerals and the file extension .log. Examples include IN021001.log, IN021002.log, and IN021004.log. File IN021004.log is monitored.

PS{###}FTP.txt

Matches file names that start with PS followed by three numerals, followed by FTP, and the extension .txt. Examples include PS001FTP.txt, PS005FTP.txt, and PS010FTP.txt. File PS010FTP.txtis monitored.

Follow these guidelines to establish file name patterns:

To precisely specify a file name that consists of date components (year, month, and day), use the capital letters Y, M, and D. These letters must be specified within braces; otherwise they are treated as literal characters in the file name.

See the following examples:

{YYYYMMDD}.log

Specifies file names such as 20060930.log or 20061015.log.

{MMDDYY}.log

Specifies file names such as 101106.log or 110106.log.

{DDMMYYYY}.log

Specifies file names such as 01092006.log or 15082006.log.

{DDMMMYY}.log

Specifies file names such as 24Jan07 or 13Sep06.

{MM-DD-YY}.log

Specifies file names such as 11-02-06 or 04-29-07. The (-)separator character is ignored in the date field and does not require a question mark pattern character to skip over it.

MY{YYDDD}.log

Specifies file names such as MY06202.log, MY06010.log, or MY04350.log.

Complex cases exist, where a date field is embedded within a longer file name, and the date patterns in the previous examples are not sufficient. For complex cases, create patterns that mix number signs and question marks and still perform numeric comparisons that select the most current file for monitoring. For example, the pattern ABC{?####?##?##?##?##?##?}XYZ.TXT can be used for file names such as ABC 2006-04-20 11_22_33 XYZ.TXT. In this example, you are interested in only the #- marked digits and question marks serve as placeholders that ignore other characters in the file name.

The File Data Provider periodically checks for new files that match the defined file pattern in the target path location. When a newer file that matches the pattern is detected, the File Data Provider automatically switches application monitoring to the new file. The File Data Provider searches for the best matching file when:



+

Search Tips   |   Advanced Search