OpenSearch/watcher/docs/reference/actions/hipchat.asciidoc

128 lines
6.0 KiB
Plaintext
Raw Normal View History

Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
[[actions-hipchat]]
==== HipChat Action
A watch <<actions, action>> that sends messages to https://www.hipchat.com[HipChat]
rooms or users. To use the HipChat action, you need to configure at least one
HipChat account in Watcher. For information about configuring accounts, see <<configuring-hipchat,
Configuring Watcher to Send Notifications to HipChat>>.
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
[[configuring-hipchat-actions]]
===== Configuring HipChat Actions
You configure HipChat actions in a watch's `actions` array. Action-specific attributes are
specified using the `hipchat` keyword. You must specify the `message` attribute for all
`hipchat` actions. If you omit the `account` attribute, the message is sent
using the default HipChat account configured in `elasticsearch.yml`.
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
For example, the following action is configured to send messages using a HipChat account that
uses the <<hipchat-api-integration, integration>> profile. Because this type of account can
only send messages to a particular room, the only required attribute is the message itself.
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
[source,json]
--------------------------------------------------
"actions" : {
"notify-hipchat" : {
"transform" : { ... },
"throttle_period" : "5m",
"hipchat" : {
"account" : "integration-account", <1>
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
"message" : {
"body" : "Encountered {{ctx.payload.hits.total}} errors in the last 5 minutes (facepalm)", <2>
"format" : "text",
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
"color" : "red",
"notify" : true
}
}
}
}
--------------------------------------------------
<1> The name of a HipChat account configured in `elasticsearch.yml`.
<2> The message you want to send to HipChat.
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
To send messages with a HipChat account that uses the <<hipchat-api-user, user>> profile, you need
to specify what rooms and users you want to send the message to. For example, the following action
is configured to send messages to the `mission-control` and `devops` rooms
as well as the user `website-admin@example.com`. (To send to multiple users or rooms, specify an
array of strings.)
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
[source,json]
--------------------------------------------------
"actions" : {
"notify-hipchat" : {
"transform" : { ... },
"throttle_period" : "5m",
"hipchat" : {
"account" : "user-account",
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
"message" : {
"room" : [ "mission-control", "devops" ],
"user" : "website-admin@example.com",
"body" : "Encountered {{ctx.payload.hits.total}} errors in the last 5 minutes (facepalm)",
"format" : "text",
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
"color" : "red",
"notify" : true
}
}
}
}
--------------------------------------------------
To send messages with a HipChat account that uses the <<hipchat-api-v1, v1>> profile, you need
to specify what room or rooms you want to send the message to. For example, the following action
is configured to send messages to the `server-status` room. (To send to multiple
rooms, specify an array of strings.)
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
[source,json]
--------------------------------------------------
"actions" : {
"notify-hipchat" : {
"transform" : { ... },
"throttle_period" : "5m",
"hipchat" : {
"account" : "v1-account",
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
"message" : {
"from" : "Watcher",
"room" : [ "server-status", "infra-team" ],
"body" : "Encountered {{ctx.payload.hits.total}} errors in the last 5 minutes (facepalm)",
"format" : "text",
Introducing HipChat Action An action capable of sending notifications to rooms and users on hipchat. This actions support three types of HipChat APIs: - `v1` - The (now deprecated) legacy API where a token can be registered at the group level, and the `v1` version of the API can be used. This API only supports room notification (users cannot be notified). multi-room notification is supported. - `integration` - The basic integration that one can create in HipChat (it is using the `v2` API version), where notifications can be sent to a single room. User notification is unsupported by this API - `user` - this API uses an API token of a specific user. An admin user can create an API token and configure it to have access to room notification and user private messaging. This API supports multi-room and multi-user notifications. The settings for `hipchat` are very similar to the `email` infrastructure in nature. It is possible to configure multiple/different hipchat account, each is associated with the api type (a.k.a profile) - can be `v1`, `integration` or `user`, and the respective `auth_token`. When configuring the action in the watch, one can specify what hipchat account they would like to use (when not specifying an account, the `default_account` will be used). Each account can also specify its own unique `host`/`port` for the hipchat server - for full flexibility. Closes elastic/elasticsearch#462 Original commit: elastic/x-pack-elasticsearch@9d9ee1354231a06c312e50e2de7c21e345486bb9
2015-08-18 07:13:42 -04:00
"color" : "red",
"notify" : true
}
}
}
}
--------------------------------------------------
[[hipchat-action-attributes]]
===== HipChat Action Attributes
The following table lists the attributes you can set for `hipchat` actions.
[[hipchat-api-integration-action-attributes]]
|======
| Name |Required | Default | Description
| `account` | no | Default account | The HipChat account to use to send the
message.
| `message.body ` | yes | - | The message content. Can contain up to
1000 characters.
| `message.format` | no | html | The format of the message: `text` or `html`.
| `message.color` | no | yellow | The background color of the notification in the
room: `gray`, `green`, `purple`, `red`, `yellow`.
| `message.notify` | no | false | Indicates whether people in the room should
be actively notified
| `message.from` | no | the watch ID | The name that appears as the notification sender.
Only valid for accounts that use the v1 profile.
| `message.room` | no | - | The rooms that the notification should go to.
Accepts a string value or an array of string
values. Must be specified when using the
v1 profile. At least one room or user must
be specified when using the `user` profile.
Not valid for the `integration` profile.
| `message.user` | no | - | The users that the notification should go to.
Accepts a string value or an array of string
values. At least one room or user must
be specified when using the `user` profile.
Not valid for the `integration` or `v1`
profiles.
|======