# Counter using geofence

**URL:** <https://discuss.elastic.co/t/counter-using-geofence/337832>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [July 6, 2023, 6:48pm UTC](https://discuss.elastic.co/t/counter-using-geofence/337832 "2023-07-06T18:48:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafaelrangel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafaelrangel/32/126308_2.png) [@rafaelrangel](https://discuss.elastic.co/u/rafaelrangel)\
**Post date:** [July 6, 2023, 6:48pm UTC](https://discuss.elastic.co/t/counter-using-geofence/337832/1 "2023-07-06T18:48:06Z")

</div>

Good afternoon people.

I'm new here and I have a question.  
I have two indexes:  
1 - Data being indexed through a json that contains mainly location (latitude and londitude) and the name of an asset.  
2- A geofence with a polygon (static, logically)

I would like to know, if I can create a dashboard so that when this asset of the first index, when entering the geofence, it shows a dashlet with a counter of this event?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [July 6, 2023, 9:20pm UTC](https://discuss.elastic.co/t/counter-using-geofence/337832/2 "2023-07-06T21:20:31Z")

</div>

You can use [containment alert](https://www.elastic.co/guide/en/kibana/current/geo-alerting.html) and [index action](https://www.elastic.co/guide/en/kibana/current/index-action-type.html) to create an event when an entity enters a boundary. Then you could map this event in maps.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 3, 2023, 9:20pm UTC](https://discuss.elastic.co/t/counter-using-geofence/337832/3 "2023-08-03T21:20:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
