# Lookup Entity Values Using Parsed Log Data in DQL

**URL:** <https://community.dynatrace.com/t/lookup-entity-values-using-parsed-log-data-in-dql/47091>\
**Category:** DQL\
**Tags:** dql, kubernetes, logs\
**Created:** [August 9, 2024, 11:32am UTC](https://community.dynatrace.com/t/lookup-entity-values-using-parsed-log-data-in-dql/47091 "2024-08-09T11:32:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zip-chanko](https://avatars.discourse-cdn.com/v4/letter/z/8c91f0/32.png) [@zip-chanko](https://community.dynatrace.com/u/zip-chanko)\
**Post date:** [August 9, 2024, 11:32am UTC](https://community.dynatrace.com/t/lookup-entity-values-using-parsed-log-data-in-dql/47091/1 "2024-08-09T11:32:17Z")

</div>

I have the content with json in logs which has a key `client_ip` and trying to get the pod name which has `internalIpAddresses` from `dt.entity.cloud_application_instance`. So trying to lookup the IP I got from the logs `client_ip` with&nbsp;`internalIpAddresses` and get the pod name (entity.name). But `lookup` always returns `null` values. Please help advise. TIA.

I tried these queries.

```markup
fetch dt.entity.cloud_application_instance | fieldsAdd internalIpAddresses

```

| busybox\_1 | CLOUD\_APPLICATION\_INSTANCE-30A007499C4655B1 | 192.168.2.3 |
| --- | --- | --- |
| busybox\_2 | CLOUD\_APPLICATION\_INSTANCE-8CBE6E71FB1BABC6 | 192.168.2.4 |

```markup
fetch logs
| filter matchesValue(aws.log_group, "/aws/logs/alb")
| parse content , "JSON:record"
| fieldsAdd record[client_ip], alias:client_ip
| fieldsAdd record[domain_name], alias:domain_name
| fieldsAdd record[elb_status_code], alias:elb_status_code
| filter client_ip != ""
| fields timestamp, client_ip, domain_name, elb_status_code
| lookup sourceField:client_ip, lookupField:internalIpAddresses, [fetch dt.entity.cloud_application_instance], fields:{entity.name}

```

| 2024-08-09T20:50:01.581000000+10:00 | 192.168.2.3 | [example.com](http://example.com) | 200 | null |
| --- | --- | --- | --- | --- |
| 2024-08-09T20:50:02.309000000+10:00 | 192.168.2.3 | [example.com](http://example.com) | 200 | null |
| 2024-08-09T20:50:02.368000000+10:00 | 192.168.2.4 | [example.com](http://example.com) | 200 | null |

Sample content

```markup
{
  "client_ip": "192.168.2.3",
  "target_port": 443,
  "elb_status_code": "200",
  "target_status_code": "200",
  "request_verb": "POST",
  "domain_name": "example.com"
}

```

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [September 29, 2025, 7:42pm UTC](https://community.dynatrace.com/t/lookup-entity-values-using-parsed-log-data-in-dql/47091/2 "2025-09-29T19:42:30Z")

</div>

I don’t see you calling out the fields add for entity name.
