Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions entity-types/infra-ocivpn/definition.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
domain: INFRA
type: OCIVPN
goldenTags:
- oci.compartmentId
- oci.region
- oci.displayName
- oci.lifecycleState
- oci.cpeId
- oci.drgId
configuration:
entityExpirationTime: DAILY
alertable: true
synthesis:
tags:
newrelic.cloudIntegrations.providerAccountName:
entityTagNames: [newrelic.cloudIntegrations.providerAccountName, providerAccountName]
multiValue: false
rules:
# Metrics path: oci_vpn metrics carry `parentResourceId` (the IPSec connection OCID)
# and `publicIp` (per-tunnel) — there is NO `resourceId` dimension.
# Ref: https://docs.oracle.com/en-us/iaas/Content/Network/Reference/ipsecmetrics.htm
- ruleName: infra_ocivpn_oci_parentResourceId
identifier: oci.parentResourceId
# Raw oci_vpn metrics have no name dimension; fall back to the connection OCID.
# The inventory rule below (same OCID value => same GUID) supplies the friendly name.
name: oci.parentResourceId
legacyFeatures:
overrideGuidType: true
encodeIdentifierInGUID: true
conditions:
- attribute: oci.parentResourceId
prefix: "ocid1.ipsecconnection"
- attribute: oci.namespace
value: "oci_vpn"
# Inventory path: beyond-workers polling feeds `oci.resourceId` (connection OCID) +
# `oci.resourceName`. Same OCID value as parentResourceId above => same entity GUID.
- ruleName: infra_ocivpn_oci_resourceId
identifier: oci.resourceId
name: oci.resourceName
legacyFeatures:
overrideGuidType: true
encodeIdentifierInGUID: true
conditions:
- attribute: oci.resourceId
prefix: "ocid1.ipsecconnection"
- attribute: oci.namespace
value: "oci_vpn"
ownership:
primaryOwner:
teamName: "Cloud Monitoring Platform"
36 changes: 36 additions & 0 deletions entity-types/infra-ocivpn/golden_metrics.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
tunnelState:
title: IPSec Tunnel State (Up=1 / Down=0)
unit: COUNT
queries:
oci:
select: average(oci.vpn.tunnel.state)
from: Metric
eventId: entity.guid
eventName: entity.name
bytesSent:
title: Bytes Sent
unit: BYTES
queries:
oci:
select: sum(oci.vpn.bytes.sent)
from: Metric
eventId: entity.guid
eventName: entity.name
bytesReceived:
title: Bytes Received
unit: BYTES
queries:
oci:
select: sum(oci.vpn.bytes.received)
from: Metric
eventId: entity.guid
eventName: entity.name
packetsError:
title: Packets with Errors
unit: COUNT
queries:
oci:
select: sum(oci.vpn.packets.error)
from: Metric
eventId: entity.guid
eventName: entity.name
21 changes: 21 additions & 0 deletions entity-types/infra-ocivpn/summary_metrics.stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
providerAccountName:
tag:
key: providerAccountName
title: OCI account
unit: STRING
tunnelState:
goldenMetric: tunnelState
unit: COUNT
title: IPSec Tunnel State (Up=1 / Down=0)
bytesSent:
goldenMetric: bytesSent
unit: BYTES
title: Bytes Sent
bytesReceived:
goldenMetric: bytesReceived
unit: BYTES
title: Bytes Received
packetsError:
goldenMetric: packetsError
unit: COUNT
title: Packets with Errors
30 changes: 30 additions & 0 deletions entity-types/infra-ocivpn/tests/Metric.stg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"oci.compartmentId": "ocid1.compartment.oc1..exampleuniqueID",
"oci.namespace": "oci_vpn",
"oci.region": "us-ashburn-1",
"oci.parentResourceId": "ocid1.ipsecconnection.oc1.us-ashburn-1.exampleuniqueID",
"oci.publicIp": "203.0.113.10",
"collector.name": "oci-metric-streams",
"instrumentation.provider": "oci",
"metricName": "oci.vpn.tunnel.state",
"newrelic.cloudIntegrations.integrationName": "OCI Monitor metrics",
"newrelic.cloudIntegrations.providerAccountName": "oci-dev-all-metrics"
},
{
"oci.compartmentId": "ocid1.compartment.oc1..exampleuniqueID",
"oci.namespace": "oci_vpn",
"oci.region": "us-ashburn-1",
"oci.resourceId": "ocid1.ipsecconnection.oc1.us-ashburn-1.exampleuniqueID",
"oci.resourceName": "test-vpn",
"oci.displayName": "test-vpn",
"oci.lifecycleState": "AVAILABLE",
"oci.cpeId": "ocid1.cpe.oc1.us-ashburn-1.exampleuniqueCpeID",
"oci.drgId": "ocid1.drg.oc1.us-ashburn-1.exampleuniqueDrgID",
"collector.name": "oci-metric-streams",
"instrumentation.provider": "oci",
"metricName": "oci.vpn.bytes.sent",
"newrelic.cloudIntegrations.integrationName": "OCI Monitor metrics",
"newrelic.cloudIntegrations.providerAccountName": "oci-dev-all-metrics"
}
]
Loading