19.07.2014 Views

OneSight Administrator Guide

OneSight Administrator Guide

OneSight Administrator Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using Regular Expressions for Pattern Matching<br />

df -k<br />

/^[^F](?:\S+\s+){4,4}([0-<br />

9]+)%\s+(\S+)/<br />

Any percentage value in<br />

the Capacity column of<br />

the Filesystem data<br />

returned by the df<br />

program output (e.g.<br />

3.0%).<br />

The <strong>OneSight</strong> Virtual Agent monitor includes several pre-defined<br />

OS/Program/Perl expression definitions for common metrics accessible<br />

using command line programs available with several versions of UNIX.<br />

You can also define custom settings in the Virtual Agent.<br />

The perl expressions are evaluated as follows:<br />

Subpattern<br />

^<br />

Description<br />

Beginning of the line.<br />

( ) The part of the expression to return.<br />

\S Match a non-whitespace character.<br />

\s Match a whitespace character.<br />

(?:\S+\s+)<br />

Represents a column in the program output.<br />

Matches one or more non-whitespace character and<br />

one or more whitespace character.<br />

{4,4} Match at least 4 times but not more than 4 times<br />

(min,max).<br />

[0-9]+ Match one or more occurrences of anything between<br />

0 and 9.<br />

More information about using Perl expressions is available at<br />

www.perl.com.<br />

418 <strong>OneSight</strong> <strong>Administrator</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!