I have some sensu metric check with transport handler defined on it. My transport is Redis and I can see that every metric cycle new record added to redis, however I would like to define max records limit or record TTL so I won't store endless metrics data in redis. How can I do it from handler json declaration? Here is my handler definition:
{
"handlers": {
"redis_handler": {
"type": "transport",
"mutator": "only_check_output",
"pipe": {
"type": "direct",
"name": "example_handler_queue"
}
}
}
}
Thanks
You can use occurences filter extension for sensu,
The occurrences filter will determine if an event occurrence count meets the user defined requirements in the event check definition. Users can specify a minimum number of occurrences before an event will be passed to a handler. Users can also specify a refresh time, in seconds, to reset where recurrences are counted from.