Recently, I updated my sensu system to 26.5-2. Since, this was a major update for me, I had to reconfigure the filters. I’ve read the blog post on updating filters, but one problem still persists.
My keepalive filter is being filtered for some reason. This is my filter for alerting on the first occurrence and then every 12 hours (occurrence 1440):
“filter_keep_alive”: {
“negate”: false,
“attributes”: {
“check”: {
“interval”: 300
},
“occurrences”: “eval: value == 1 || value % 1440 == 0 || ‘:::action:::’ == ‘resolve’”
}
}
The first occurrence works fine, but on refresh values (occurrence 1440), I keep getting the following error:
warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
warning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
only handling every 144 occurrences: client1/keepalive
This is my keepalive:
“keepalive”: {
“thresholds”: {
“warning”: 300,
“critical”: 900
},
“interval”: 300,
“alias”: “HostHealth”,
“refresh”: 43200,
“handlers”: [“webapi”]
}
I figure the 144th filter was coming from the refresh value so after removing it completely, I got the following:
cat event.json | jq .event | /etc/sensu/handlers/webapi.rb
warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
warning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
only handling every 6 occurrences: client1/keepalive
Where is the 6 coming from?
Is there any other way to disable the deprecated filtering without having to update numerous clients with ’enable_deprecated_filtering' = false params? I've read about sensu-plugin 2.0.0, but it doesn't look like it's been released yet.