• Home
  • Manage
  • Ownership
  • Ownership app

Ownership app

Latest Dynatrace

The Ownership app enables you to take advantage of prebuilt actions for building workflows that involve querying for the ownership team and related contact information of an entity. With these actions, you can extract ownership data about an entity and integrate with other apps to send Slack notifications or Jira updates to entity owners based on different types of triggers.

Capabilities

The core capabilities of the Ownership app are contained in these prebuilt actions for the Workflows app .

  • get_owners

    Retrieve the associated ownership teams included in the metadata of specified entities.

    This action takes an entity ID as input but can also infer the entity ID based on prior workflow logic.

    You can optionally filter for teams based on responsibilities contained in team definitions (Filter by responsibility).

    Filter owners

  • get_contact_details

    Easily extract team contact details such as email address or Slack channel.

    This action can only come after get_owners in a workflow and takes the output of get_owners as its input ({{result("get_owners")}}). You can optionally filter for the specific type of contact information to retrieve (Filter by contact type).

    Filter contact details

The Ownership app's value lies in the ability to combine these actions with other tasks and actions to create workflows for notifications, task assignment, and other use cases.

Prerequisites

The Ownership app assumes that you have set up ownership teams in Dynatrace and assigned them to monitored entities.

  • The Ownership app requires the following permissions.

    • environment-api:entities:read—Read entities.
    • settings:objects:read—Read settings 2.0 objects.
    • settings:schemas:read—Read settings 2.0 schemas.
  • Additionally, you require the following primary permissions in Workflows.

    Open Workflows and go to Settings > Authorization Settings.

    • app-engine:apps:run—Enables listing and running apps; provides basic access to the Launcher.
    • app-engine:functions:run—Enables use of the function executor.

    Alternatively (in addition to Ownership app permissions), you can set up users with the AppEngine user policy.

Installation

To use Ownership app workflow actions, you first need to install the Ownership app from Dynatrace Hub. Once installed, you can only use the Ownership app via actions in Workflows.

  1. In Dynatrace Hub , search for ownership.
  2. Select the Ownership app and then select Install.

Once installed, you need to use the prebuilt ownership actions from within the Workflows app .

Automation Workflow Creator

Using the Ownership app is best exemplified by the Send logs to the owner of an entity tutorial in the Automation Workflow Creator app. You can save the tutorials in Automation Workflow Creator as notebooks, enabling you to view detailed instructions and run code snippets for sample workflows.

You can use the information in Automation Workflow Creator to get familiar with using prebuilt ownership actions in Workflows . Read more about Automation Workflow Creator in Dynatrace Developer.

  1. In Dynatrace Hub , search for and open Automation Workflow Creator.

    Automation Workflow Creator

  2. Scroll to the Send logs to the owner of an entity sample and select Choose workflow.

    Ownership tutorial

  3. Save the tutorial to a new or existing notebook and select Add.

    Save the tutorial to a notebook

    Your detailed tutorial is now available in Notebooks with detailed instructions, code samples that you can run, and links to a sample workflow.

    Ownership tutorial workbook

  4. Scroll and select the link to the sample workflow Automation Samples: Targeted Notifications that you can modify to suit your purposes.

    Ownership tutorial: link to sample workflow

    Ownership sample workflow

Tutorial steps and sample workflow

This section provides context for and walks you through the Ownership tutorial and sample workflow set up above. The tutorial is saved in Notebooks while the sample workflow is saved in Workflows .

  • Step 1: Assign owners to a host.

    As a prerequisite, you need to have set up ownership and assigned a team to a host in your environment. Read more on the available methods in Assign ownership teams to monitored entities. Note that you can apply a tag for ownership directly on the host overview page—select Owners at the top of the page and then select Add Ownership tag.

    Host owners

  • Step 2: Simulate a host event.

    As an aid to the tutorial, this step simulates a host event of type Custom info; in an actual scenario, the host would experience an event or problem that triggers a workflow.

    In the sample code provided, paste the host ID as shown below and select Run code. You can find the host ID in the URL of the host overview page.

    Simulate a host event

    You can see the event on the Events card of the host overview page.

    Simulated host event

  • Step 3: Fetch events; set up a workflow event trigger.

    Step 3 of the tutorial takes the host ID as input to execute a DQL query that fetches host events of the CUSTOM_INFO type.

    This corresponds to the first task in the Automation Samples: Targeted Notifications sample workflow, which sets up an event-based trigger for the workflow. Insert the host ID as shown and select Query events. The image below shows task output and details for the most recent event.

    Host event trigger for a workflow

  • Step 4: Fetch host logs.

    This tutorial step corresponds to the second task of the sample workflow, in which the get_logs action fetches the last 10 logs for the host. You need to provide the host ID to run the sample code in the tutorial. However, the workflow uses the code {{ event()["dt.entity.host"] }} to fetch logs for the host already defined in the workflow trigger.

  • Step 5: Fetch host ownership information (get_owners and get_contact details actions).

    This tutorial step explains the get_owners and get_contact_details actions in the Automation Samples: Targeted Notifications sample workflow.

    get_owners requires an entity ID as input to fetch associated ownership team information. However, within the sample workflow, get_owners uses the code {{ event()["dt.entity.host"] }} to fetch the teams for the host already defined in the workflow trigger.

    Get owners action

    get_contact_details uses {{result("get_owners")}} to take the output of get_owners as input to fetch team contact information.

    Note

    Insert a separate get_contact_details action for each type of contact information you want to retrieve, for example, one each for Slack and Jira information.

    Get contact details

  • Step 6: Run the sample workflow.

    Before you select Run for your saved sample workflow, execute Step 2 of the tutorial a few times to simulate host events.

    When you have executed your workflow, successful tasks are highlighted in green. Select each ownership action in the execution view to check its output.

    get_owners returns team information in JSON format on the Result tab.

    Successful results for get_owners

    get_contact_details returns the team's Slack contact information in the Result tab.

    Successful results for get_contact_details

  • Step 7: Set up a Slack action for targeted notifications.

    You can extend the sample workflow by integrating with Slack for Workflows to send targeted notifications. Likewise, if you extract Jira contact information for the ownership team, you can integrate with Jira for Workflows for issue creation.

Related topics
  • Introduction to workflows

    General introduction to workflows and related concepts

  • Jira for Workflows

    Automate creating, transitioning, commenting, and assigning Jira issues on the events and schedules defined for your workflows.

  • Slack for Workflows

    Send messages to Slack Workspaces

  • Notebooks

    See the information about Notebooks.