From eac4159f9de7a931c6c56d2e76d36ef0d33cb416 Mon Sep 17 00:00:00 2001 From: akola Date: Sat, 27 Jul 2024 01:21:07 +0530 Subject: [PATCH 1/4] feat: Infra container to EXT service relationship --- ...FRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml diff --git a/relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml b/relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml new file mode 100644 index 000000000..4ecf7b154 --- /dev/null +++ b/relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml @@ -0,0 +1,32 @@ +relationships: + - name: nrInfraDockerContainerEXTService + version: "1" + origins: + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: [ "Metric" ] + - attribute: entity.type + anyOf: ["SERVICE"] + relationship: + expires: P75M + relationshipType: HOSTS + source: + buildGuid: + account: + attribute: accountId + domain: + value: INFRA + type: + value: CONTAINER + valueInGuid: NA + identifier: + fragments: + value: "docker:" + - attribute: container.id + hashAlgorithm: FARM_HASH + target: + extractGuid: + attribute: entity.guid + entityType: + attribute: entity.type \ No newline at end of file From 2c1ac8b9aba30dbbf3a281cb24861a678f622473 Mon Sep 17 00:00:00 2001 From: akola Date: Mon, 29 Jul 2024 20:32:53 +0530 Subject: [PATCH 2/4] fix: Review comments addressed --- ..._INFRA-DOCKER_CONTAINER-to-EXT-SERVICE.yml | 30 --------- .../INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml | 63 +++++++++++++++++++ 2 files changed, 63 insertions(+), 30 deletions(-) delete mode 100644 relationships/synthesis/EXT_INFRA-DOCKER_CONTAINER-to-EXT-SERVICE.yml create mode 100644 relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml diff --git a/relationships/synthesis/EXT_INFRA-DOCKER_CONTAINER-to-EXT-SERVICE.yml b/relationships/synthesis/EXT_INFRA-DOCKER_CONTAINER-to-EXT-SERVICE.yml deleted file mode 100644 index e0336b4cd..000000000 --- a/relationships/synthesis/EXT_INFRA-DOCKER_CONTAINER-to-EXT-SERVICE.yml +++ /dev/null @@ -1,30 +0,0 @@ -relationships: - - name: extInfraDockerContainerEXTService - version: "1" - origins: - - OpenTelemetry - conditions: - - attribute: eventType - anyOf: [ "Metric" ] - - attribute: entity.type - anyOf: ["SERVICE"] - relationship: - expires: P75M - relationshipType: HOSTS - source: - buildGuid: - account: - attribute: accountId - domain: - value: INFRA - type: - value: CONTAINER - identifier: - fragments: - - attribute: container.id - hashAlgorithm: FARM_HASH - target: - extractGuid: - attribute: entity.guid - entityType: - attribute: entity.type diff --git a/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml b/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml new file mode 100644 index 000000000..4dd9a8196 --- /dev/null +++ b/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml @@ -0,0 +1,63 @@ +relationships: + # infra metrics from oTel dockerstats receiver + - name: extInfraDockerContainerEXTService + version: "1" + origins: + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: [ "Metric" ] + - attribute: entity.type + anyOf: ["SERVICE"] + relationship: + expires: P75M + relationshipType: HOSTS + source: + buildGuid: + account: + attribute: accountId + domain: + value: INFRA + type: + value: CONTAINER + identifier: + fragments: + - attribute: container.id + hashAlgorithm: FARM_HASH + target: + extractGuid: + attribute: entity.guid + entityType: + value: "SERVICE" + # infra metrics from NR infra agent + - name: nrInfraDockerContainerEXTService + version: "1" + origins: + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: [ "Metric" ] + - attribute: entity.type + anyOf: ["SERVICE"] + relationship: + expires: P75M + relationshipType: HOSTS + source: + buildGuid: + account: + attribute: accountId + domain: + value: INFRA + type: + value: CONTAINER + valueInGuid: NA + identifier: + fragments: + value: "docker:" + - attribute: container.id + hashAlgorithm: FARM_HASH + target: + extractGuid: + attribute: entity.guid + entityType: + value: "SERVICE" \ No newline at end of file From 27d50f70d90ad7ffd07365a6c82e03b285dc3c4d Mon Sep 17 00:00:00 2001 From: akola Date: Mon, 29 Jul 2024 20:39:20 +0530 Subject: [PATCH 3/4] fix: Review comments addressed --- ...FRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml | 32 ------------------- .../INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml diff --git a/relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml b/relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml deleted file mode 100644 index 4ecf7b154..000000000 --- a/relationships/synthesis/INFRA-NR_DOCKER_CONTAINER-to-EXT-SERVICE.yml +++ /dev/null @@ -1,32 +0,0 @@ -relationships: - - name: nrInfraDockerContainerEXTService - version: "1" - origins: - - OpenTelemetry - conditions: - - attribute: eventType - anyOf: [ "Metric" ] - - attribute: entity.type - anyOf: ["SERVICE"] - relationship: - expires: P75M - relationshipType: HOSTS - source: - buildGuid: - account: - attribute: accountId - domain: - value: INFRA - type: - value: CONTAINER - valueInGuid: NA - identifier: - fragments: - value: "docker:" - - attribute: container.id - hashAlgorithm: FARM_HASH - target: - extractGuid: - attribute: entity.guid - entityType: - attribute: entity.type \ No newline at end of file diff --git a/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml b/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml index 4dd9a8196..6de769db2 100644 --- a/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml +++ b/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml @@ -53,7 +53,7 @@ relationships: valueInGuid: NA identifier: fragments: - value: "docker:" + - value: "docker:" - attribute: container.id hashAlgorithm: FARM_HASH target: From 0dd9afd339f5a58e50481335f236479c64312d14 Mon Sep 17 00:00:00 2001 From: akola Date: Mon, 29 Jul 2024 20:50:10 +0530 Subject: [PATCH 4/4] fix: Review comments addressed --- .../synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml b/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml index 6de769db2..64c9a1741 100644 --- a/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml +++ b/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml @@ -7,8 +7,6 @@ relationships: conditions: - attribute: eventType anyOf: [ "Metric" ] - - attribute: entity.type - anyOf: ["SERVICE"] relationship: expires: P75M relationshipType: HOSTS @@ -37,8 +35,6 @@ relationships: conditions: - attribute: eventType anyOf: [ "Metric" ] - - attribute: entity.type - anyOf: ["SERVICE"] relationship: expires: P75M relationshipType: HOSTS