Create an application through the Trigger API

An application is a user-defined container that you can associate with multiple devices and protocols for a unified view of built-in metrics. The ExtraHop Trigger API enables you to create applications with more complex filters than basic applications. For example, you can write a trigger to apply additional filters for collecting metrics, to create custom application metrics, or to collect metrics from non-L7 traffic.

In the following example, we will show you how to create an application for your web servers that will only collect metrics when the processing time on HTTP responses exceeds 500 milliseconds.

Before you begin

Important:Applications cannot be deleted. The application ID is permanent and cannot be changed.
  1. Log in to the ExtraHop system through https://<extrahop-hostname-or-IP-address>.
  2. Click the System Settings icon and then click Triggers.
  3. Click Create.
  4. Complete the information in the fields for Name, Author, and Description.
  5. In the Events field, type HTTP and then select HTTP_RESPONSE.
  6. Click the Editor tab.
  7. In the Trigger Script textbox, type the following code:
    if (HTTP.processingTime > 500){
        Application("myAppID").commit();
    }

    where "myAppID" is the permanent application ID. The value of "myAppID" is also applied as the display name, which can be modified later in the ExtraHop system.

  8. Click Save and Close.

Next steps

  • The trigger will not run until it is assigned to a device or device group.
  • After you assign the trigger, click Assets > Applications to locate the application with the name you specified in "myAppID" and view metrics collected by the application.
  • Learn more about working with applications:
Last modified 2024-03-27