# Lookup value from entity with the parsed value from logs

**URL:** <https://community.dynatrace.com/t/lookup-value-from-entity-with-the-parsed-value-from-logs/47101>\
**Category:** DQL\
**Tags:** dql, kubernetes, logs\
**Created:** [August 9, 2024, 10:57pm UTC](https://community.dynatrace.com/t/lookup-value-from-entity-with-the-parsed-value-from-logs/47101 "2024-08-09T22:57:43Z")\
**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, 10:57pm UTC](https://community.dynatrace.com/t/lookup-value-from-entity-with-the-parsed-value-from-logs/47101/1 "2024-08-09T22:57:43Z")

</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 internalIpAddresses and get the pod name (entity.name). But lookup always returns null values. Please help advise. TIA.

```auto
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}

```

Sample log content.

```auto
{ "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:** ![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 10, 2024, 9:36am UTC](https://community.dynatrace.com/t/lookup-value-from-entity-with-the-parsed-value-from-logs/47101/2 "2024-08-10T09:36:16Z")

</div>

This is resolved after I changed the lookup query where the internalIpAddresses is array and need to convert into string something like internalIpAddresses[0]. Thanks&nbsp;Angel Mariya Paul from support team.
