User-defined Templates
User-defined templates allow you create a set of tests, alert rules, dashboards, and tags from a single template configuration file that you define. The ThousandEyes platform supports many monitoring scenarios and third-party applications, such as Microsoft 365, Webex, and others using a predefined set of certified templates. You may, however, have additional needs that are not covered. You can use user-defined templates to support monitoring use cases that the ThousandEyes platform doesn't currently offer through its certified offerings. For more information about templates, see Templates.
User-defined templates are temporarily disabled.
Permissions
When you create a template, all users within your account group can have the option to select it when deploying a new test template. To grant access to users in your account group, enable the View Test Templates
permission for each user. Users will also need the "Edit Tests" permission to deploy the templates. If the template has other assets, such as alert rules, tags, or dashboards, users in the account group will also need to have the respective edit permission for each asset type.
Creating a User-defined Template with the ThousandEyes API
If this is your first time using the ThousandEyes API, see Thousand Eyes Developer Reference: Overview to get started.
Using createTestTemplate
createTestTemplate
To create a new template, use the createTestTemplate
endpoint (https://api.thousandeyes.com/v7/tests/templates).
Assets
Templates currently support configuring tags, tests, alert rules, and dashboards. Each of these assets is configured using a schema you can specify in your configuration file. The API documentation for each type of asset is listed in the table below. Examples of each asset's configuration are in the next section, Example Schemas.
The table below lists where you can find a reference to the schema for each type of asset:
Asset Type | Schema Reference Link |
---|---|
Tags (formerly "Labels") | |
Tests | |
Alert Rules | |
Dashboards |
You can also reference the id of another type of asset within each schema you define for each asset. For example, to assign an alert rule asset to a test asset, you can reference the id of a test you are already defining in the configuration file for the template you are creating. Because the ThousandEyes platform creates each template asset type in a specific order, an asset can only reference other assets that are created before it.
The order the ThousandEyes platform creates template assets is:
Tags (formerly "Labels")
Tests
Alert Rules
Dashboards
The following table illustrates which assets of a different type each asset can reference:
Asset Type | Can Reference |
---|---|
Tags | none |
Tests | Tags |
Alert Rules | Tags, Tests |
Dashboards | Tags, Tests, Alert Rules |
Example Schema
The template schema below describes a straightforward Slack monitor that includes an HTTP server, API test, and DNS test. The target is automatically determined from the Slack tenant name, and the DNS test will automatically determine the name servers.
Last updated