Hipchat

Notify Hipchat room with alert status.

send_hipchat(room=None, message=None, token=None, message_format='html', notify=False, color='red', link=False, link_text='go to alert')

Send Hipchat notification to specified room.

Parameters:
  • room (str) – Room to be notified.
  • message (str) – Message to be sent. If None, then a message constructed from the alert will be sent.
  • token (str) – Hipchat API token.
  • message_format (str) – message format - html (default) or text (which correctly treats @mentions).
  • notify (bool) – Hipchat notify flag. Default is False.
  • color (str) – Message color. Default is red if alert is raised.
  • link (bool) – Add link to Hipchat message. Default is False.
  • link_text (str) – if link param is True, this will be displayed as a link in the hipchat message. Default is go to alert.

Note

Message color will be determined based on alert status. If alert has ended, then color will be green, otherwise color argument will be used.

Example message - using html format (default):

{
    "message": "NEW ALERT: Requests failing with status 500 on host-production-1-entity",
    "color": "red",
    "notify": true
}

Example message - using text format with @mention:

{
    "message": "@here NEW ALERT: Requests failing with status 500 on host-production-1-entity",
    "color": "red",
    "notify": true,
    "message_format": "text"
}