Skip to content

Commit

Permalink
[Integration] Add support for syncing cloud resources from Datadog, D…
Browse files Browse the repository at this point in the history
…ynatrace, and New Relic (#1183)
  • Loading branch information
shariff-6 authored Dec 3, 2024
1 parent 782b822 commit f047a06
Show file tree
Hide file tree
Showing 12 changed files with 267 additions and 3 deletions.
64 changes: 64 additions & 0 deletions integrations/datadog/.port/resources/blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -345,5 +345,69 @@
"many": false
}
}
},
{
"identifier": "datadogCloudResource",
"description": "This blueprint represents a cloud resource in Datadog",
"title": "Datadog Cloud Resource",
"icon": "Datadog",
"schema": {
"properties": {
"up": {
"type": "boolean",
"title": "Is Running?",
"description": "Is the host up?"
},
"host_name": {
"type": "string",
"title": "Host Name",
"description": "the name of the host"
},
"description": {
"type": "string",
"title": "Description",
"description": "the host description"
},
"platform": {
"type": "string",
"title": "Platform",
"description": "the host platform"
},
"machine": {
"type": "string",
"title": "Machine",
"description": "The CPU architecture of the host machine (e.g., amd64, x86, x64, arm, arm64)."
},
"cpu_cores": {
"type": "number",
"title": "CPU Cores",
"description": "the host CPU cores"
},
"agent_version": {
"type": "string",
"title": "Datadog Agent Version",
"description": "the Datadog agent version installed on the host"
},
"is_muted": {
"type": "boolean",
"title": "Is Host Muted?",
"description": "Indicates whether alerts for that specific host are temporarily suppressed."
},
"sources": {
"title": "Sources",
"type": "array",
"description": "Source or cloud provider associated with your host."
},
"tags": {
"title": "Tags",
"type": "object",
"description": "Tags associated with the host."
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"relations": {}
}
]
22 changes: 22 additions & 0 deletions integrations/datadog/.port/resources/port-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,25 @@ resources:
timeframe: .__timeframe
relations:
slo: .slo.id
- kind: host
selector:
query: >-
[.sources[] | . as $source | ["azure", "gcp", "gce", "aws"] |
contains([$source])] | any(.)
port:
entity:
mappings:
blueprint: '"datadogCloudResource"'
identifier: .id | tostring
title: .aws_name // .host_name
properties:
up: .up
host_name: .host_name
platform: .meta.platform
is_muted: .is_muted
machine: .meta.machine
description: .description
sources: .sources
cpu_cores: .meta.cpuCores
agent_version: .meta.agent_version
tags: .tags_by_source
8 changes: 8 additions & 0 deletions integrations/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- towncrier release notes start -->

## 0.1.59 (2024-12-2)


### Improvements

- Added support for syncing cloud resources from Datadog.
- Included blueprints and entity mappings for cloud resource ingestion.

## 0.1.58 (2024-11-28)


Expand Down
2 changes: 1 addition & 1 deletion integrations/datadog/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "datadog"
version = "0.1.58"
version = "0.1.59"
description = "Datadog Ocean Integration"
authors = ["Albert Luganga <[email protected]>"]

Expand Down
40 changes: 40 additions & 0 deletions integrations/dynatrace/.port/resources/blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,45 @@
"mirrorProperties": {},
"calculationProperties": {},
"relations": {}
},
{
"identifier": "dynatraceEntityCloudResource",
"description": "This blueprint represents a Dynatrace Entity",
"title": "Dynatrace Cloud Resource",
"icon": "Dynatrace",
"schema": {
"properties": {
"firstSeen": {
"type": "string",
"title": "First Seen",
"description": "The timestamp at which the entity was first seen, in UTC milliseconds.",
"format": "date-time"
},
"lastSeen": {
"type": "string",
"title": "Last Seen",
"description": "The timestamp at which the entity was last seen, in UTC milliseconds.",
"format": "date-time"
},
"type": {
"type": "string",
"title": "Type",
"description": "The type of the entity."
},
"tags": {
"type": "array",
"title": "Tags",
"description": "A list of tags of the entity.",
"items": {
"type": "string"
}
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
]
31 changes: 31 additions & 0 deletions integrations/dynatrace/.port/resources/port-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,34 @@ resources:
evaluatedPercentage: .evaluatedPercentage
evaluationType: .evaluationType
filter: .filter

- kind: entity
selector:
query: 'true'
entityTypes:
- "cloud:gcp:k8s_cluster"
- "cloud:gcp:pubsub_subscription"
- "cloud:gcp:pubsub_topic"
- "cloud:gcp:gcs_bucket"
- "cloud:gcp:gae_app"
- "cloud:aws:acmprivateca"
- "cloud:aws:api_gateway"
- "cloud:aws:app_runner"
- "cloud:aws:appstream"
- "cloud:aws:appsync"
- "cloud:azure:apimanagement:service"
- "cloud:azure:app:containerapps"
- "cloud:azure:app:managedenvironments"
- "cloud:azure:appconfiguration:configurationstores"
- "cloud:azure:appplatform:spring"
port:
entity:
mappings:
identifier: .displayName | gsub(" "; "-")
title: .displayName
blueprint: '"dynatraceEntityCloudResource"'
properties:
firstSeen: .firstSeenTms / 1000 | todate
lastSeen: .lastSeenTms / 1000 | todate
type: .type
tags: .tags[].stringRepresentation
9 changes: 9 additions & 0 deletions integrations/dynatrace/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- towncrier release notes start -->

## 0.1.70 (2024-11-25)


### Improvements

- Added support for syncing cloud resources from Dynatrace.
- Included blueprints and entity mappings for cloud resource ingestion.


## 0.1.69 (2024-11-25)


Expand Down
2 changes: 1 addition & 1 deletion integrations/dynatrace/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dynatrace"
version = "0.1.69"
version = "0.1.70"
description = "An integration used to import Dynatrace resources into Port"
authors = ["Ayodeji Adeoti <<[email protected]>>"]

Expand Down
51 changes: 51 additions & 0 deletions integrations/newrelic/.port/resources/blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,56 @@
"many": false
}
}
},
{
"identifier": "newRelicEntityCloudResource",
"description": "This blueprint represents a New Relic cloud resource entity.",
"title": "New Relic Cloud Resource",
"icon": "NewRelic",
"schema": {
"properties": {
"accountId": {
"type": "string",
"title": "Account ID",
"description": "The New Relic account ID associated with the entity."
},
"domain": {
"type": "string",
"title": "Domain",
"description": "The domain of the entity (e.g., INFRA, APM)."
},
"type": {
"type": "string",
"title": "Entity Type",
"description": "The type of the entity."
},
"infrastructureIntegrationType": {
"type": "string",
"title": "Infrastructure Integration Type",
"description": "The cloud provider integration type."
},
"tags": {
"type": "object",
"title": "Tags",
"description": "Tags associated with the entity."
},
"reporting": {
"type": "boolean",
"title": "Reporting",
"description": "Indicates if the entity is reporting data."
},
"link": {
"type": "string",
"title": "Entity Link",
"description": "A link to the entity in New Relic.",
"format": "url"
}
},
"required": []
},
"relations": {},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {}
}
]
30 changes: 30 additions & 0 deletions integrations/newrelic/.port/resources/port-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,33 @@ resources:
tags: .tags
relations:
newRelicService: .serviceLevel.indicators[0].guid
- kind: entity
selector:
query: 'true'
entityQueryFilter:
type IN (
'AWSEC2INSTANCE',
'AWSS3BUCKET',
'AWSRDSDBINSTANCE',
'AWSLAMBDAFUNCTION',
'AWSELBLOADBALANCER',
'AZUREVIRTUALMACHINE',
'AZURESQLDATABASE',
'GCPCOMPUTEINSTANCE',
'GCPSTORAGEBUCKET',
'GCPSQLDATABASEINSTANCE'
)
port:
entity:
mappings:
identifier: .guid
title: .name
blueprint: '"newRelicEntityCloudResource"'
properties:
accountId: .accountId
domain: .domain
type: .entityType
infrastructureIntegrationType: .type
reporting: .reporting
link: .permalink
tags: .tags
9 changes: 9 additions & 0 deletions integrations/newrelic/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- towncrier release notes start -->

## 0.1.100 (2024-11-25)


### Improvements

- Added support for syncing cloud resources from New Relic.
- Included blueprints and entity mappings for cloud resource ingestion.


## 0.1.99 (2024-11-25)


Expand Down
2 changes: 1 addition & 1 deletion integrations/newrelic/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "newrelic"
version = "0.1.99"
version = "0.1.100"
description = "New Relic Integration"
authors = ["Tom Tankilevitch <[email protected]>"]

Expand Down

0 comments on commit f047a06

Please sign in to comment.