Create custom metrics

In addition to analyzing built-in protocol metrics in the ExtraHop system, you can create your own custom metrics to collect specific information about your environment. Creating a custom metric requires two parts: specifying metric parameters in the Metric Catalog and building a trigger to discover, collect, and store custom metric data. In this topic, you will learn how to create a custom metric from the Metric Catalog first and find links to resources for planning and building a trigger.

By creating a custom metric from the Metric Catalog first, you can add the new metric to a dashboard or chart before custom metric data is collected. If you build a trigger for a custom metric first without specifying metric parameters, you might not be able to access the custom metric until data is observed and collected by the ExtraHop system.

The following steps show you how to create a custom metric with the Metric Catalog.

Before you begin

Be aware that the parameters you specify in the Metric Catalog become part of the code that is referenced by a trigger. Parameters such as the metric name and metric type cannot be changed after creating the custom metric in the Metric Catalog. Before you create a custom metric or write a trigger, identify which events and devices are needed to extract the data you need and determine whether a solution already exists. For more information, see Triggers.
  1. Log into the Web UI on the Discover or Command appliance and click the System Settings icon at the top of the page.
  2. Click Metric Catalog.
  3. Click the command menu and select Create Metric Manually.
  4. In the Parameters section, complete the following steps to create the code that will be referenced by a trigger:
    1. In the Metric field, type a unique name for your metric. The trigger method that collects data for your custom metric must reference the exact metric name that you specify in the Metric field. Avoid spaces between words by typing underscores. When defining a detail metric name, specify the detail key in the name by appending the metric name with .by_<key_name_without spaces>, where <key_name_without_spaces> is the key metric name.
    2. In the Source Type field, select a source, or class, from the drop-down list that you want to retrieve data from. For more information about these classes, see General purpose classes in the Trigger API Reference.
    3. In the Metric Type field, select an option from the drop-down list that specifies how data will be stored and viewed in the ExtraHop system. The Metric Type selection appears in triggers as part of the method name, such as metricAddCount or metricAddDataset. For more information, see ExtraHop data types in the Trigger API Reference.
    4. In the Type field, select one of the following options:
    • Select Base Metric. A base, or top-level metric, includes the metric types, count, dataset. The Type selection appears in triggers as part of the method name, for example metricAddDataset.
    • Select Detail Metric. A detail metric consists of key-value pairs, where the key is a string or IP address and the value is a top-level metric type such as a count or dataset metric. The Type selection appears in triggers as part of the method name, for example metricAddDetailDataset.
    Important:Selections made in the Parameters section cannot be changed after you create the custom metric.
  5. In the Display section, complete the following steps to specify metric information that is searchable by ExtraHop users in the ExtraHop Web UI:
    1. In the Name field, type a user-friendly display name for your metric that is displayed in search results and charts in the ExtraHop system. You can include spaces in the display name.
    2. Optional: In the Units field, select an option from the drop-down list if you know the unit of measure to display in a chart for your metric data.
    3. Optional: In the Description field, type information that is displayed with search results for your metric in the ExtraHop system. The custom base metric description is automatically displayed for the detail metric in search results.
    4. Optional: (For detail metrics only) In the Key Label field, type a display name for the set of keys in your metric. For example, you can create the key label, User Agent, for a custom metric that collects requests per HTTP user agent. Key labels do not need to be unique.
  6. Optional: In the Detail Relationships section, complete one of the following steps if you want to associate a custom base metric with a custom detail metric:
    • (For base metrics) In the Detail Metrics field, click the field and search for a custom metric that you want users to view by drilling down from the custom metric. You can leave this blank if you do not want to provide drill-down data for your custom metric.
    • (For detail metrics) In the Base Metric field, select a top-level metric from the drop-down list that you want to associate with your custom detail metric. You can leave this blank if you do not want to associate additional metrics with your custom metric.
  7. When you are satisfied with the parameters, click Create. Your custom metric parameters are added to the ExtraHop system. REST API parameters for your metric appear in the Metric Catalog. You can now search for your metric and add your metric to charts.
    Important:You must build a trigger to discover, collect, and store custom metric data.

Next steps

Published 2017-09-20 23:33