Page History
Uptime Infrastructure Monitor uses two types of regular expression syntax: Wildcard
Java Regular Expressions
Sample Regular Expressions Literal Characters
...
Table of Contents | ||||
---|---|---|---|---|
|
...
Wildcard
The wildcard regular expression syntax only supports an asterisk ( * ) at the end of an expression. You can use wildcards with the following reports and monitors:
- File System Capacity Growth report
...
- Disk I/O Bandwidth report
...
- File System Service Time Summary report
...
- File System Capacity monitor
...
- Platform Performance Gatherer
When used with the reports and monitors listed above, a wildcard includes or excludes disks and file systems. For example, if you want to configure the File System Capacity monitor to exclude the /lib
and /lost+found
file systems on a Solaris server, you can specify the regular expression /l*
in one of the Exclude Pattern fields on the monitor template. Note
Info |
---|
Note that a wildcard will include all disks or file systems that match an expression. For example, if you specify |
...
in the Exclude File Systems field when creating a File System Service Time Summary report, then this expression will force the report to ignore the |
...
|
...
file systems. |
...
|
Java regular expressions
Uptime Infrastructure Monitor also supports the full range of Java regular expressions, as well as inverse regular expressions. For example, you can specify /u.*
to include or exclude all file systems with names that begin with u
. The inverse regular expression [^OK]
, on the other hand, will return all results that are not in an OK state.
Info |
---|
The matching performed by Java regular expressions in Uptime Infrastructure Monitor is case sensitive. |
The following monitors support Java regular expressions:
- Windows Event Log Scanner
- DNS
- FTP
- HTTP
- IMAP
- Custom
- NIS/YP
- NNTP
- POP
- SMTP
- TCP
- SNMP
Sample regular expressions
The following examples of Java regular expressions can be used with the Windows Event Log Scanner and POP monitors.
The Windows Event Log Scanner searches a specified number of lines in a Windows log file for a specified text string. For example, you want to search the System log to find disks that are full. Because certain Windows systems have more than one disk drive, you can use this regular expression to ignore specific drive letters:
Disk .: is full
The POP (Email Retrieval) monitor checks the status of POP2 and POP3 servers. You can enter a regular expression in the Expected Server Response field of the monitor template to determine if a connection is made to the POP service. For example, entering the following regular expression will direct the POP monitor to look for all server responses that contain OK POP3
and server ready
messages:
[OK POP3 .* server ready]
Literal characters
...
Wiki Markup |
---|
Uptime Infrastructure Monitor also supports the full range of Java regular expressions, as well as inverse regular expressions. For example, you can specify /u.* to include or exclude all file systems with names that begin with u. The inverse regular expression \[^OK\], on the other hand, will return all results that are not in an OK state.
!worddav81a2f5861b9291cc8f3c6eaa1054bb9b.png|height=16,width=16! <span style="color: #333333"><strong>Note</strong></span>
<span style="color: #333333">The matching performed by Java regular expressions in Uptime Infrastructure Monitor is case sensitive.</span>
The following monitors support Java regular expressions: !worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! Windows Event Log Scanner
!worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! DNS !worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! FTP
!worddava7313c26dd1122ba05ccd8312dbbcb50.png|height=4,width=4! HTTP !worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! IMAP
!worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! Custom !worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! NIS/YP !worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! NNTP
!worddava7313c26dd1122ba05ccd8312dbbcb50.png|height=4,width=4! POP
!worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! SMTP !worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! TCP
!worddava0e5af1952d8679b64a9c868b8993b6d.png|height=4,width=4! SNMP
\\ |
...
Wiki Markup |
---|
The following examples of Java regular expressions can be used with the Windows Event Log Scanner and POP monitors.
The Windows Event Log Scanner searches a specified number of lines in a Windows log file for a specified text string. For example, you want to search the System log to find disks that are full. Because certain Windows systems have more than one disk drive, you can use this regular expression to ignore specific drive letters:
\\
Disk .: is full
\\
The POP (Email Retrieval) monitor checks the status of POP2 and POP3 servers. You can enter a regular expression in the Expected Server Response field of the monitor template to determine if a connection is made to the POP service. For example, entering the following regular expression will direct the POP monitor to look for all server responses that contain OK POP3 and server ready messages:
\\
\[OK POP3 .* server ready\]
\\ |
...
The following characters have special meaning in a regular expression and must be escaped using a backslash (to indicate that the characters should be interpreted literally):
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0321cbd4-af23-47aa-9923-5bcd70296196"><ac:plain-text-body><![CDATA[
...
...
[
...
]]></ac:plain-text-body></ac:structured-macro>
...
]
...
(
...
)
...
{
- [ and ]
- ( and )
- { and }
- ^
- .
- ?
- *
- +
- |
- $
For example, to find the the string (some_text)
, use the regular expression (some_text)
.