# "handler filters items must be strings" error

**URL:** <https://discourse.sensu.io/t/handler-filters-items-must-be-strings-error/884>\
**Category:** Sensu Classic (EOL)\
**Created:** [March 21, 2018, 5:43pm UTC](https://discourse.sensu.io/t/handler-filters-items-must-be-strings-error/884 "2018-03-21T17:43:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_Watroba](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@Jack\_Watroba](https://discourse.sensu.io/u/Jack_Watroba)\
**Post date:** [March 21, 2018, 5:43pm UTC](https://discourse.sensu.io/t/handler-filters-items-must-be-strings-error/884/1 "2018-03-21T17:43:45Z")

</div>

I’m trying to use the following filter (found in the docs: [https://docs.sensu.io/sensu-core/1.2/reference/filters/#example-handling-state-change-only](https://docs.sensu.io/sensu-core/1.2/reference/filters/#example-handling-state-change-only)) on a Sensu handler:

“filters”: [

{

“state\_change\_only”: {

“negate”: false,

“attributes”: {

“occurrences”: “eval: value == 1 || ‘:::action:::’ == ‘resolve’”

}

}

}

]

However, I keep getting this error in the server logs: “message”:“handler filters items must be strings”. I can’t figure out what’s wrong with this config, though I feel like I’m probably missing something obvious. Any help would be greatly appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![Jack\_Watroba](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@Jack\_Watroba](https://discourse.sensu.io/u/Jack_Watroba)\
**Post date:** [March 21, 2018, 6:19pm UTC](https://discourse.sensu.io/t/handler-filters-items-must-be-strings-error/884/2 "2018-03-21T18:19:03Z")

</div>

Never mind - figured it out. I was attempting to define the filter on the handler itself other than referencing an already defined filter.

> **···**
>
> On Wednesday, March 21, 2018 at 10:43:45 AM UTC-7, Jack Watroba wrote:
> 
> > I’m trying to use the following filter (found in the docs: [https://docs.sensu.io/sensu-core/1.2/reference/filters/#example-handling-state-change-only](https://docs.sensu.io/sensu-core/1.2/reference/filters/#example-handling-state-change-only)) on a Sensu handler:
> > 
> > “filters”: [
> 
> > {
> 
> > “state\_change\_only”: {
> 
> > “negate”: false,
> 
> > “attributes”: {
> 
> > “occurrences”: “eval: value == 1 || ‘:::action:::’ == ‘resolve’”
> 
> > }
> 
> > }
> 
> > }
> 
> > ]
> 
> > 
> 
> > However, I keep getting this error in the server logs: “message”:“handler filters items must be strings”. I can’t figure out what’s wrong with this config, though I feel like I’m probably missing something obvious. Any help would be greatly appreciated.
> 
> > 
> 
> > Thanks.
> 
> > 
> 
> >

---

<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 22, 2018, 2:08am UTC](https://discourse.sensu.io/t/handler-filters-items-must-be-strings-error/884/3 "2018-11-22T02:08:02Z")

</div>

Closed on November 22, 2018, 2:08am UTC


