Thanks for your response Kyle.
I have couple more follow up questions.
1> I have added refresh attribute in checks. But it doesn’t seems to be working, I still continue to get emails every minute. As per the documentation here is what it says.
Custom key-values can be added to a check definition, which will be included in event data, enabling handler creativity.
Common custom check definitions
occurrences: Number of event occurrences before the handler should take action
refresh: Number of seconds handlers should wait before taking second action. Relies on sensu-plugin.
Can you please let me know which plugin I need to install to get the refresh working. Where should I deploy this?
My sample check configuration
“command”: “/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-disk.rb”,
“subscribers”: [ “system” ]
2> Secondly, if I need to modify the existing handler code. Can you tell me the location and file name look like for modification?
On Wednesday, 3 September 2014 20:24:35 UTC+5:30, Kyle Anderson wrote:
You cannot use such a naive handler (mail binary) and achieve what you want.
You could start with the community mail handler:
Read the docs on some of the filter tunables that it most of the
community handlers respect:
Here is the filter logic:
There is currently no combination of tunables to do exactly what you
want, but you can modify the handler to have it’s own filter_repeated
function with whatever logic you need.
On Wed, Sep 3, 2014 at 5:10 AM, reachmani reac...@gmail.com wrote:
Couple of things.
On a specific check based on the event which could be critical or warning I
would like to send out email to different email distribution list. Secondly
my current check configuration is for 60 seconds and I would not want emails
to be triggered every second. I would like to trigger only once for a event
and stop sending emails until its resolved. Is this possible?
For sending out email I am using mail in linux environment.
“command”: “mail -s ‘sensu alert’ your@address”
I am using mail command as I dont have smtp host to send emails. Would I be
able to mail the event details in this scenario?