More descriptive data in the subject line of the email sensu sends out.

Hi all

How can we add more information to the subject line of our emails sensu sends out?

We currently have a very generic nondescrpitive subject.

Example:


<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

----
{
  "handlers": {
    "email": {
      "type": "pipe",
      "command": "mail -s 'sensu alert' your@address"
    }
  }
}

----

The result of the above is we recieve for example 30 emails with the same subject “sensu alert”. It would be nice to get the following information “STATE,SERVER,ALERT” for example “DOWN,web01,http” then when the server recovers we would receive an email with the subject “UP,web01.HTTP”.

Using the mail command is the most basic handler you can use.
I recommend using a more advanced handler, like this:

···

On Mon, May 16, 2016 at 2:39 PM, Jeffrey Brewster <jab2805@gmail.com> wrote:

Hi all

How can we add more information to the subject line of our emails sensu
sends out?

We currently have a very generic nondescrpitive subject.

Example:

----
{
  "handlers": {
    "email": {
      "type": "pipe",
      "command": "mail -s 'sensu alert' your@address"
    }
  }
}

----

The result of the above is we recieve for example 30 emails with the same
subject "sensu alert". It would be nice to get the following information
"STATE,SERVER,ALERT" for example "DOWN,web01,http" then when the server
recovers we would receive an email with the subject "UP,web01.HTTP".