diff --git a/entity-types/infra-ocidynamicroutinggateway/definition.stg.yml b/entity-types/infra-ocidynamicroutinggateway/definition.stg.yml new file mode 100644 index 000000000..ba0624294 --- /dev/null +++ b/entity-types/infra-ocidynamicroutinggateway/definition.stg.yml @@ -0,0 +1,34 @@ +domain: INFRA +type: OCIDYNAMICROUTINGGATEWAY +goldenTags: +- oci.compartmentId +- oci.displayName +- oci.lifecycleState +- oci.region +configuration: + entityExpirationTime: DAILY + alertable: true +synthesis: + tags: + newrelic.cloudIntegrations.providerAccountName: + entityTagNames: [newrelic.cloudIntegrations.providerAccountName, providerAccountName] + multiValue: false + rules: + # DRG metrics are emitted per DRG attachment: dimension resourceId is the DRG + # attachment OCID (ocid1.drgattachment), while drgOcid is the DRG itself + # (ocid1.drg). The entity represents the DRG, so synthesis keys on oci.drgOcid. + # Ref: https://docs.oracle.com/en-us/iaas/Content/Network/Reference/drgmetrics.htm + - ruleName: infra_ocidynamicroutinggateway_oci_drgOcid + identifier: oci.drgOcid + name: oci.drgOcid + legacyFeatures: + overrideGuidType: true + encodeIdentifierInGUID: true + conditions: + - attribute: oci.drgOcid + prefix: "ocid1.drg" + - attribute: oci.namespace + value: "oci_dynamic_routing_gateway" +ownership: + primaryOwner: + teamName: "Cloud Monitoring Platform" diff --git a/entity-types/infra-ocidynamicroutinggateway/golden_metrics.stg.yml b/entity-types/infra-ocidynamicroutinggateway/golden_metrics.stg.yml new file mode 100644 index 000000000..5856110e7 --- /dev/null +++ b/entity-types/infra-ocidynamicroutinggateway/golden_metrics.stg.yml @@ -0,0 +1,36 @@ +bytesToDrgAttachment: + title: Bytes To DRG Attachment + unit: BYTES + queries: + oci: + select: sum(`oci.dynamic.routing.gateway.bytes.to.drg.attachment`) + from: Metric + eventId: entity.guid + eventName: entity.name +bytesFromDrgAttachment: + title: Bytes From DRG Attachment + unit: BYTES + queries: + oci: + select: sum(`oci.dynamic.routing.gateway.bytes.from.drg.attachment`) + from: Metric + eventId: entity.guid + eventName: entity.name +packetDropsToDrgAttachment: + title: Packet Drops To DRG Attachment + unit: COUNT + queries: + oci: + select: sum(`oci.dynamic.routing.gateway.packet.drops.to.drg.attachment`) + from: Metric + eventId: entity.guid + eventName: entity.name +packetDropsFromDrgAttachment: + title: Packet Drops From DRG Attachment + unit: COUNT + queries: + oci: + select: sum(`oci.dynamic.routing.gateway.packet.drops.from.drg.attachment`) + from: Metric + eventId: entity.guid + eventName: entity.name diff --git a/entity-types/infra-ocidynamicroutinggateway/summary_metrics.stg.yml b/entity-types/infra-ocidynamicroutinggateway/summary_metrics.stg.yml new file mode 100644 index 000000000..b83c3a0cb --- /dev/null +++ b/entity-types/infra-ocidynamicroutinggateway/summary_metrics.stg.yml @@ -0,0 +1,21 @@ +providerAccountName: + tag: + key: providerAccountName + title: OCI account + unit: STRING +bytesToDrgAttachment: + goldenMetric: bytesToDrgAttachment + unit: BYTES + title: Bytes To DRG Attachment +bytesFromDrgAttachment: + goldenMetric: bytesFromDrgAttachment + unit: BYTES + title: Bytes From DRG Attachment +packetDropsToDrgAttachment: + goldenMetric: packetDropsToDrgAttachment + unit: COUNT + title: Packet Drops To DRG Attachment +packetDropsFromDrgAttachment: + goldenMetric: packetDropsFromDrgAttachment + unit: COUNT + title: Packet Drops From DRG Attachment diff --git a/entity-types/infra-ocidynamicroutinggateway/tests/Metric.stg.json b/entity-types/infra-ocidynamicroutinggateway/tests/Metric.stg.json new file mode 100644 index 000000000..f0e91ee39 --- /dev/null +++ b/entity-types/infra-ocidynamicroutinggateway/tests/Metric.stg.json @@ -0,0 +1,22 @@ +[ + { + "oci.compartmentId": "ocid1.compartment.oc1..aaaaaaaabbbbbbccccccccdddddddeeeeeeefffffffgggggggghhhhhhhhiiiiiiiiijjjjjjjj", + "oci.namespace": "oci_dynamic_routing_gateway", + "oci.region": "us-ashburn-1", + "oci.resourceId": "ocid1.drgattachment.oc1.iad.aaaaaaaabbbbbbccccccccdddddddeeeeeeefffffffgggggggghhhhhhhhiiiiiiiiijjjjjjjj", + "oci.drgOcid": "ocid1.drg.oc1.iad.aaaaaaaabbbbbbccccccccdddddddeeeeeeefffffffgggggggghhhhhhhhiiiiiiiiikkkkkkkk", + "oci.drgRouteTableId": "ocid1.drgroutetable.oc1.iad.aaaaaaaabbbbbbccccccccdddddddeeeeeeefffffffgggggggghhhhhhhhiiiiiiiiillllllll", + "oci.attachmentType": "VCN", + "oci.displayName": "test-drg", + "oci.lifecycleState": "AVAILABLE", + "collector.name": "oci-monitor", + "displayName": "test-drg", + "instrumentation.provider": "oci", + "metricName": "oci.dynamic.routing.gateway.bytes.to.drg.attachment", + "newrelic.cloudIntegrations.integrationName": "OCI Monitor metrics", + "newrelic.cloudIntegrations.providerAccountId": "1", + "newrelic.cloudIntegrations.providerAccountName": "oci-dev-all-metrics", + "newrelic.source": "metricAPI", + "timestamp": 1746680903 + } +]