# Sensu alert in Html format

**URL:** <https://discourse.sensu.io/t/sensu-alert-in-html-format/607>\
**Category:** Sensu Classic (EOL)\
**Created:** [May 29, 2016, 5:50am UTC](https://discourse.sensu.io/t/sensu-alert-in-html-format/607 "2016-05-29T05:50:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinod\_katuwa](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vinod\_katuwa](https://discourse.sensu.io/u/vinod_katuwa)\
**Post date:** [May 29, 2016, 5:50am UTC](https://discourse.sensu.io/t/sensu-alert-in-html-format/607/1 "2016-05-29T05:50:57Z")

</div>

Hi Experts,  
I was looking at my alert mails from sensu it really look ugly, i was not able to understand what exaclty it s saying is it critical or warning , i m looking for idea which can make it look good and understandable , bec when client she he ll not be able to understand whats happening …

Looking forward for your best response.

below is alert mail i m getting from sensu now.

{“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}

---

<div class="post-metadata">

**Author:** ![Matt\_Jones](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Matt\_Jones](https://discourse.sensu.io/u/Matt_Jones)\
**Post date:** [May 29, 2016, 6:35am UTC](https://discourse.sensu.io/t/sensu-alert-in-html-format/607/2 "2016-05-29T06:35:16Z")

</div>

![Inline image 1](https://us1.discourse-cdn.com/flex016/uploads/sensu/original/1X/bcf613508c411e47e1c29ad9a7e32619bed91085.png)

[https://github.com/yieldbot/dhoulmagus](https://github.com/yieldbot/dhoulmagus)

This is still a WIP and was intended to be a poc but is currently running in our dev environments because it does the job good enough. In the near future this will be ported from the Ruby to Golang. It started life many decades ago as a monothlic, aren’t they all, Perl 3 script written by someone far better with Perl than I that could be used with Nagios, pnp4nagios and their ancestors. I ported it to Python and made it much more extensible several years ago for use with Icinga/Icinga2. The ruby port came about when I moved to Sensu.

Golang will be the next logical evolution due to portability across multiple monitoring solutions.

While I know this works and will help out where/when I can please RTFM and use at your own discretion 🙂

> **···**
>
> On Sun, May 29, 2016 at 1:50 AM, vinod katuwa [vinod.katuwa12@gmail.com](mailto:vinod.katuwa12@gmail.com) wrote:
> 
> > Hi Experts,  
> > I was looking at my alert mails from sensu it really look ugly, i was not able to understand what exaclty it s saying is it critical or warning , i m looking for idea which can make it look good and understandable , bec when client she he ll not be able to understand whats happening …
> 
> > Looking forward for your best response.
> 
> > 
> 
> > below is alert mail i m getting from sensu now.
> 
> > 
> 
> > {“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}
> 
> > 
> 
> > 
> 
> > 
> 
> –
> 
> Matt Jones @DevopsMatt
> 
> Senior Infrastructure Engineer - [Yieldbot Inc.](http://yieldbot.com/)
> 
> Core Contributor - [Sensu Plugins](http://sensu-plugins.github.io/)
> 
> Co-Organizer - [Boston Infrastructure Coders](http://www.meetup.com/Boston-Infrastructure-Coders/)
> 
> Organizer - [Metrowest Golang Meetup](http://www.meetup.com/Metrowest-Golang-Meetup/)
> 
> [https://linkedin.com/in/mattyjones](https://linkedin.com/in/mattyjones)

---

<div class="post-metadata">

**Author:** ![Kyle\_Anderson](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@Kyle\_Anderson](https://discourse.sensu.io/u/Kyle_Anderson)\
**Post date:** [May 29, 2016, 3:26pm UTC](https://discourse.sensu.io/t/sensu-alert-in-html-format/607/3 "2016-05-29T15:26:10Z")

</div>

It looks like you are using the raw "mail" command. I recommend moving  
on to using a more standard email hander:

> **[GitHub - sensu-plugins/sensu-plugins-mailer: This plugin is an email handler...](https://github.com/sensu-plugins/sensu-plugins-mailer)**
>
> This plugin is an email handler for Sensu. Contribute to sensu-plugins/sensu-plugins-mailer development by creating an account on GitHub.

Still plain text but much nicer formatted. (and you can provide your  
own template if you want)

> **···**
>
> On Sat, May 28, 2016 at 10:50 PM, vinod katuwa \<vinod.katuwa12@gmail.com\> wrote:
> 
> > Hi Experts,  
> > I was looking at my alert mails from sensu it really look ugly, i was not  
> > able to understand what exaclty it s saying is it critical or warning , i m  
> > looking for idea which can make it look good and understandable , bec when  
> > client she he ll not be able to understand whats happening ..  
> > Looking forward for your best response.
> > 
> > below is alert mail i m getting from sensu now.
> > 
> > {"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}

---

<div class="post-metadata">

**Author:** ![vinod\_katuwa](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vinod\_katuwa](https://discourse.sensu.io/u/vinod_katuwa)\
**Post date:** [May 30, 2016, 7:51am UTC](https://discourse.sensu.io/t/sensu-alert-in-html-format/607/4 "2016-05-30T07:51:02Z")

</div>

Hi Kyle,

M using postfix for mail but I want to get alert in HTML or look good format. As you shown before I need to know how could I set up …

> **···**
>
> On May 29, 2016 8:56 PM, “Kyle Anderson” [kyle@xkyle.com](mailto:kyle@xkyle.com) wrote:
> 
> > It looks like you are using the raw “mail” command. I recommend moving
> > 
> > on to using a more standard email hander:
> > 
> > [https://github.com/sensu-plugins/sensu-plugins-mailer](https://github.com/sensu-plugins/sensu-plugins-mailer)
> > 
> > Still plain text but much nicer formatted. (and you can provide your
> > 
> > own template if you want)
> > 
> > On Sat, May 28, 2016 at 10:50 PM, vinod katuwa [vinod.katuwa12@gmail.com](mailto:vinod.katuwa12@gmail.com) wrote:
> > 
> > > Hi Experts,
> > 
> > > I was looking at my alert mails from sensu it really look ugly, i was not
> > 
> > > able to understand what exaclty it s saying is it critical or warning , i m
> > 
> > > looking for idea which can make it look good and understandable , bec when
> > 
> > > client she he ll not be able to understand whats happening …
> > 
> > > Looking forward for your best response.
> > 
> > > 
> > 
> > > below is alert mail i m getting from sensu now.
> > 
> > > 
> > 
> > > {“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}
> > 
> > > 
> > 
> > > 
> > 
> > > 
> > 
> > >

---

<div class="post-metadata">

**Author:** ![Kyle\_Anderson](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@Kyle\_Anderson](https://discourse.sensu.io/u/Kyle_Anderson)\
**Post date:** [May 30, 2016, 3:56pm UTC](https://discourse.sensu.io/t/sensu-alert-in-html-format/607/5 "2016-05-30T15:56:09Z")

</div>

I think [GitHub - sensu-plugins/sensu-plugins-mailer: This plugin is an email handler for Sensu.](https://github.com/sensu-plugins/sensu-plugins-mailer) looks decent.  
It doesn't matter what mailserver (postfix) you use.

If you need more help than the standard docs I cover it in my training  
material on lecture 10: [https://www.udemy.com/sensu-introduction/](https://www.udemy.com/sensu-introduction/)

> **···**
>
> On Mon, May 30, 2016 at 12:51 AM, vinod katuwa \<vinod.katuwa12@gmail.com\> wrote:
> 
> > Hi Kyle,  
> > M using postfix for mail but I want to get alert in HTML or look good  
> > format. As you shown before I need to know how could I set up ..
> > 
> > On May 29, 2016 8:56 PM, "Kyle Anderson" \<kyle@xkyle.com\> wrote:
> > 
> > > It looks like you are using the raw "mail" command. I recommend moving  
> > > on to using a more standard email hander:  
> > > [GitHub - sensu-plugins/sensu-plugins-mailer: This plugin is an email handler for Sensu.](https://github.com/sensu-plugins/sensu-plugins-mailer)
> > > 
> > > Still plain text but much nicer formatted. (and you can provide your  
> > > own template if you want)
> > > 
> > > On Sat, May 28, 2016 at 10:50 PM, vinod katuwa \<vinod.katuwa12@gmail.com\> \>\> wrote:  
> > > \> Hi Experts,  
> > > \> I was looking at my alert mails from sensu it really look ugly, i was  
> > > \> not  
> > > \> able to understand what exaclty it s saying is it critical or warning ,  
> > > \> i m  
> > > \> looking for idea which can make it look good and understandable , bec  
> > > \> when  
> > > \> client she he ll not be able to understand whats happening ..  
> > > \> Looking forward for your best response.  
> > > \>  
> > > \> below is alert mail i m getting from sensu now.  
> > > \>  
> > > \>  
> > > \> {"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}  
> > > \>  
> > > \>  
> > > \>  
> > > \>
