You can use metrics to troubleshoot applications and monitor their performance. You can create a configuration to extract metrics from logs and post these metrics to a metric store. vRealize Log Insight Cloud supports only Wavefront as a metric store.

Prerequisites

Get the metric store URL and API key from Wavefront. For information about Wavefront, see https://docs.wavefront.com/.
  1. Log in to your Wavefront instance.
  2. Copy the Wavefront URL, for example, symphony.wavefront.com. You must use this URL in the Send To text box in the metric extraction configuration.
  3. If you do not have an API token for your Wavefront account, generate the token by following the instructions in https://docs.wavefront.com/users_account_managing.html.
  4. Copy the API token. You must use this token in the API Key text box in the metric extraction configuration.

Procedure

  1. Click the two arrows icon in the upper-left corner of the screen to expand the main menu.
  2. Click Explore Logs.
  3. Enter a query and click the Search button to view the results.
    You can select a time period and use filters for more specific query results. For more information, see Searching for Logs.
  4. On the Stream tab under the chart, locate a log.
  5. Click the three dots icon for the log and select Create Metric.
  6. Provide the following information to configure metric extraction:
    Option Description
    Name A name for the metric extraction configuration.
    Enabled A toggle that enables or disables the metric extraction configuration. The toggle is green when the configuration is enabled and gray when it is disabled. If disabled, the metrics for the configuration are not sent to the metric store.
    Send To The metric store URL.
    API Key The API token from the metric store.
    Source Type The log filtering criteria.
    Pattern When you select a log in the Explore Logs page to configure metric extraction, the system recommends matching grok patterns in this drop-down menu. A grok pattern is a named regular expression pattern for parsing logs.

    You can select one of the recommended grok patterns. If none of the recommended patterns match your log, you can write your own grok pattern in the text area under the drop-down menu.

    After defining the grok pattern, click Parse to see the metrics that can be extracted from your log based on the pattern. The system displays the list of numeric metrics that you can send to the metric store, for example, avgbandwidth, avgiops, and avglatencyinms. You can configure each of these metrics in the Metric Values to Send section.

    Sample Message This text area is auto-populated with the text from your selected log.
  7. Provide the following information in the Metric Values to Send section to configure the metrics that you want to send to the metric store:
    Option Description
    Value Select a field from the drop-down menu whose value is sent to the metric store.
    Name The name for the metric in the metric store.
    Source Tag A single value that represents the source of the logs in a metric store.

    To add a source tag, click Configure Source Tag. In the pop-up window, configure an expression by selecting fields under Available Fields (Parsed or Metadata). These fields are the parsed text fields from your selected log and log metadata. You can also use custom static string values with the fields to build the expression in the text box.

    Note: Because the fields are enclosed in the characters "<" and ">", you cannot use these characters in the static string.

    For example, consider the following expression:

    sddc-<env>.<sddc_id>.<component>.<sub_component>

    Here, sddc- is a static string and <env>, <sddc_id>, <component>, and <sub_component> are the fields parsed from your selected log or metadata.

    This expression evaluates to:

    sddc-prd.9d8ff46c-125c-4b72-b9b4-173d6bc71ab8.vm.mgmt

    Click Verify to test the source tag configuration and then click Save.

    Point Tag

    A key-value pair sent to a metric store, which is used to filter the metrics in the chart.

    Select one or more point tags for the metric from the drop-down menu. The point tags in the drop-down menu are populated by using text fields parsed from your selected log based on your grok expression and the metadata of the log.

  8. To configure more metrics, click Add Metric Value and repeat step 7.
  9. Click Save.