I am working on implementing Sensu monitoring ( work with graphite + e-mail alert).. everything is OK but only the email alert part. I managed to get the e-mail system to send out the alert but it in below format: {"id":"a1c608aa-e207-49fe-905d-6037f6db01f2","client":
{"name":"ABC","address":"0.0.0.0","subscriptions":["abc"],"version":"0.23.3","timestamp":1464499552},"check":{"command":"/etc/sensu/plugins/check_load
-w 8.00,5.00,2.00 -c
10.00,8.00,3.00","subscribers":["ABC","adef","xyz"],"handlers":["default","email"],"interval":60,"name":"check_CPU_usage","issued":1464499558,"executed":1464499558,"duration":0.005,"output":"CRITICAL
- load average: 5.54, 5.44, 4.09|load1=5.540;8.000;10.000;0;
load5=5.440;5.000;8.000;0; load15=4.090;2.000;3.000;0;
\n","status":2,"history":["1","1","1","1","1","1","1","1","1","1","1","0","1","2","2","2","2","2","2","2","2"],"total_state_change":15},"occurrences":8,"action":"create","timestamp":1464499558}
But both of support team and my teammate would like to have both friendly user format at the first half of the e-mail alert and the raw log OR the only "output" attribute in the second half.
Now my e-mail.json is as below: I know i did try to add "output" here but still does not work..:(
{
"handlers": {
"email_devops": {
"type": "pipe",
"command": "mail -s \"Development environment sensu alert\" myemail@company.com",
"severities": ["warning","critical"],
"output": " Warning : the process of ::name:: had reached to warning threshold"
}
}
}
I found some article , i found something about as per link: http://search-devops.com/m/wbRqS5nPvh2WnZfj1&subj=Sensu+alert+in+Html+format
But i still stuck on how to push together..
Please kindly help.
Thanks in advance.
Miss Sumana W.