Extend built-in unified analysis pages
If your extension supplies additional data for a default entity with its own unified analysis page, you can extend the page using card injections. Examples of built-in unified analysis pages are the host overview page or any unified analysis Kubernetes page. Card injections are available since Dynatrace version 1.233.
Define card injection
The configuration of a card injection is similar to the configuration of the page layout itself with one significant modification: injected cards are ordered alphabetically by their key, which should use a well-specified key prefix. This ensures that unrelated data supplied by different extensions won't be mixed on a unified analysis page. Injections can be added under the
listInjections sections of the screen configuration.
1detailsInjections:2 - type: CHART_GROUP3 key: my-host-feature-windows-only-chart4 conditions:5 - entityAttribute|osType=WINDOWS6 - type: CHART_GROUP7 key: my-host-feature-chart18 - type: CHART_GROUP9 key: my-host-feature-chart210 - type: CHART_GROUP11 key: my-host-feature-process-chart12 entitySelectorTemplate: type(PROCESS_GROUP_INSTANCE), fromRelationships.isProcessOf($(entityConditions))13 width: HALF_SIZE
The following options are available for a card supplied by your extension:
type: Card type available to be supplied to a unified analysis page. Supported types include
key: Unique card key used to reference the desired card configuration. Use a well-specified key prefix to ensure that related cards are placed properly on a page. Cards are sorted alphabetically based on key.
entitySelectorTemplate: An entity selector that is used to reference cards from another monitored entity type. For more information, see Environment API v2 - Entity selector.
It can serve multiple purposes—selecting the entity where the chart will be displayed and filtering them based on certain rules or relating entities. It is used in conjunction with
entityTypeto further refine which entities are applicable for the card. For example, if
HOST, you can use
entitySelectorTemplateto show the card only for hosts using a certain operating system.
$entityConditionsacts as a dynamic placeholder, adapting to the context in which the card appears. For example, when the card is displayed on a page dedicated to a specific host,
$entityConditionswill automatically adjust to conditions applicable to that host.
For example, when the card with the following configuration is displayed on the host page.1"entitySelectorTemplate": "type(NETWORK_INTERFACE) AND fromRelationships.isNetworkInterfaceOf($(entityConditions))"
$(entityConditions)placeholder will be automatically replaced to point to the specific host entity.1"entitySelectorTemplate": "type(NETWORK_INTERFACE) AND fromRelationships.isNetworkInterfaceOf(type(HOST) AND entityId(HOST-<id>))"
width: Determines how wide that card is in relation to the page width. Supported values are
conditions: A list of conditions that need to be fulfilled for the card to be visible.
Reference card injection
As a final step, you need to reference the card to be injected on a built-in unified analysis page with an Extensions 2.0 package and place it in your
extension.yaml file in the
screens section. In this example, we extend the built-in host overview page (
1name: custom:com.ua.example.extension2version: 1.0.03minDynatraceVersion: 1.233.04author:5 name: StackEnterprise67# Here comes your usual extension YAML content: data source, declarative metrics, topology, etc.89screens:10 - entityType: HOST11 detailsInjections:12 - type: CHART_GROUP13 key: my-host-feature-windows-only-chart14 conditions:15 - entityAttribute|osType=WINDOWS16 - type: CHART_GROUP17 key: my-host-feature-chart118 - type: CHART_GROUP19 key: my-host-feature-chart220 - type: CHART_GROUP21 key: my-host-feature-process-chart22 entitySelectorTemplate: type(PROCESS_GROUP_INSTANCE), fromRelationships.isProcessOf($(entityConditions))23 width: HALF_SIZE24 chartsCards:25 - key: my-host-feature-windows-only-chart26 ...27 - key: my-host-feature-chart128 ...29 - key: my-host-feature-chart230 ...31 - entityType: PROCESS_GROUP_INSTANCE32 chartsCards:33 - key: my-host-feature-process-chart34 ...