This documentation supports the 11.2 version of BMC Discovery.

To view an earlier version of the product, select the version from the Product version menu.

Using and manipulating named values

Named values enable you to provide the identity in human-readable naming conventions that help you differentiate between instances. However, no type conversions can be performed in the named values user interface, so you can only compare values of the same type. When you select a named value to use, only those that can be compared are displayed in the drop-down lists. Having fewer named values displayed than you are aware of might initially appear counter-intuitive, but it prevents comparing unlike types. Similarly, string operations are only permitted on strings.

Where such a restriction is enforced in the user interface, a green question icon is displayed, which links to the following explanations for the corresponding restriction:

  • Why can't I apply transformations? Transformations are manipulations of string attributes, so they cannot be applied to non-string attributes.
  • Why can't I see all named values here? Named values can be compared only with named values of the same type (for example, string with string, number with number, and so forth). Therefore, if you choose a named value of one type, not all other named values might be available for comparison.
  • Why can't I select named values here? Named values can be compared only with named values of the same type. If there are no other named values of that type, then no values can be selected. Also, named values will not display from other trees in the drop-down list, or for named values defined on the Functional Component Definition that you are adding a condition for.

You cannot create named values based on date or time attributes.

The following table describes the transformations that you can apply to named values.

Transformation type

Description

append string [constant]

Append the specified string to the named value string.

left [index]

Use the first n characters from the named value string, where n is specified as the index.

lower

Convert any uppercase characters in the named value string to lowercase characters.

middle [index1, index2]

Use a section of the named value string. The character to start from is specified with index, and the length of the string is specified with length.

prepend string [constant]

Prepend, or add the the specified string to the start of the named value string.

regular expression [regex, default]
See the note in the following section.

Use a regular expression to extract matching characters from the named value string.

right [index]

Use the last n characters from the named value string, where n is specified as the index.

split on [index, string]

Extract the group of characters from the named value string using string as a delimiter. The index specifies which group to extract.

table [default, (key, value)...]

A table of key and value pairs. Where the named value string matches the left hand value, it is converted into the value on the right. The default value is used where the named value string does not match any of the values in the left hand column.

trim

Remove leading or trailing whitespace characters from the named value string.

upper

Convert any lowercase characters in the named value string to uppercase characters.

 


The following table shows examples of each of the transformations described in the previous table:

Transformation type

Example input

Transformation

After transformation

append string [constant]

webdav

" instance"

webdav instance

left [index]

webdav

3

web

lower

WebDav

webdav

middle [index1, index2]

WebDav inst

4, 9

Dav in

prepend string [constant]

WebDav

"My "

My WebDav

regular expression [regex, default]
See the note in the following section.

WebDav
wlcmPROD
wlcmTEST
wlcmUAT

([A-Z]+)$, Unknown

Using a regular expression to extract uppercase characters from the end of the string.

Unknown
PROD
TEST
UAT

right [index]

webdav

3

dav

split on [index, string]

module on App Server on rhel5-tomcat55

1 " on "

App Server

table [default, (key, value)...]

deb-tomcat55
rhel5-tomcat55
w2k3-tomcat55

DefaultNone
rhel5-tomcat55Dev
w2k3-tomcat55Prod

None
Dev
Prod

trim

" webdav "

webdav

upper

webdav

WEBDAV


Using regular expressions in transformations

Using a complex regular expression (one that takes a long time to process) as a transformation can render the user interface unresponsive to all logged in users. For information on regular expressions in BMC Discovery, see Writing efficient regular expressions.

