DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

link log to existing entity

FabriBernie
Visitor

I had importing log using API because of technology not currently supported  
I don't have any enrichment with context information

However, name of k8s cluster and namespace is there

Is there a way to link these rows to existing entityID?
I made some try on smatscape node and edge tab on openpipeline (log format is in JSON and I need to parse it) 
Unfortunately I was only able to create custom nodes

2 REPLIES 2

sia_h
Dynatrace Champion
Dynatrace Champion

Yes, the Lookup feature can be used to enrich your logs with existing entity IDs.

Assume dt.kubernetes.cluster.name is the log field that contains your Kubernetes cluster name. You can correlate this with Smartscape entities as follows:

 
fetch logs
| filter isNotNull(dt.kubernetes.cluster.name)
| fields content, dt.kubernetes.cluster.name
| limit 5
| lookup [
smartscapeNodes K8S_CLUSTER
| fields name, id
], 
sourceField:dt.kubernetes.cluster.name, 
lookupField:name

 This joins your log records with Smartscape cluster entities by matching the cluster name in your logs (dt.kubernetes.cluster.name) with the name field of K8S_CLUSTER entities, returning the corresponding entity id.

FabriBernie
Visitor

ok, this is something useful in notebook or dashboard
Unfortunately you cannot use Smartscape tabs in openPipeline to link to not custom entities isn't it?

Featured Posts