# TunnelState (by Region and TunnelIpAddress)  metric : how to find the VPN id ?

**URL:** <https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493>\
**Category:** Open Q&A\
**Tags:** aws, dynatrace-managed, vpn\
**Created:** [October 23, 2024, 9:41am UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493 "2024-10-23T09:41:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![flomaz](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@flomaz](https://community.dynatrace.com/u/flomaz)\
**Post date:** [October 23, 2024, 9:41am UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/1 "2024-10-23T09:41:54Z")

</div>

Hello,

I want to monitor AWS VPNs with multiple tunnels. It can happen that only one tunnel IP fails, in this case the VPN won’t fail but we would like to be alerted and to check the issue.

I’ve found this metric but I do not know how to use the dimensions to find the VPN custom\_device id to which this tunner IP belongs.

Metric name : `ext:cloud.aws.vpn.tunnelStateByRegionTunnelIpAddress`  
Dimensions: `dt.entity.custom_device_group`, `Region`, `TunnelIpAddress`

When monitoring the VPN state per TunnelIPAddress, is there a way to find the VPN id to which a tunnel IP belongs ?

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 23, 2024, 4:08pm UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/2 "2024-10-23T16:08:02Z")

</div>

Hello&nbsp;[@flomaz](https://community.dynatrace.com/user/61686)

As per the available metrics

 ![2024-10-23_20h00_00.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/1/e14ec616ed57da4efa363c609cb95c46f0592bea.png)

you can create metric events and you will be alerted upon valid alerting configurations

 ![2024-10-23_20h03_17.png](https://global.discourse-cdn.com/dynatrace/original/2X/0/039de414cd19727997e889bef5ffa76d879e0d9a.png)

hoping it adds value

KR,

Peter

---

<div class="post-metadata">

**Author:** ![flomaz](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@flomaz](https://community.dynatrace.com/u/flomaz)\
**Post date:** [October 24, 2024, 7:18am UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/3 "2024-10-24T07:18:12Z")

</div>

Hello [@Peter\_Youssef](https://community.dynatrace.com/user/51369) ,

Thanks, yes, exactly, I would like to use metric events. I’ve configured a metric event with the metric “ext:cloud.aws.vpn.tunnelStateByRegionTunnelIpAddress” as I need the IP of the failed tunnel and the VPN id.

I generated an alert and was able to find the failling tunnel IP but not the VPN to which it belongs. Currently if an alerts occurs, the operation team will need to list all the IPS of all VPNs to find to which VPN this IP belongs.

KR,

Florent

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 24, 2024, 8:33am UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/4 "2024-10-24T08:33:45Z")

</div>

Hi&nbsp;[@flomaz](https://community.dynatrace.com/user/61686)

1. You can enrich the setup with more **tagging rules for discriminations** and then the correlations will be easy.
2. It’s good to check the topology Model if the full dependencies and correlations are provided Out-Of-The Box it fine to use it in the tagging rules, Otherwise you can define a new rules as per the below example.

**(1) - Generic Relationships**

![2024-10-24_12h10_48.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/2/528b13a19a2e2fb4ee7f94ff98849c649d5d024d.png)

 ![2024-10-24_12h13_37.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/2fd634c10a3a6d950b4da673d9277b06a6022e0c.png)

 ![2024-10-24_12h16_22.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/c/6c460aec8c2901ac8886669b08506abf38e77f81.png)

**(2) - Generic Types**

**![2024-10-24_12h24_24.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/3/f3d056e67efd874bce0eca0daf4d7314d447a787.png)**

 ![2024-10-24_12h25_14.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/1/5100bdb7c2681e8962eb1a0f367b82b0f51d8711.png)

 ![2024-10-24_12h26_48.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/c/1c2a676cbe85608bd1e5734c8902fef5c773b13d.png)

 ![2024-10-24_12h27_59.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/e27d55bacd31bd5f47aa526505e95adbabd92388.png)

 ![2024-10-24_12h30_08.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/e/3eaec0334fe6ac2def92d4d6cc1494be3087a5bd.png)

 ![2024-10-24_12h30_51.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/a/4a65ed77e7a07aae6c11cec037ec2e21ddfdea95.png)

 ![2024-10-24_12h31_39.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/4/04a73d4231172404cf0eb85dfeba63da177050f4.png)

**Dynatrace Ref:**

- **[Custom topology model — Dynatrace Docs](https://docs.dynatrace.com/docs/extend-dynatrace/extend-topology#custom-topology-model)**

Hoping it adds value.

BR,

Peter.

KR,

Peter.

---

<div class="post-metadata">

**Author:** ![flomaz](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@flomaz](https://community.dynatrace.com/u/flomaz)\
**Post date:** [October 24, 2024, 9:09am UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/5 "2024-10-24T09:09:14Z")

</div>

Hi [@Peter\_Youssef](https://community.dynatrace.com/user/51369)

Thanks, this looks like an interesting feature. I will try this.

KR,

Florent

---

<div class="post-metadata">

**Author:** ![flomaz](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@flomaz](https://community.dynatrace.com/u/flomaz)\
**Post date:** [October 24, 2024, 9:35am UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/6 "2024-10-24T09:35:17Z")

</div>

Hi [@Peter\_Youssef](https://community.dynatrace.com/user/51369) ,

By checking the solution you’ve documented, I’ve found the list of entities and explored the properties of this entity `dt.entity.cloud:aws:vpn`. The field ipAddress is present but null in my case, do you know if it reserved for a future usage or if there is an issue during metadata retrieval such as missing permissions ?

```markup
fetch `dt.entity.cloud<img class="lia-deferred-image lia-image-emoji" src="https://community.dynatrace.com/html/@F9676CCDE08B8746467ACFFDC4C9827E/images/emoticons/aws.png" alt=":aws:" title=":aws:">vpn`
| fieldsAdd ipAddress,listenPorts,entity.name,called_by,parent_of,accessible_by

```

KR,  
Florent

---

<div class="post-metadata">

**Author:** ![flomaz](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@flomaz](https://community.dynatrace.com/u/flomaz)\
**Post date:** [October 25, 2024, 2:54pm UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/7 "2024-10-25T14:54:28Z")

</div>

Hi,  
It seems that it is not possible. After checking with the support, I’ve submitted [a new product idea.](https://community.dynatrace.com/post/260674)

KR,  
Florent

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 25, 2024, 3:36pm UTC](https://community.dynatrace.com/t/tunnelstate-by-region-and-tunnelipaddress-metric-how-to-find-the-vpn-id/48493/8 "2024-10-25T15:36:50Z")

</div>

Hello&nbsp;[@flomaz](https://community.dynatrace.com/user/61686)

Happy for your progress, it’s good to submit it with Dynatrace for a sooner built-in solution.

KR,

Peter
