hipchat

package module
v0.0.0-...-b5e05eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2016 License: MIT Imports: 8 Imported by: 0

README

HipChat Output for Mozilla Heka

A Mozilla Heka Output for Atlassian's HipChat.

Installation

  • You will need an authentication token from Atlassian for HipChat's API. Follow the directions in the HipChat API documentation. A notification token will sufffice.

  • Create or add to the file {heka_root}/cmake/plugin_loader.cmake

add_external_plugin(git https://github.com/christianvozar/heka-hipchat-output master)
  • Build Heka per normal instructions for your platform.

Additional instructions can be found in the Heka documentation for external plugins.

Parameters

  • payload_only (bool) If set to true, then only the message payload string will be included, otherwise the entire Message struct will be sent in JSON format. (default: true)
  • auth_token (string) HipChat Authorization token. Notification token is appropriate.
  • send_to (array of strings)
    • array of email addresses to send the message to
  • room_id (string) ID or name of the room to send message.
  • from (string) Name the message will appear be sent. Must be less than 15 characters long. May contain letters, numbers, -, _, and spaces. (default: "heka")
  • notify (bool, optional) Whether or not this message should trigger a notification for people in the room (change the tab color, play a sound, etc). Each recipient's notification preferences are taken into account. (default: false)

Example HipChat Output Configuration File

[HipchatOutput]
type = "HipchatOutput"
payload_only = false
auth_token = ""
room_id = "Notifications"
notify = true

Documentation

Index

Constants

View Source
const (
	// HipChatAPIVersion is the Atlassian HipChat API Version to utilize.
	HipChatAPIVersion = "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HipchatOutput

type HipchatOutput struct {
	// contains filtered or unexported fields
}

HipchatOutput maintains high-level configuration options for the plugin.

func (*HipchatOutput) ConfigStruct

func (ho *HipchatOutput) ConfigStruct() interface{}

func (*HipchatOutput) Init

func (ho *HipchatOutput) Init(config interface{}) (err error)

func (*HipchatOutput) Run

func (ho *HipchatOutput) Run(or OutputRunner, h PluginHelper) (err error)

type HipchatOutputConfig

type HipchatOutputConfig struct {
	// Outputs the payload attribute in the HipChat message vs a full JSON message dump
	PayloadOnly bool `toml:"payload_only"`
	// HipChat Authorization token. Notification token is appropriate.
	AuthToken string `toml:"auth_token"`
	// Required. ID or name of the room.
	RoomID string `toml:"room_id"`
	// Required. Name the message will appear be sent. Must be less than 15
	// characters long. May contain letters, numbers, -, _, and spaces.
	From string
	// Whether or not this message should trigger a notification for people
	// in the room (change the tab color, play a sound, etc).
	// Each recipient's notification preferences are taken into account.
	// Default is false
	Notify bool
}

HipchatOutputConfig is populated via Heka and TOML configuration files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL