sensu-plugins / sensu-plugins-opsgenie

Sensu plugins for OpsGenie

Home Page:http://sensu-plugins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supply better description field when creating OpsGenie alert

Castaglia opened this issue · comments

Currently, when calling the OpsGenie Alert API to create an alert, the Sensu handler looks in the JSON configuration (from client and/or check) for a description field, e.g.:

  "opsgenie": {
    "description": "...."
    ...
  }

And only if that description value is present, will that value be included in the OpsGenie alert.

I would like to have the check output be used as that description value by default, rather than having to explicitly configure the description value a priori.

This would also make for a shorter "message" field, which has a limit of 130 characters, per the OpsGenie docs. In our case, our Sensu check outputs can be quite long (with URLs and such), leading to field truncation. We can move that check output out from the "message" field to the "description" field (15000 character limit), and avoid truncation issues.