# Sensu filter events based on hostname

**URL:** <https://discourse.sensu.io/t/sensu-filter-events-based-on-hostname/671>\
**Category:** Sensu Classic (EOL)\
**Created:** [September 3, 2016, 2:35am UTC](https://discourse.sensu.io/t/sensu-filter-events-based-on-hostname/671 "2016-09-03T02:35:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_Kumar](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@Jay\_Kumar](https://discourse.sensu.io/u/Jay_Kumar)\
**Post date:** [September 3, 2016, 2:35am UTC](https://discourse.sensu.io/t/sensu-filter-events-based-on-hostname/671/1 "2016-09-03T02:35:22Z")

</div>

I am trying to create Sensu filter to filter out all alert/events from clients name say test

{

“filters”: {

“test\_server\_filter”: {

“negate”: false,

“attributes”: {

“client”: “eval: name =~ /test/i”

}

}

}

}

looks like this is having no affect, any pointer?

---

<div class="post-metadata">

**Author:** ![Jay\_Kumar](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@Jay\_Kumar](https://discourse.sensu.io/u/Jay_Kumar)\
**Post date:** [September 29, 2016, 5:08pm UTC](https://discourse.sensu.io/t/sensu-filter-events-based-on-hostname/671/2 "2016-09-29T17:08:51Z")

</div>

Bump for visibility…

> **···**
>
> On Saturday, 3 September 2016 08:05:22 UTC+5:30, Jay Kumar wrote:
> 
> > I am trying to create Sensu filter to filter out all alert/events from clients name say test
> 
> > {
> 
> > “filters”: {
> 
> > “test\_server\_filter”: {
> 
> > “negate”: false,
> 
> > “attributes”: {
> 
> > “client”: “eval: name =~ /test/i”
> 
> > }
> 
> > }
> 
> > }
> 
> > }
> 
> > 
> 
> > looks like this is having no affect, any pointer?

---

<div class="post-metadata">

**Author:** ![mlisj123](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mlisj123](https://discourse.sensu.io/u/mlisj123)\
**Post date:** [November 1, 2019, 5:31pm UTC](https://discourse.sensu.io/t/sensu-filter-events-based-on-hostname/671/3 "2019-11-01T17:31:58Z")

</div>

> [@Jay\_Kumar](#):
>
> “client”: “eval: name =~ /test/i”

did you figure this out? im trying to do something similar

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [November 2, 2019, 12:44am UTC](https://discourse.sensu.io/t/sensu-filter-events-based-on-hostname/671/4 "2019-11-02T00:44:03Z")

</div>

@mlisj123 hey!

Just fyi this was a post originally from the Sensu users google group that was automatically migrated when we opened up the discourse forum about a year ago now. The original poster may not be available for response on this platform.
