项目作者: graylog-labs

项目描述 :
Alarm callback that is writing to HipChat chatrooms
高级语言: Java
项目地址: git://github.com/graylog-labs/graylog-plugin-hipchat.git
创建时间: 2013-01-03T23:00:31Z
项目社区:https://github.com/graylog-labs/graylog-plugin-hipchat

开源协议:GNU General Public License v3.0

下载


HipChat Plugin for Graylog

Github Downloads
GitHub Release
Build Status

An alarm callback plugin for integrating HipChat into Graylog.

Required Graylog version: 2.4.0 and later.

  • Please use version 1.2.0 of this plugin if you are still running Graylog 1.x.
  • Please use version 1.3.0 of this plugin if you are still running Graylog 2.0.x, 2.1.x, 2.2.x, or 2.3.x.

Installation

Download the plugin
and place the .jar file in your Graylog plugin directory. The plugin directory
is the plugins/ directory relative from your Graylog installation path by default
and can be configured in the graylog.conf file.

Restart Graylog and you are done.

Usage

Custom templates can be defined with the same JMTE syntax used in the email templates, as long as they only work on the HTML subset supported by the HipChat API.

For example the following template includes the custom field named myField in the HipChat message:

  1. ${if stream_url}<a href="${stream_url}">${end}
  2. <strong>Alert for ${stream.title}</strong>
  3. ${if stream_url}
  4. </a>
  5. ${end}
  6. <i>(${check_result.triggeredCondition})</i>
  7. <br/>
  8. <i>${check_result.resultDescription}, triggered at ${check_result.triggeredAt}</i>
  9. <br/>
  10. ${if backlog}Last messages accounting for this alert:<br/>
  11. <table align="left">
  12. <tr><th>My Field</th><th>Details</th></tr>
  13. ${foreach backlog message}<br/>
  14. <tr>
  15. <td><b>${message.fields.myField}</b></td>
  16. <td><code>${message.source}, ${message.id}</code></td>
  17. </tr>
  18. </table>
  19. ${end}
  20. ${else}
  21. <i>(No messages to display.)</i>
  22. ${end}

If no custom template has been configured, the default email template is used.

Build

This project is using Maven and requires Java 8 or higher.

You can build a plugin (JAR) with mvn package.

DEB and RPM packages can be build with mvn jdeb:jdeb and mvn rpm:rpm respectively.

Plugin Release

We are using the maven release plugin:

  1. $ mvn release:prepare
  2. [...]
  3. $ mvn release:perform

This sets the version numbers, creates a tag and pushes to GitHub. TravisCI will build the release artifacts and upload to GitHub automatically.