Extracting Business Information from Service Usage Data Using XPath/JsonPath/RegEx

The following use case illustrates how to use the Business Metrics Policy to extract business information from the service usage data using XPath/JsonPath/RegEx from the request payload and derive operational metrics.

Managing Policies

Supported Platforms: 8.0 and later.


  1. Launch the Envision Console, select New Dataset, and define a dataset with sharing set to Public.

    Defining a new public dataset

  2. In the new dataset, select New Dimension and define a dimension with the TEXT type.

    Defining a dimension

  3. In the same dataset, select New Metric and define a metric with the the COUNT type and all aggregations.

    Defining a new metric

  4. Save aggregation settings for the selected dataset.

    Saving aggregation settings

  5. Select New Chart, and create a chart using this dataset with the following configuration:

    Creating a chart

    Business Metrics chart info

    Business Metrics chart: defining axes

  6. Select New Dashboard, and create a dashboard with the newly defined chart:

    Creating a dashboard with the new chart

    Add Chart

    Adding the chart

  7. Launch the Policy Manager Management Console, and create a service using the WSDL file at this address: http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl7.
  8. Virtualize the service on the Network Director.

    Virtualizing the service

  9. Navigate to Policies > Operational and click Add Policy, then create a Business Metrics policy.
  10. Configure the policy, selecting the dataset you defined earlier, as shown below.

    Configuring the Business Metrics policy

  11. Provide Extract/Derive Configuration for each of the dimensions and metrics using the example illustrated below:
    • Dimension using Extract – To obtain a value in request payload using XPath/JsonPath/RegEx.

      Configuring the policy: defining the dimensions

    • Metric using Derive – To obtain usage count.

      Configuring the policy: defining the metrics

      Configuring the policy: defining the metrics

  12. Attach the policy to the service.

    Attaching the policy to the service

    Attaching the policy to the service

  13. Send multiple requests to generate data for various usage scenarios.

    Sending requests to the service

    Sending requests to the service

    Sending requests to the service

    Sending requests to the service

  14. Check the data to be recorded in MongoDB and Dataset. The data should be appropriate per the requests sent.
  15. The chart should record information based on the data generated in the datasets from the above requests.

Back to top