# Extract IP and Status from CONTENT of dt.system.events to show in a Dashboard

**URL:** <https://community.dynatrace.com/t/extract-ip-and-status-from-content-of-dt-system-events-to-show-in-a-dashboard/44884>\
**Category:** DQL\
**Tags:** dql, notebooks, logs\
**Created:** [March 27, 2024, 1:20pm UTC](https://community.dynatrace.com/t/extract-ip-and-status-from-content-of-dt-system-events-to-show-in-a-dashboard/44884 "2024-03-27T13:20:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.dynatrace.com/u/Raj)\
**Post date:** [March 27, 2024, 1:20pm UTC](https://community.dynatrace.com/t/extract-ip-and-status-from-content-of-dt-system-events-to-show-in-a-dashboard/44884/1 "2024-03-27T13:20:37Z")

</div>

Hello All,

I have few entries coming in&nbsp; **dt.system.events** which are coming from SNMP Generic Device extension and wanted to show in a dashboard like below:

| IP | Status |
| --- | --- |
| 0.0.0.0 | ERROR |
| 1.1.1.1 | Successful |

The entries have all data but I am not able to use DQL Architect to extract information and show in dashboard. Check entries below:

```markup
Failed to assign monitoring configuration to ActiveGate. Reason: DEVICE_CONNECTION_ERROR:Status DEVICE_CONNECTION_ERROR (38) returned from 1 agents (0.0.0.0: Agent(0.0.0.0): GetBulk timout args: 1.3.6.1.2.1.1.5.0 : request timeout (after 3 retries) [status code=38]);

```

```markup
Host: 1.1.1.1 Query successful

```

Can someone please guide me how to get the table above from the entries shared. Any lead would be appreciated.

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [April 10, 2024, 5:46pm UTC](https://community.dynatrace.com/t/extract-ip-and-status-from-content-of-dt-system-events-to-show-in-a-dashboard/44884/2 "2024-04-10T17:46:48Z")

</div>

You can use an additional field as a conditional for your “STATUS”, something like this:

```markup
data record()
| parse content, "WORD:stringStart LD ipaddr:ipv4 LD"
| fieldsAdd Status=if(stringStart== "Failed", "ERROR", else:(if(
                      stringStart== "Host", "Succesful"
                      )))
| fieldsRemove stringStart

```

That’d be the case if you only have those two types of records, which are easy to parse.

 ![Eric_Yu_2-1712771109152.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/7d0b4fdcbca60f6e510a411248dd70c5dbeb84b7.png)

Removing the unnecessary fields, and you’d get the result you wanted.

 ![Eric_Yu_1-1712770931397.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/b/dbec5d9e786779bdbf291d2163562a4bec47335e.png)

Let me know if it helps.

---

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.dynatrace.com/u/Raj)\
**Post date:** [April 11, 2024, 11:46am UTC](https://community.dynatrace.com/t/extract-ip-and-status-from-content-of-dt-system-events-to-show-in-a-dashboard/44884/3 "2024-04-11T11:46:32Z")

</div>

Thanks Eric. It helped.&nbsp;😊
