Skip to content

Commit

Permalink
feat: add VSPHEREVM to HOST relationship (#1616)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigilioso committed May 17, 2024
1 parent 47d4bd1 commit 9b43174
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
15 changes: 14 additions & 1 deletion relationships/candidates/HOST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,17 @@ lookups:
onMiss:
action: CREATE_UNINSTRUMENTED
uninstrumented:
type: HOST
type: HOST

- entityTypes:
- domain: INFRA
type: HOST
tags:
matchingMode: ANY
predicates:
- tagKeys: ["hostname"]
field: onHostEntityHostname
onMatch:
onMultipleMatches: RELATE_ALL
onMiss:
action: NO_OP
30 changes: 30 additions & 0 deletions relationships/synthesis/INFRA-VSPHEREVM-to-INFRA-HOST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
relationships:
- name: vsphereVMContainsHost
version: "1"
origins:
- OnHost Integration
conditions:
- attribute: eventType
anyOf: ["VSphereVmSample"]
- attribute: vmHostname
present: true
# This additional attribute is required because the relationship doesn't apply to every environment
# (the VSPHEREVM vmHostname and the HOST hostname don't match in every scenario).
# Adding this label to VSphereVmSamples means that a relationship between the VSPHEREVM entity and the
# HOST entity whose hostname matches the vmHostname is expected.
- attribute: label.enableVMHostNameRelationship
present: true
relationship:
expires: P75M
relationshipType: CONTAINS
source:
extractGuid:
attribute: entityGuid
entityType:
value: VSPHEREVM
target:
lookupGuid:
candidateCategory: HOST
fields:
- field: onHostEntityHostname
attribute: vmHostname

0 comments on commit 9b43174

Please sign in to comment.