To create a named value

  1. On the Application Mapping tab, click Defined Named Value corresponding to a functional component.
  2. In Named Value Editor, choose a value from the Add New Transformation menu. This creates a transformation that applies a definition to the named value.
    This screen illustrates how to add a new transformation to a named value in the Named Value editor.









  3. Click Apply.
    The transformation displays in the field below the Add New Transformation menu, marked with an X.
  4. In the Transformation field, type a value to see how the transformation applies to the corresponding name. In the following example, typing MYNAME in the field displays myname in the field corresponding to the selected transformation, indicating that the lowercase transformation works as expected.
    If you type a value that exists in the datastore, the system will fetch the values and match the text, and then display those on the Editor. The following screen illustrates values for the process User Name being pulled from actual data in the datastore for each instance and applying the selected transformation to each one (in this example, a lowercase, prepended "I am the".
    This screen illustrates values for the process User Name being pulled from actual data in the datastore for each instance and applying the selected transformation to each one.










  5. Click the X near the transformations you have validated and want to remove.
  6. Repeat Steps 1 and 2 to add transformations that better define the value as necessary.
  7. In the Make available as field, type the name of the identifier for an instance, select the Is identity check box, and click Apply.
    This screen illustrates values for the process User Name being pulled from actual data in the datastore for each instance and applying the selected transformation to each one.









    Is identity option

    The Is identity option applies only to one value.

After you have created values with names, you can also manipulate the values so that BMC Discovery can:

  • provide the identity in human-readable naming conventions that help you differentiate between instances
  • link all the components of an application instance
  • make the names more logical to identify the application

Example

In his questions to George in his PDF, Mike needs to know if there are both a Production and Development instance in the Friends application. Rather than wait for an answer and be blocked from further progress, he knows that there are two database instances (mellon, and mellon_dev), which clues him that the latter is the Development instance, and the former might be the Production instance.
This screen illustrates the Group that indicates a development instance for the database.








Based on this assumption, Mike begins to define a named value for the database tier in the application to differentiate across the Production and Development instances. He notices that, in the Results section, there are some names assigned to the instances that would require stripping the names to match the Friends application. So, because the database has instances, he decides to check that attribute first.

  1. In Named Value Editor, click show all in the Attributes section to expand the list of attributes.
  2. Click the Instance attribute.
    The Sample values show the mellon names that he was looking for.
    This screen illustrates the Group that indicates a development instance for the database.










  3. Transform the mellon instance to the Production instance, and mellon_dev to the Development instance.
    This screen illustrates how to transform both names of the database instances.












  4. Make the value available as the identifier friends_db_id.
    Next, Mike wants to run a PDF preview and verify with George that the model is taking shape. The PDF displays one page per functional component and a tree view of the functional component (which can also be used as an index). You can control the level of reporting in the PDF to respond to requests for more or less information, evaluate a bigger picture of the environment, or drill down to the details of the functional components and their relationships to all other nodes.
  5. From the Generate PDF Report dialog, choose the visualization detail you want to display in the report by selecting one of the following option buttons:
    • No visualization — generates a report with no illustrative examples of the functional components and their relationships to other hosts.
    • Functional Components only — generates a report with descriptive and visual information on functional components, but not about their relationships with other hosts.
    • Functional Components and related hosts (the default) — generates a report with descriptive and visual information on functional components, including relationships with other hosts. For an example visualization, see page 10 of the example report.
      The Generate PDF Report dialog displays any guidance or warning messages associated with your application mapping exercise to this point.
      This screen illustrates a notification of prior errors relating to the application map before printing to PDF.








  6. If necessary, go back and make changes to the mapping in response to any messages.
  7. Click OK.
  8. Download the PDF and review it.
    The PDF now contains visualizations of both the database and Web tiers of the Friends application. In the following example, the functional components are indicated by the gray boxes for both the database and Web tiers, and the rules that Mike defined for each tier are labeled inside the boxes:
    This screen illustrates the visualizations included in the PDF preview for both the Web and datbase tiers.









    Checking his e-mail, Mike notices that George has responded to his questions that he noted in his earlier PDF report, confirming that the Friends application contains both a Production and Development instance. This validates Mike's findings in the PDF report and gives him the confidence to send his latest report to George.
  9. Attach the PDF to an e-mail it to George for his feedback.
    George is impressed that Mike was able to generate such a rich report with all the details of the application. More importantly, George is happy that Mike was able to map the application accurately and efficiently with little help.

Where to go from here

After you defined the rules for your application through named values, the final step in the mapping stage is to generate a pattern from the application definition. This step turns the results into a form that BMC Discovery can use at during normal discovery when you scan your estate, and so it can build the functional components and Business Application Instances (BAIs) and push them into BMC Atrium Configuration Management Database (BMC Atrium CMDB).

Was this page helpful? Yes No Submitting... Thank you

Comments