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.

Global Metric Manager<br />

In this example, the perl expression checks each line of output and<br />

extracts the following values:<br />

498792 /<br />

0 /proc<br />

0 /sys<br />

0 /dev/pts<br />

0 /proc/bus/usb<br />

The Virtual Agent then checks each line of the output and uses the<br />

key index to identify a matching row and returns the appropriate<br />

value.<br />

Note: The Virtual Agent only uses the first two matches it finds. For<br />

example, it uses the first two values in parenthesis, not including<br />

the column delimiters such as (?:\S+\s+).<br />

Configuration Example 2<br />

Using the example above, what happens if the components are<br />

defined as tmpfs and sysfs. the Metric Editor configuration would<br />

be as follows:<br />

Command: /bin/df –a<br />

Perl Expression: /(\S+)\s+([0-9]+)\s+[0-9]+.*\S+\s+(\S+)/<br />

Key Index: 0<br />

The matching output would be:<br />

tmpfs 498792<br />

proc 0<br />

sysfs 0<br />

devpts 0<br />

usbfs 0<br />

Even if the final (\S+) remains in the pattern, it will not be included<br />

in the matches that the Virtual Agent evaluates. In addition, the key<br />

index had to be changed to match the newly defined components.<br />

560 <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!