Alert Handlers

This is archived documentation for InfluxData product versions that are no longer maintained. For newer documentation, see the latest InfluxData documentation.

The following is a list of available alert handlers and their options.

Aggregate

Aggregate multiple events into a single event.

Options:

NameTypeDescription
intervalduration stringHow often to aggregate events.
topicstringA topic into which to publish the aggregate events.
messagestringA template string where {{.Interval}} and {{.Count}} are available for constructing a meaning full message.

Example:

kind: aggregate
options:
    interval: 5m
    topic: agg_5m

Send aggregate events of the past 5m to the agg_5m topic. Further handling of the aggregated events can be configured on the agg_5m topic.

Alerta

Send alert events to an Alerta instance.

Options:

NameTypeDescription
tokenstringAlerta authentication token. If empty uses the token from the configuration.
token-prefixstringAlerta authentication token prefix. If empty uses Bearer.
resourcestringAlerta resource. Can be a template and has access to the same data as the AlertNode.Details property. Default: {{ .Name }}
eventstringAlerta event. Can be a template and has access to the same data as the idInfo property. Default: {{ .ID }}.
environmentstringAlerta environment. Can be a template and has access to the same data as the AlertNode.Details property. Defaut is set from the configuration.
groupstringAlerta group. Can be a template and has access to the same data as the AlertNode.Details property. Default: {{ .Group }}.
valuestringAlerta value. Can be a template and has access to the same data as the AlertNode.Details property. Default is an empty string.
originstringAlerta origin. If empty uses the origin from the configuration.
servicelist of stringList of effected Services.

Example:

kind: alerta
options:
    resource: system

Exec

Execute an external program, the alert data is passed over STDIN to the process.

Options:

NameTypeDescription
progstringPath to program to execute.
argslist of stringList of arguments to the program.

Example:

kind: exec
options:
    prog: /path/to/executable

Hipchat

Send alert events to a Hipchat room.

Options:

NameTypeDescription
roomstringHipChat room in which to post messages. If empty uses the channel from the configuration.
tokenstringHipChat authentication token. If empty uses the token from the configuration.

Example:

kind: hipchat
options:
    room: '#alerts'

Log

Log alert events to a file.

Options:

NameTypeDescription
pathstringPath to the log file.
modeintFile mode to use when creating the file.

Example:

kind: log
options:
    path: '/tmp/alerts.log'

Opsgenie

Send alert events to OpsGenie.

Options:

NameTypeDescription
teams-listlist of stringList of teams.
recipients-listList of recipients.

Example:

kind: opsgenie
options:
    teams:
        - rocket

Pagerduty

Send alert events to PagerDuty.

Options:

NameTypeDescription
service-keystringThe service key.

Example:

kind: pageduty

Pushover

Send alert events to Pushover.

Options:

NameTypeDescription
devicestringSpecific list of user’devices rather than all of a user’s devices (multiple device names may be separated by a comma)
titlestringYour message’s title, otherwise your apps name is used.
urlstringA supplementary URL to show with your message.
url-titlestringA title for your supplementary URL, otherwise just URL is shown.
soundstringThe name of one of the sounds supported by the device clients to override the user’s default sound choice.

Example:

kind: pushover
options:
    title: Alert from Kapacitor

Post

Post JSON encoded alert data to an HTTP endpoint.

Options:

NameTypeDescription
urlstringThe URL to which the alert data will be posted.
endpointstringName of a configured httppost endpoint, cannot be specified in conjunciton with URL.
headersmap of string to stringSet of extra header values to set on the POST request.

Example:

kind: post
options:
    url: http://example.com

Publish

Publish events to another topic.

Options:

NameTypeDescription
topicslist of stringList of topic names to publish events.

Example:

kind: publish
options:
    topics:
        - system
        - ops_team

Sensu

Send alert events to Sensu.

Options:

NameTypeDescription
sourcestringSensu source for which to post messages. If empty uses the source from the configuration.
handlerslist of stringSensu handler list. If empty uses the handler list from the configuration.

Example:

kind: sensu

Slack

Send alert events to Slack.

Options:

NameTypeDescription
channelstringSlack channel in which to post messages. If empty uses the channel from the configuration.
usernamestringUsername of the Slack bot. If empty uses the username from the configuration.
icon-emojistringIconEmoji is an emoji name surrounded in ‘:’ characters. The emoji image will replace the normal user icon for the slack bot.

Example:

kind: slack
options:
    channel: '#alerts'

SMTP

Send alert events via email.

Options:

NameTypeDescription
tolist of stringList of email addresses.

Example:

kind: smtp
options:
    to:
        - oncall1@example.com
        - oncall2@example.com

Snmptrap

Trigger SNMP traps for alert events.

Options:

NameTypeDescription
trap-oidstringOID of the trap.
data-listobjectEach data object has oid, type, and value fields. Each field is a string.

Example:

kind: snmptrap
options:
    trap-oid: '1.1.1.1'
    data-list:
        oid: '1.3.6.1.2.1.1.7'
        type: i
        value: '{{ index .Field "value" }}'

Talk

Send alert events to a Talk instance. No options are available. See the Talk service configuration.

Example:

kind: talk

TCP

Send JSON encoded alert data to a TCP endpoint.

Options:

NameTypeDescription
addressstringAddress of TCP endpoint.

Example:

kind: tcp
options:
    address: 127.0.0.1:7777

Telegram

Send alert events to a Telegram instance.

Options:

NameTypeDescription
chat-idstringTelegram user/group ID to post messages to. If empty uses the chati-d from the configuration.
parse-modestringParse node, defaults to Mardown. If empty uses the parse-mode from the configuration.
disable-web-page-previewboolWeb Page preview. If empty uses the disable-web-page-preview from the configuration.
disable-notificationboolDisables Notification. If empty uses the disable-notification from the configuration.

Example:

kind: telegram

VictorOps

Send alert events to a VictorOps instance.

Options:

NameTypeDescription
routing-keystringThe routing key of the alert event.

Example:

kind: victorops
options:
    routing-key: ops_team