- bin/handler-hipchat.rb
{
"hipchat": {
"apikey": "1234abcdefg1234abcdefg",
"apiversion": "v1",
"room": "Ops",
"from": "Sensu",
"message_template": "optional message template erb file path - /some/path/to/template.erb",
"message_format": "html"
}
}
<%=
[
@event["action"].eql?("resolve") ? "RESOLVED" : "ALERT",
" - [#{event_name}]<br>",
"command: #{@event['check']['command']}<br>",
"occurrences: #{@event['occurrences']}<br>",
@event["check"]["notification"] || @event["check"]["output"],
"<br>",
playbook,
].join
%>