From d0e936963e5abcf32d7c0b3adfa679d0d17eb925 Mon Sep 17 00:00:00 2001 From: kolaarun <146980511+kolaarun@users.noreply.github.com> Date: Tue, 30 Jul 2024 18:41:31 +0530 Subject: [PATCH] feat: Docker Infra container to EXT service (#1711) * feat: Infra container to EXT service relationship * fix: Review comments addressed * fix: Review comments addressed * fix: Review comments addressed --- ..._INFRA-DOCKER_CONTAINER-to-EXT-SERVICE.yml | 30 ---------- .../INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml | 59 +++++++++++++++++++ 2 files changed, 59 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..64c9a1741 --- /dev/null +++ b/relationships/synthesis/INFRA_DOCKER_CONTAINER-to-EXT_SERVICE.yml @@ -0,0 +1,59 @@ +relationships: + # infra metrics from oTel dockerstats receiver + - name: extInfraDockerContainerEXTService + version: "1" + origins: + - OpenTelemetry + conditions: + - attribute: eventType + anyOf: [ "Metric" ] + 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" ] + 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