Datadog
Port's Datadog integration allows you to model Datadog resources in Port and ingest data into them.
Overview
This integration allows you to:
- Map and organize your desired Datadog resources and their metadata in Port (see supported resources below).
- Watch for Datadog object changes (create/update/delete) in real-time, and automatically apply the changes to your software catalog.
Supported Resources
Setup
Choose one of the following installation methods:
- Hosted by Port
- Real-time (Self-hosted)
- Scheduled (CI)
Using this installation option means that the integration will be hosted by Port, with a customizable resync interval to ingest data into Port.
The Hosted by Port
option is currently in beta, and is still undergoing final testing before its official release.
Should you encounter any bugs or functionality issues, please let us know so we can rectify them as soon as possible.
Your help is greatly appreciated! ⭐
Live event support
Currently, live events are not supported for integrations hosted by Port.
Resyncs will be performed periodically every 1 hour by default (can be configured differently after installation), or manually triggered by you via Port's UI.
Therefore, real-time events (including GitOps) will not be ingested into Port immediately.
Support for live events is WIP and will be supported in the near future.
Installation
To install, follow the following steps:
-
Go to the Data sources page of your portal.
-
Click on the
+ Data source
button in the top-right corner. -
Click on the relevant integration in the list.
-
Under
Select your installation method
, chooseHosted by Port
. -
Configure the
integration settings
andapplication settings
as you wish (see below for details).
Application settings
Every integration hosted by Port has the following customizable application settings, which are configurable after installation:
-
Resync interval
: The frequency at which Port will ingest data from the integration. There are various options available, ranging from every 1 hour to once a day. -
Send raw data examples
: A boolean toggle (enabled
by default). If enabled, raw data examples will be sent from the integration to Port. These examples are used when testing your mapping configuration, they allow you to run yourjq
expressions against real data and see the results.
Integration settings
Every integration has its own tool-specific settings, under the Integration settings
section.
Each of these settings has an ⓘ icon next to it, which you can hover over to see a description of the setting.
Port secrets
Some integration settings require sensitive pieces of data, such as tokens.
For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.
When changing such a setting, you will be prompted to choose an existing secret or create a new one:
Port source IP addresses
When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses.
You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:
- Europe (EU)
- United States (US)
54.73.167.226
63.33.143.237
54.76.185.219
3.234.37.33
54.225.172.136
3.225.234.99
Using this installation option means that the integration will be able to update Port in real time using webhooks.
Prerequisites
To install the integration, you need a Kubernetes cluster that the integration's container chart will be deployed to.
Please make sure that you have kubectl
and helm
installed on your machine, and that your kubectl
CLI is connected to the Kubernetes cluster where you plan to install the integration.
If you are having trouble installing this integration, please refer to these troubleshooting steps.
This table summarizes the available parameters for the installation. Set them as you wish in the script below, then copy it and run it in your terminal:
Parameter | Description | Example | Required |
---|---|---|---|
port.clientId | Your port client id | ✅ | |
port.clientSecret | Your port client secret | ✅ | |
port.baseUrl | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ | |
integration.secrets.datadogApiKey | Datadog API key, docs can be found here | ✅ | |
integration.secrets.datadogApplicationKey | Datadog application key, docs can be found here | ✅ | |
integration.config.datadogBaseUrl | The base Datadog host. Defaults to https://api.datadoghq.com. If in EU, use https://api.datadoghq.eu | ✅ | |
integration.secrets.datadogWebhookToken | Datadog webhook token. Learn more | ❌ | |
integration.config.appHost | The host of the Port Ocean app. Used to set up the integration endpoint as the target for webhooks created in Datadog | https://my-ocean-integration.com | ✅ |
Advanced configuration
Parameter | Description |
---|---|
integration.eventListener.type | The event listener type. Read more about event listeners |
integration.type | The integration to be installed |
scheduledResyncInterval | The number of minutes between each resync. When not set the integration will resync for each event listener resync event. Read more about scheduledResyncInterval |
initializePortResources | Default true, When set to true the integration will create default blueprints and the port App config Mapping. Read more about initializePortResources |
sendRawDataExamples | Enable sending raw data examples from the third party API to port for testing and managing the integration mapping. Default is true |
- Helm
- ArgoCD
To install the integration using Helm, run the following command:
helm repo add --force-update port-labs https://port-labs.github.io/helm-charts
helm upgrade --install my-datadog-integration port-labs/port-ocean \
--set port.clientId="PORT_CLIENT_ID" \
--set port.clientSecret="PORT_CLIENT_SECRET" \
--set port.baseUrl="https://api.getport.io" \
--set initializePortResources=true \
--set scheduledResyncInterval=60 \
--set integration.identifier="my-datadog-integration" \
--set integration.type="datadog" \
--set integration.eventListener.type="POLLING" \
--set integration.config.datadogBaseUrl="https://api.datadoghq.com" \
--set integration.secrets.datadogApiKey="<your-datadog-api-key>" \
--set integration.secrets.datadogApplicationKey="<your-datadog-application-key>"
The baseUrl
, port_region
, port.baseUrl
, portBaseUrl
, port_base_url
and OCEAN__PORT__BASE_URL
parameters are used to select which instance or Port API will be used.
Port exposes two API instances, one for the EU region of Port, and one for the US region of Port.
- If you use the EU region of Port (https://app.getport.io), your API URL is
https://api.getport.io
. - If you use the US region of Port (https://app.us.getport.io), your API URL is
https://api.us.getport.io
.
To install the integration using ArgoCD, follow these steps:
- Create a
values.yaml
file inargocd/my-ocean-datadog-integration
in your git repository with the content:
Remember to replace the placeholder for DATADOG_BASE_URL
, DATADOG_API_KEY
and DATADOG_APPLICATION_KEY
.
initializePortResources: true
scheduledResyncInterval: 60
integration:
identifier: my-ocean-datadog-integration
type: datadog
eventListener:
type: POLLING
config:
datadogBaseUrl: DATADOG_BASE_URL
secrets:
datadogApiKey: DATADOG_API_KEY
datadogApplicationKey: DATADOG_APPLICATION_KEY
- Install the
my-ocean-datadog-integration
ArgoCD Application by creating the followingmy-ocean-datadog-integration.yaml
manifest:
Remember to replace the placeholders for YOUR_PORT_CLIENT_ID
YOUR_PORT_CLIENT_SECRET
and YOUR_GIT_REPO_URL
.
Multiple sources ArgoCD documentation can be found here.
ArgoCD Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-ocean-datadog-integration
namespace: argocd
spec:
destination:
namespace: mmy-ocean-datadog-integration
server: https://kubernetes.default.svc
project: default
sources:
- repoURL: 'https://port-labs.github.io/helm-charts/'
chart: port-ocean
targetRevision: 0.1.14
helm:
valueFiles:
- $values/argocd/my-ocean-datadog-integration/values.yaml
parameters:
- name: port.clientId
value: YOUR_PORT_CLIENT_ID
- name: port.clientSecret
value: YOUR_PORT_CLIENT_SECRET
- name: port.baseUrl
value: https://api.getport.io
- repoURL: YOUR_GIT_REPO_URL
targetRevision: main
ref: values
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
The baseUrl
, port_region
, port.baseUrl
, portBaseUrl
, port_base_url
and OCEAN__PORT__BASE_URL
parameters are used to select which instance or Port API will be used.
Port exposes two API instances, one for the EU region of Port, and one for the US region of Port.
- If you use the EU region of Port (https://app.getport.io), your API URL is
https://api.getport.io
. - If you use the US region of Port (https://app.us.getport.io), your API URL is
https://api.us.getport.io
.
- Apply your application manifest with
kubectl
:
kubectl apply -f my-ocean-datadog-integration.yaml
For advanced configuration such as proxies or self-signed certificates, click here.
- GitHub
- Jenkins
- Azure Devops
- GitLab
This workflow will run the Datadog integration once and then exit, this is useful for scheduled ingestion of data.
If you want the integration to update Port in real time using webhooks you should use the Real Time & Always On installation option.
Make sure to configure the following Github Secrets:
Parameter | Description | Example | Required |
---|---|---|---|
port_client_id | Your Port client (How to get the credentials) id | ✅ | |
port_client_secret | Your Port client (How to get the credentials) secret | ✅ | |
port_base_url | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ | |
config -> datadog_base_url | US: https://api.datadoghq.com EU: https://api.datadoghq.eu | ✅ | |
config -> datadog_api_key | Datadog API key, docs can be found here | ✅ | |
config -> datadog_application_key | Datadog application key, docs can be found here | ✅ | |
config -> datadog_webhook_token | Datadog webhook token. Learn more | ❌ | |
initialize_port_resources | Default true, When set to true the integration will create default blueprints and the port App config Mapping. Read more about initializePortResources | ❌ | |
identifier | The identifier of the integration that will be installed | ❌ | |
version | The version of the integration that will be installed | latest | ❌ |
The following example uses the Ocean Sail Github Action to run the Datadog integration. For further information about the action, please visit the Ocean Sail Github Action
Here is an example for datadog-integration.yml
workflow file:
name: Datadog Exporter Workflow
on:
workflow_dispatch:
schedule:
- cron: '0 */1 * * *' # Determines the scheduled interval for this workflow. This example runs every hour.
jobs:
run-integration:
runs-on: ubuntu-latest
timeout-minutes: 30 # Set a time limit for the job
steps:
- uses: port-labs/ocean-sail@v1
with:
type: 'datadog'
port_client_id: ${{ secrets.OCEAN__PORT__CLIENT_ID }}
port_client_secret: ${{ secrets.OCEAN__PORT__CLIENT_SECRET }}
port_base_url: https://api.getport.io
config: |
datadog_base_url: https://api.datadoghq.com
datadog_api_key: ${{ secrets.DATADOG_API_KEY }}
datadog_application_key: ${{ secrets.DATADOG_APP_KEY }}
This pipeline will run the Datadog integration once and then exit, this is useful for scheduled ingestion of data.
Your Jenkins agent should be able to run docker commands.
If you want the integration to update Port in real time using webhooks you should use the Real Time & Always On installation option.
Make sure to configure the following Jenkins Credentials of Secret Text
type:
Parameter | Description | Example | Required |
---|---|---|---|
OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY | Datadog API key, docs can be found here | ✅ | |
OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY | Datadog application key, docs can be found here | ✅ | |
OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL | The base API url | https://api.datadoghq.com / https://api.datadoghq.eu | ✅ |
OCEAN__INTEGRATION__CONFIG__DATADOG_WEBHOOK_TOKEN | Datadog webhook token. Learn more | ❌ | |
OCEAN__PORT__CLIENT_ID | Your Port client (How to get the credentials) id | ✅ | |
OCEAN__PORT__CLIENT_SECRET | Your Port client (How to get the credentials) secret | ✅ | |
OCEAN__PORT__BASE_URL | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ | |
OCEAN__INITIALIZE_PORT_RESOURCES | Default true, When set to true the integration will create default blueprints and the port App config Mapping. Read more about initializePortResources | ❌ | |
OCEAN__INTEGRATION__IDENTIFIER | The identifier of the integration that will be installed | ❌ |
Here is an example for Jenkinsfile
groovy pipeline file:
pipeline {
agent any
stages {
stage('Run Datadog Integration') {
steps {
script {
withCredentials([
string(credentialsId: 'OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY', variable: 'OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY'),
string(credentialsId: 'OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY', variable: 'OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY'),
string(credentialsId: 'OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL', variable: 'OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL'),
string(credentialsId: 'OCEAN__PORT__CLIENT_ID', variable: 'OCEAN__PORT__CLIENT_ID'),
string(credentialsId: 'OCEAN__PORT__CLIENT_SECRET', variable: 'OCEAN__PORT__CLIENT_SECRET'),
]) {
sh('''
#Set Docker image and run the container
integration_type="datadog"
version="latest"
image_name="ghcr.io/port-labs/port-ocean-${integration_type}:${version}"
docker run -i --rm --platform=linux/amd64 \
-e OCEAN__EVENT_LISTENER='{"type":"ONCE"}' \
-e OCEAN__INITIALIZE_PORT_RESOURCES=true \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY=$OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY=$OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL=$OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL \
-e OCEAN__PORT__CLIENT_ID=$OCEAN__PORT__CLIENT_ID \
-e OCEAN__PORT__CLIENT_SECRET=$OCEAN__PORT__CLIENT_SECRET \
-e OCEAN__PORT__BASE_URL='https://api.getport.io' \
$image_name
exit $?
''')
}
}
}
}
}
}
This pipeline will run the Datadog integration once and then exit, this is useful for scheduled ingestion of data.
Your Azure Devops agent should be able to run docker commands. Learn more about agents here.
If you want the integration to update Port in real time using webhooks you should use the Real Time & Always On installation option.
Variable groups store values and secrets you'll use in your pipelines across your project. Learn more
Setting Up Your Credentials
- Create a Variable Group: Name it port-ocean-credentials. Store the required variables from the table.
- Authorize Your Pipeline:
- Go to "Library" -> "Variable groups."
- Find port-ocean-credentials and click on it.
- Select "Pipeline Permissions" and add your pipeline to the authorized list.
Parameter | Description | Example | Required |
---|---|---|---|
OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY | Datadog API key, docs can be found here | ✅ | |
OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY | Datadog application key, docs can be found here | ✅ | |
OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL | The base API url | https://api.datadoghq.com / https://api.datadoghq.eu | ✅ |
OCEAN__INTEGRATION__CONFIG__DATADOG_WEBHOOK_TOKEN | Datadog webhook token. Learn more | ❌ | |
OCEAN__PORT__CLIENT_ID | Your Port client (How to get the credentials) id | ✅ | |
OCEAN__PORT__CLIENT_SECRET | Your Port client (How to get the credentials) secret | ✅ | |
OCEAN__PORT__BASE_URL | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ | |
OCEAN__INITIALIZE_PORT_RESOURCES | Default true, When set to true the integration will create default blueprints and the port App config Mapping. Read more about initializePortResources | ❌ | |
OCEAN__INTEGRATION__IDENTIFIER | The identifier of the integration that will be installed | ❌ |
Here is an example for datadog-integration.yml
pipeline file:
trigger:
- main
pool:
vmImage: "ubuntu-latest"
variables:
- group: port-ocean-credentials
steps:
- script: |
# Set Docker image and run the container
integration_type="datadog"
version="latest"
image_name="ghcr.io/port-labs/port-ocean-$integration_type:$version"
docker run -i --rm \
-e OCEAN__EVENT_LISTENER='{"type":"ONCE"}' \
-e OCEAN__INITIALIZE_PORT_RESOURCES=true \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY=$(OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY) \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY=$(OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY) \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL=$(OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL) \
-e OCEAN__PORT__CLIENT_ID=$(OCEAN__PORT__CLIENT_ID) \
-e OCEAN__PORT__CLIENT_SECRET=$(OCEAN__PORT__CLIENT_SECRET) \
-e OCEAN__PORT__BASE_URL='https://api.getport.io' \
$image_name
exit $?
displayName: "Ingest Data into Port"
This workflow will run the Datadog integration once and then exit, this is useful for scheduled ingestion of data.
If you want the integration to update Port in real time using webhooks you should use the Real Time & Always On installation option.
Make sure to configure the following GitLab variables:
Parameter | Description | Example | Required |
---|---|---|---|
OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY | Datadog API key, docs can be found here | ✅ | |
OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY | Datadog application key, docs can be found here | ✅ | |
OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL | The base API url | https://api.datadoghq.com / https://api.datadoghq.eu | ✅ |
OCEAN__INTEGRATION__CONFIG__DATADOG_WEBHOOK_TOKEN | Datadog webhook token. Learn more | ❌ | |
OCEAN__PORT__CLIENT_ID | Your Port client (How to get the credentials) id | ✅ | |
OCEAN__PORT__CLIENT_SECRET | Your Port client (How to get the credentials) secret | ✅ | |
OCEAN__PORT__BASE_URL | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ | |
OCEAN__INITIALIZE_PORT_RESOURCES | Default true, When set to true the integration will create default blueprints and the port App config Mapping. Read more about initializePortResources | ❌ | |
OCEAN__INTEGRATION__IDENTIFIER | The identifier of the integration that will be installed | ❌ |
Here is an example for .gitlab-ci.yml
pipeline file:
default:
image: docker:24.0.5
services:
- docker:24.0.5-dind
before_script:
- docker info
variables:
INTEGRATION_TYPE: datadog
VERSION: latest
stages:
- ingest
ingest_data:
stage: ingest
variables:
IMAGE_NAME: ghcr.io/port-labs/port-ocean-$INTEGRATION_TYPE:$VERSION
script:
- |
docker run -i --rm --platform=linux/amd64 \
-e OCEAN__EVENT_LISTENER='{"type":"ONCE"}' \
-e OCEAN__INITIALIZE_PORT_RESOURCES=true \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY=$OCEAN__INTEGRATION__CONFIG__DATADOG_API_KEY \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY=$OCEAN__INTEGRATION__CONFIG__DATADOG_APPLICATION_KEY \
-e OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL=$OCEAN__INTEGRATION__CONFIG__DATADOG_BASE_URL \
-e OCEAN__PORT__CLIENT_ID=$OCEAN__PORT__CLIENT_ID \
-e OCEAN__PORT__CLIENT_SECRET=$OCEAN__PORT__CLIENT_SECRET \
-e OCEAN__PORT__BASE_URL='https://api.getport.io' \
$IMAGE_NAME
rules: # Run only when changes are made to the main branch
- if: '$CI_COMMIT_BRANCH == "main"'
The baseUrl
, port_region
, port.baseUrl
, portBaseUrl
, port_base_url
and OCEAN__PORT__BASE_URL
parameters are used to select which instance or Port API will be used.
Port exposes two API instances, one for the EU region of Port, and one for the US region of Port.
- If you use the EU region of Port (https://app.getport.io), your API URL is
https://api.getport.io
. - If you use the US region of Port (https://app.us.getport.io), your API URL is
https://api.us.getport.io
.
For advanced configuration such as proxies or self-signed certificates, click here.
Configuration
Port integrations use a YAML mapping block to ingest data from the third-party api into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
Examples
To view and test the integration's mapping against examples of the third-party API responses, use the jq playground in your data sources page. Find the integration in the list of data sources and click on it to open the playground.
Additional examples of blueprints and the relevant integration configurations can be found on the datadog examples page
Relevant Guides
For relevant guides and examples, see the guides section.
Alternative installation via webhook
While the Ocean integration described above is the recommended installation method, you may prefer to use a webhook to ingest alerts and monitor data from Datadog. If so, use the following instructions:
Note that when using this method, data will be ingested into Port only when the webhook is triggered.
Webhook installation (click to expand)
Port configuration
Create the following blueprint definitions:
Datadog microservice blueprint
{
"identifier": "microservice",
"title": "Microservice",
"icon": "Service",
"schema": {
"properties": {
"description": {
"title": "Description",
"type": "string"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"relations": {}
}
Datadog alert/monitor blueprint
{
"identifier": "datadogAlert",
"description": "This blueprint represents a Datadog monitor/alert in our software catalog",
"title": "Datadog Alert",
"icon": "Datadog",
"schema": {
"properties": {
"url": {
"type": "string",
"format": "url",
"title": "Event URL"
},
"message": {
"type": "string",
"title": "Details"
},
"eventType": {
"type": "string",
"title": "Event Type"
},
"priority": {
"type": "string",
"title": "Metric Priority"
},
"creator": {
"type": "string",
"title": "Creator"
},
"alertMetric": {
"type": "string",
"title": "Alert Metric"
},
"alertType": {
"type": "string",
"title": "Alert Type",
"enum": ["error", "warning", "success", "info"]
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"title": "Tags"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"relations": {
"microservice": {
"title": "Services",
"target": "microservice",
"required": false,
"many": false
}
}
}
Create the following webhook configuration using Port UI:
Datadog webhook configuration
-
Basic details tab - fill the following details:
- Title :
Datadog Alert Mapper
; - Identifier :
datadog_alert_mapper
; - Description :
A webhook configuration for alerts/monitors events from Datadog
; - Icon :
Datadog
;
- Title :
-
Integration configuration tab - fill the following JQ mapping:
[
{
"blueprint": "datadogAlert",
"entity": {
"identifier": ".body.alert_id | tostring",
"title": ".body.title",
"properties": {
"url": ".body.event_url",
"message": ".body.message",
"eventType": ".body.event_type",
"priority": ".body.priority",
"creator": ".body.creator",
"alertMetric": ".body.alert_metric",
"alertType": ".body.alert_type",
"tags": ".body.tags | split(\", \")"
},
"relations": {
"microservice": ".body.service"
}
}
}
] -
Click Save at the bottom of the page.
The webhook configuration's relation mapping will function properly only when the identifiers of the Port microservice entities match the names of the services or hosts in your Datadog.
Create a webhook in Datadog
- Log in to Datadog with your credentials.
- Click on Integrations at the left sidebar of the page.
- Search for Webhooks in the search box and select it.
- Go to the Configuration tab and follow the installation instructions.
- Click on New.
- Input the following details:
-
Name
- use a meaningful name such as Port_Webhook. -
URL
- enter the value of theurl
key you received after creating the webhook configuration. -
Payload
- When an alert is triggered on your monitors, this payload will be sent to the webhook URL. You can enter this JSON placeholder in the textbox:{
"id": "$ID",
"message": "$TEXT_ONLY_MSG",
"priority": "$PRIORITY",
"last_updated": "$LAST_UPDATED",
"event_type": "$EVENT_TYPE",
"event_url": "$LINK",
"service": "$HOSTNAME",
"creator": "$USER",
"title": "$EVENT_TITLE",
"date": "$DATE",
"org_id": "$ORG_ID",
"org_name": "$ORG_NAME",
"alert_id": "$ALERT_ID",
"alert_metric": "$ALERT_METRIC",
"alert_status": "$ALERT_STATUS",
"alert_title": "$ALERT_TITLE",
"alert_type": "$ALERT_TYPE",
"tags": "$TAGS"
} -
Custom Headers
- configure any custom HTTP header to be added to the webhook event. The format for the header should be in JSON.
-
- Click Save at the bottom of the page.
To view the different payloads and structure of the events in Datadog webhooks, look here.
Done! Any problem detected on your Datadog instance will trigger a webhook event. Port will parse the events according to the mapping and update the catalog entities accordingly.
Let's Test It
This section includes a sample response data from Datadog. In addition, it includes the entity created from the resync event based on the Ocean configuration provided in the previous section.
Payload
Here is an example of the payload structure from Datadog:
Webhook response data (Click to expand)
{
"id": "1234567890",
"message": "This is a test message",
"priority": "normal",
"last_updated": "2022-01-01T00:00:00+00:00",
"event_type": "triggered",
"event_url": "https://app.datadoghq.com/event/jump_to?event_id=1234567890",
"service": "my-service",
"creator": "rudy",
"title": "[Triggered] [Memory Alert]",
"date": "1406662672000",
"org_id": "123456",
"org_name": "my-org",
"alert_id": "1234567890",
"alert_metric": "system.load.1",
"alert_status": "system.load.1 over host:my-host was > 0 at least once during the last 1m",
"alert_title": "[Triggered on {host:ip-012345}] Host is Down",
"alert_type": "error",
"tags": "monitor, name:myService, role:computing-node"
}
Mapping Result
The combination of the sample payload and the Ocean configuration generates the following Port entity:
Alert entity in Port (Click to expand)
{
"identifier": "1234567890",
"title": "[Triggered] [Memory Alert]",
"blueprint": "datadogAlert",
"team": [],
"icon": "Datadog",
"properties": {
"url": "https://app.datadoghq.com/event/jump_to?event_id=1234567890",
"message": "This is a test message",
"eventType": "triggered",
"priority": "normal",
"creator": "rudy",
"alertMetric": "system.load.1",
"alertType": "error",
"tags": "monitor, name:myService, role:computing-node"
},
"relations": {
"microservice": "my-service"
},
"createdAt": "2024-2-6T09:30:57.924Z",
"createdBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW",
"updatedAt": "2024-2-6T11:49:20.881Z",
"updatedBy": "hBx3VFZjqgLPEoQLp7POx5XaoB0cgsxW"
}
Ingest service level objectives (SLOs)
This guide will walk you through the steps to ingest Datadog SLOs into Port. By following these steps, you will be able to create a blueprint for a microservice
entity in Port, representing a service in your Datadog account. Furthermore, you will establish a relation between this service and the datadogSLO
blueprint, allowing the ingestion of all defined SLOs from your Datadog account.
The provided example demonstrates how to pull data from Datadog's REST API at scheduled intervals using GitLab Pipelines and report the data to Port.
Ingest service dependency from your APM
In this example, you will create a service
blueprint that ingests all services and their related dependencies in your Datadog APM using REST API. You will then add some shell script to create new entities in Port every time GitLab CI is triggered by a schedule.
Ingest service catalog
In this example, you will create a datadogServiceCatalog
blueprint that ingests all service catalogs from your Datadog account. You will then add some python script to make API calls to Datadog REST API and fetch data for your account.