$('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 > Monitor output from a script IBM Tivoli Monitoring, Version 6.3


Script parsing and separators

You can change and assign specific script separators to one or more attributes.

When you create a script attribute group, a single character text separator is by default assigned. The default separator is ";". The separator is used by the agent to parse and delimit the data for each attribute in the data row. You can change the default separator to use a different character. You can also assign specific separators to one or more individual attributes.

You can assign specific separators for individual attributes that:

You can use one or more of these separators to extract attribute values from the data rows.


Example 1 - Simple script output

Some scripts can output data rows with clear and regular separators, for example:

Here the ";" character is a clear and regular separator between the three pieces of data on each row. In this case, the default separator is fine, so there is no need to change or define other separators. It is not difficult to imagine a similar script output where the separator is a different character, as in the following example.

In this example the separator is changed from a ";" character to a "-" character. In this case when you define the attributes, change the default separator to use the "-" character.


Example 2 - Complex script output

Some scripts can output data rows that have irregular or changing separators, for example:

In this example an assignment of separators to attribute definitions that you can use is:

  1. Initially the default separator ";" is fine for the first three attributes in each data row. In this case, you assign the separator type Separator Text set to ";" when you define each attribute, this setting is the default one.

  2. For the fourth attribute, assume the string between the"[" and "]" is a value that you want to extract. In this case when you define the fourth attribute, you assign a separator type Begin and End Text with begin and end text values of "[" and "]".

  3. For the fifth attribute, assume that you want to extract the values between the "]" and ":" characters. In this case when you define the fifth attribute, you assign separator type Separator Text set to ":".

  4. For the sixth attribute, the default separator ";" is fine again, accept the default.

  5. For the seventh attribute, you would like to extract the string in the next four characters "four". There is not a clear separator at the end of this string. You can assign a number of characters to define the separation from the next attribute. You assign a separator type Number of characters, and specify four characters as the length.

  6. For the eighth attribute you would like to extract the strings tabby, very tabby and line up. In this case, you can assume that all of these strings are followed by a tab character. In this case, you assign a separator of type Tab separator.

  7. For the ninth attribute, you revert again to the default separator type to extract the remaining text to this attribute.

  8. For the 10th attribute, you specify Remainder of record to assign the remainder of the data row to this attribute

Defining these separators on a script that outputs the data rows that are shown earlier in this example is shown in the following output:

Figure 1. Example attribute value output when Agent parses complex script output.

The procedure to define the attribute separators is described under step 10 of (Steps for monitoring output from a script).


Parent topic:

Monitor output from a script

+

Search Tips   |   Advanced Search