Skip to content

Commit 3deb953

Browse files
authored
chore: Add OCI compute metrics as host metrics (#2108)
* Add OCI compute metrics as host metrics * fix entity bot error * Add eventType check to oci host synthesis rule
1 parent 1693e4f commit 3deb953

File tree

10 files changed

+34
-196
lines changed

10 files changed

+34
-196
lines changed

entity-types/infra-host/definition.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ goldenTags:
1313
- azure.resourceGroup
1414
- gcp.zone
1515
- gcp.projectId
16+
- oci.compartmentId
17+
- oci.region
18+
- oci.availabilityDomain
1619
# opentelemetry semantic conventions for cloud instances
1720
- cloud.provider
1821
- cloud.account.id
@@ -521,6 +524,17 @@ synthesis:
521524
aws.Arn:
522525
# Used in AWSEC2.yml for entity relationship candidates
523526
aws.ec2.InstanceId:
527+
528+
- identifier: oci.resourceId
529+
name: oci.resourceDisplayName
530+
legacyFeatures:
531+
overrideGuidType: true
532+
encodeIdentifierInGUID: true
533+
conditions:
534+
- attribute: oci.resourceId
535+
prefix: "ocid1.instance"
536+
- attribute: eventType
537+
value: Metric
524538
configuration:
525539
entityExpirationTime: EIGHT_DAYS
526540
alertable: true

entity-types/infra-host/golden_metrics.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ cpuUsage:
4545
from: GcpVirtualMachineSample
4646
eventId: entityGuid
4747
eventName: entityName
48+
oci:
49+
select: average(`oci.computeagent.cpu.utilization`)
50+
from: Metric
51+
eventId: entity.guid
52+
eventName: entity.name
4853
memoryUsage:
4954
title: Memory usage (%)
5055
unit: PERCENTAGE
@@ -65,6 +70,11 @@ memoryUsage:
6570
from: Metric
6671
eventId: entity.guid
6772
eventName: entity.name
73+
oci:
74+
select: average(`oci.computeagent.memory.utilization`)
75+
from: Metric
76+
eventId: entity.guid
77+
eventName: entity.name
6878
storageUsage:
6979
title: Storage usage (%)
7080
unit: PERCENTAGE
@@ -135,6 +145,11 @@ networkTrafficTx:
135145
from: GcpVirtualMachineSample
136146
eventId: entityGuid
137147
eventName: entityName
148+
oci:
149+
select: average(`oci.computeagent.network.bytes.out`)
150+
from: Metric
151+
eventId: entity.guid
152+
eventName: entity.name
138153
networkTrafficRx:
139154
title: Network receive traffic (bytes/s)
140155
unit: BYTES_PER_SECOND
@@ -183,3 +198,8 @@ networkTrafficRx:
183198
from: GcpVirtualMachineSample
184199
eventId: entityGuid
185200
eventName: entityName
201+
oci:
202+
select: average(`oci.computeagent.network.bytes.in`)
203+
from: Metric
204+
eventId: entity.guid
205+
eventName: entity.name

entity-types/infra-ocicomputeagent/definition.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

entity-types/infra-ocicomputeagent/golden_metrics.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

entity-types/infra-ocicomputeagent/summary_metrics.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

entity-types/infra-ocicomputeagent/tests/Metric.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

entity-types/infra-ocicomputeinstancehealth/definition.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

entity-types/infra-ocicomputeinstancehealth/golden_metrics.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

entity-types/infra-ocicomputeinstancehealth/summary_metrics.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

entity-types/infra-ocicomputeinstancehealth/tests/Metric.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)