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
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"azureDiskName": "",
"capacityBytes": 5368709120,
"cloudProvider": "cloud",
"clusterName": "demo-cluster",
"createdAt": 1768305251,
"csiDriver": "disk.csi.demo.com",
"csiVolumeHandle": "/subscriptions/ANONYMIZED/resourceGroups/demo-cluster/providers/Microsoft.Compute/disks/pvc-ANONYMIZED",
"displayName": "pvc-ANONYMIZED",
"ebsVolumeId": "",
"entityGuid": "ANONYMIZED_GUID",
"entityId": "1234567890123456789",
"entityKey": "k8s:demo-cluster:PersistentVolume:pvc-ANONYMIZED",
"entityName": "k8s:demo-cluster:PersistentVolume:pvc-ANONYMIZED",
"entityType": "KUBERNETES_PERSISTENTVOLUME",
"eventType": "K8sPersistentVolumeSample",
"externalKey": "k8s:demo-cluster:PersistentVolume:pvc-ANONYMIZED",
"fcLun": "",
"fcTargetWwns": "",
"fcWwids": "",
"gcePersistentDiskName": "",
"hostPath": "",
"hostPathType": "",
"integrationName": "com.newrelic.kubernetes",
"integrationVersion": "3.45.2",
"iscsiInitiatorName": "",
"iscsiIqn": "",
"iscsiLun": "",
"iscsiTargetPortal": "",
"label.environment": "production",
"localFs": "",
"localPath": "",
"nfsPath": "",
"nfsServer": "",
"nr.ingestTimeMs": 1773000000000,
"nr.invalidAttributeCount": 2,
"pvcName": "demo-pvc",
"pvcNamespace": "demo-ns",
"reportingAgent": "anonymized-agent",
"statusPhase": "Bound",
"storageClass": "demo-storage-class",
"timestamp": 1773000000000,
"volumeName": "pvc-ANONYMIZED"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[
{
"accessMode": "ReadWriteOnce",
"cloudProvider": "cloud",
"clusterName": "demo-cluster",
"createdAt": 1768305251,
"displayName": "demo-pvc",
"entityGuid": "ANONYMIZED_GUID",
"entityId": "1234567890123456789",
"entityKey": "k8s:demo-cluster:demo-ns:PersistentVolumeClaim:demo-pvc",
"entityName": "k8s:demo-cluster:demo-ns:PersistentVolumeClaim:demo-pvc",
"entityType": "KUBERNETES_PERSISTENTVOLUMECLAIM",
"event_type": "K8sPersistentVolumeClaimSample",
"externalKey": "k8s:demo-cluster:demo-ns:PersistentVolumeClaim:demo-pvc",
"integrationName": "com.vendor.kubernetes",
"integrationVersion": "1.0.0",
"label.environment": "production",
"namespace": "demo-ns",
"namespaceName": "demo-ns",
"nr.ingestTimeMs": 1773445696000,
"nr.invalidAttributeCount": 2,
"pvcName": "demo-pvc",
"reportingAgent": "anonymized-agent",
"requestedStorageBytes": 1,
"statusPhase": "Bound",
"storageClass": "confab-ephemeral-storage",
"timestamp": 1773445696000,
"volumeName": "pvc-f2896052-d4ce-4a61-b42d-14113ee95514"
},
{
"accessMode": "ReadWriteOnce",
"cloudProvider": "aws",
"clusterName": "us-rad-house",
"createdAt": 1768305251,
"displayName": "account-account-cdc-6b9865fc58-8q5kr-pipelet-jar-ephemeral-disk",
"entityGuid": "MXxJTkZSQXxOQXwtNTQ3NjIwOTc1MzE4NjYyNzA5Mw",
"entityId": "-5476209753186627093",
"entityKey": "k8s:us-rad-house:xpipes:PersistentVolumeClaim:account-account-cdc-6b9865fc58-8q5kr-pipelet-jar-ephemeral-disk",
"entityName": "k8s:us-rad-house:xpipes:PersistentVolumeClaim:account-account-cdc-6b9865fc58-8q5kr-pipelet-jar-ephemeral-disk",
"entityType": "KUBERNETES_PERSISTENTVOLUMECLAIM",
"event_type": "K8sPersistentVolumeClaimSample",
"externalKey": "k8s:us-rad-house:xpipes:PersistentVolumeClaim:account-account-cdc-6b9865fc58-8q5kr-pipelet-jar-ephemeral-disk",
"integrationName": "com.newrelic.kubernetes",
"integrationVersion": "3.45.2",
"label.environment": "us-production",
"namespace": "xpipes",
"namespaceName": "xpipes",
"nr.ingestTimeMs": 1773445681000,
"nr.invalidAttributeCount": 2,
"pvcName": "demo-pvc",
"reportingAgent": "i-00cb0ad3a59bebe06",
"requestedStorageBytes": 1,
"statusPhase": "Bound",
"storageClass": "demo-storage-class",
"timestamp": 1773445681000,
"volumeName": "demo-volume"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,26 @@
"newrelic.source": "api.metrics.otlp",
"otel.library.name": "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver",
"otel.library.version": "0.121.0"
},
{
"instrumentation.provider": "opentelemetry",
"job_label": "kube-state-metrics",
"k8s.cluster.name": "farm",
"k8s.namespace.name": "apple-tree",
"k8s.pvc.name": "apple-tree-pv-claim",
"kube_persistentvolumeclaim_info": {
"type": "gauge",
"count": 1,
"sum": 1,
"min": 1,
"max": 1,
"latest": 1
},
"metricName": "kube_persistentvolumeclaim_info",
"newrelic.source": "api.metrics.otlp",
"otel.library.name": "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver",
"otel.library.version": "0.121.0",
"storageclass": "standard",
"volumename": "pvc-abc12345-demo"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
relationships:
- name: k8sPersistentVolumeClaimManagesPersistentVolume
version: "1"
origins:
- Kubernetes Integration
conditions:
- attribute: eventType
anyOf: [ "K8sPersistentVolumeClaimSample" ]
- attribute: volumeName
present: true
relationship:
expires: PT75M
relationshipType: MANAGES
source:
extractGuid:
attribute: entityGuid
entityType:
value: KUBERNETES_PERSISTENTVOLUMECLAIM
target:
buildGuid:
account:
lookup: true
domain:
value: INFRA
type:
value: KUBERNETES_PERSISTENTVOLUME
valueInGuid: NA
identifier:
fragments:
- value: "k8s:"
- attribute: clusterName
- value: ":PersistentVolume:"
- attribute: volumeName
hashAlgorithm: FARM_HASH
- name: otelKsmK8sPersistentVolumeClaimManagesPersistentVolume
# use kube-state-metrics kube_persistentvolumeclaim_info metric
version: "1"
origins:
- OpenTelemetry
conditions:
- attribute: metricName
anyOf: [ "kube_persistentvolumeclaim_info" ]
- attribute: volumename
present: true
relationship:
expires: PT75M
relationshipType: MANAGES
source:
buildGuid:
account:
lookup: true
domain:
value: INFRA
type:
value: KUBERNETES_PERSISTENTVOLUMECLAIM
identifier:
fragments:
- attribute: k8s.cluster.name
- value: ":"
- attribute: k8s.namespace.name
- value: ":"
- attribute: k8s.pvc.name
hashAlgorithm: FARM_HASH
target:
buildGuid:
account:
lookup: true
domain:
value: INFRA
type:
value: KUBERNETES_PERSISTENTVOLUME
identifier:
fragments:
- attribute: k8s.cluster.name
- value: ":"
- attribute: volumename
hashAlgorithm: FARM_HASH
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
relationships:
# This rule relates a Pod to a PersistentVolumeClaim by joining K8sVolumeSample (for podName, pvcName, etc.)
# with K8sPersistentVolumeClaimSample (for PVC entity construction). The synthesis engine must support
# cross-sample field extraction by matching on pvcName, namespaceName, and clusterName.
- name: K8sPodConsumesPersistentVolumeClaim
version: "1"
origins:
- Kubernetes Integration
conditions:
- attribute: event_type
anyOf: [ "K8sVolumeSample" ]
- attribute: clusterName
present: true
- attribute: namespaceName
present: true
- attribute: podName
present: true
- attribute: pvcName
present: true
relationship:
expires: PT75M
relationshipType: CONSUMES
source:
buildGuid:
account:
lookup: true
domain:
value: INFRA
type:
value: KUBERNETES_POD
identifier:
fragments:
- value: "k8s:"
- attribute: clusterName
- value: ":"
- attribute: namespaceName
- value: ":pod:"
- attribute: podName
hashAlgorithm: FARM_HASH
target:
buildGuid:
account:
lookup: true
domain:
value: INFRA
type:
value: KUBERNETES_PERSISTENTVOLUMECLAIM
identifier:
fragments:
- attribute: clusterName
- value: ":"
- attribute: namespaceName
- value: ":"
- attribute: pvcName
hashAlgorithm: FARM_HASH
# for OTel we would need kube_pod_spec_volumes_persistentvolumeclaims_info to get Pod and PVC attributes
Loading