Merge pull request #1458 from influxdata/kapacitor-1.5.7

Kapacitor 1.5.7
pull/1721/head
J. Emrys Landivar 2020-10-27 12:38:55 -05:00 committed by GitHub
commit 137a0a39cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 183 additions and 84 deletions

View File

@ -6,12 +6,28 @@ menu:
parent: About the project
---
## v1.5.7 [2020-10-26]
## Features
- Add the `.recoveryaction()` method to support overriding the OpsGenieV2 alert recovery action in a TICKscript, thanks @zabullet!
- Add support for templating URLs in the [`httpPost` node](/kapacitor/v1.5/nodes/http_post_node/) and [`alert` node](/kapacitor/v1.5/nodes/alert_node/). To set up an template:
- For the `alert` node, see [alert templates](/kapacitor/v1.5/event_handlers/post/#alert-templates).
- For the `http post` node, see [row templates](/kapacitor/v1.5/event_handlers/post/#row-templates).
- Upgrade `github.com/gorhill/cronexpr`, thanks @wuguanyu!
- Add the [ServiceNow event handler](/kapacitor/v1.5/event_handlers/servicenow/) to support ServiceNow integration and provide proxy support.
### Bug fixes
- Add error check when the system fails to read the replay file, thanks @johncming!
- Add missing `.Details` to the alert template.
## v1.5.6 [2020-07-17]
## Features
- Add [Microsoft Teams event handler](/kapacitor/1.5/event_handlers/microsoftteams/), thanks @mmindenhall!
- Add [Discord event handler](/kapacitor/1.5/event_handler/discord/), thanks @mattnotmitt!
- Add [Microsoft Teams event handler](/kapacitor/v1.5/event_handlers/microsoftteams/), thanks @mmindenhall!
- Add [Discord event handler](/kapacitor/v1.5/event_handler/discord/), thanks @mattnotmitt!
- Add [support for TLS 1.3](/kapacitor/v1.5/administration/configuration/#transport-layer-security-tls-settings).
### Bug fixes

View File

@ -34,7 +34,8 @@ syntax for officially supported Kapacitor event handlers.
[Post](/kapacitor/v1.5/event_handlers/post/)
[Publish](/kapacitor/v1.5/event_handlers/publish/)
[Pushover](/kapacitor/v1.5/event_handlers/pushover/)
[Sensu](/kapacitor/v1.5/event_handlers/sensu/)
[Sensu](/kapacitor/v1.5/event_handlers/sensu/)
[ServiceNow](/kapacitor/v1.5/event_handlers/servicenow/)
[Slack](/kapacitor/v1.5/event_handlers/slack/)
[Snmptrap](/kapacitor/v1.5/event_handlers/snmptrap/)
[Talk](/kapacitor/v1.5/event_handlers/talk/)

View File

@ -36,7 +36,7 @@ Below is an example configuration:
```
#### `enabled`
Set to `true` to enable the OpsGenie v2 event handler.
Set to `true` to enable the OpsGenie v2 event handler.
#### `api-key`
Your OpsGenie API Key.
@ -51,10 +51,11 @@ Default OpsGenie recipients. _Can be overridden per alert._
The OpsGenie API URL. _**This should not need to be changed.**_
#### `recovery_action`
The Recovery Action specifies which action to take when alerts recover.
The recovery action specifies which action to take when alerts recover.
Valid values include:
* `notes` - Add a note to the alert.
* `close` - Close the alert.
* custom - Use the `.RecoveryAction()` method to specify the `recovery_action` in a TICK script.
#### `global`
If `true`, all alerts are sent to OpsGenie without specifying `opsgenie2` in the TICKscript.
@ -134,6 +135,8 @@ stream
.message('Hey, check your CPU')
.opsGenie2()
.teams('engineering', 'support')
.recoveryAction('notes')
```
### Send alerts to OpsGenie from a defined handler

View File

@ -12,11 +12,13 @@ menu:
The post event handler posts JSON encoded data to an HTTP endpoint.
## Configuration
Configuration as well as default [option](#options) values for the post event
handler are set in your `kapacitor.conf`.
Below is an example configuration:
### Post Settings in kapacitor.conf
```toml
[[httppost]]
endpoint = "example"
@ -30,40 +32,49 @@ Below is an example configuration:
```
#### `endpoint`
Name of a configured HTTP POST endpoint that acts as an identifier for `[[httppost]]`
configurations when multiple are present.
_Endpoints are identifiers only. They are not appended to HTTP POST URLs._
#### `url`
The URL to which the alert data will be posted.
#### `headers`
Set of extra header values to set on the POST request.
#### `basic-auth`
Set of authentication credentials to set on the POST request.
#### `alert-template`
Alert template for constructing a custom HTTP body.
Alert templates are only used with post [alert](/kapacitor/v1.5/nodes/alert_node/)
handlers as they consume alert data.
_Skip to [alert templating](#alert-templates)._
#### `alert-template-file`
Absolute path to an alert template file.
_Skip to [alert templating](#alert-templates)._
#### `row-template`
Row template for constructing a custom HTTP body.
Row templates are only used with the [httpPost node](/kapacitor/v1.5/nodes/http_post_node/)
pipeline nodes as they consume a row at a time.
_Skip to [row templating](#row-templates)._
#### `row-template-file`
Absolute path to a row template file.
_Skip to [row templating](#row-templates)._
### Defining configuration options with environment variables
The `endpoint`, `url`, and `headers` configuration options can be defined with
environment variables:
@ -75,6 +86,7 @@ KAPACITOR_HTTPPOST_0_HEADERS_Example2 = "header2"
```
### Configuring and using multiple HTTP POST endpoints
The `kapacitor.conf` supports multiple `[[httppost]]` sections.
The [`endpoint`](#endpoint) configuration option of each acts as a unique identifier for that specific configuration.
To use a specific `[[httppost]]` configuration with the Post alert handler,
@ -110,6 +122,7 @@ KAPACITOR_HTTPPOST_1_HEADERS_Example2 = "header2"
```
## Options
The following post event handler options can be set in a
[handler file](/kapacitor/v1.5/event_handlers/#create-a-topic-handler-with-a-handler-file) or when using
`.post()` in a TICKscript.
@ -124,6 +137,7 @@ The following post event handler options can be set in a
| skipSSLVerification | bool | Disables SSL verification for the POST request. |
### Example: Handler file - Using a pre-configured endpoint
```yaml
id: handler-id
topic: topic-name
@ -134,6 +148,7 @@ options:
```
### Example: Handler file - Defining post options "inline"
```yaml
id: handler-id
topic: topic-name
@ -150,6 +165,7 @@ options:
```
### Example: TICKscript - Using a pre-configured endpoint
```js
|alert()
// ...
@ -159,6 +175,7 @@ options:
```
### Example: TICKscript - Defining post options "inline"
```js
|alert()
// ...
@ -172,6 +189,7 @@ options:
```
## Using the Post event handler
The post event handler can be used in both TICKscripts and handler files to post
alert and HTTP POST data to an HTTP endpoint.
The examples below deal with alerts and use the same `[[httppost]]` configuration
@ -187,6 +205,7 @@ _**HTTP POST settings in kapacitor.conf**_
```
### Post alerts from a TICKscript
The following TICKscripts use the `.post()` event handler to post the message,
"Hey, check your CPU", whenever idle CPU usage drops below 10%.
@ -221,8 +240,8 @@ stream
.skipSSLVerification()
```
### Post alerts from a defined handler
The following setup sends an alert to the `cpu` topic with the message, "Hey,
check your CPU".
A post handler is added that subscribes to the `cpu` topic and posts all alert
@ -270,12 +289,13 @@ Add the handler:
kapacitor define-topic-handler post_cpu_handler.yaml
```
## Post templating
The post event handler allows you to customize the content and structure of
POSTs with alert and row templates.
### Alert templates
Alert templates are used to construct a custom HTTP body.
They are only used with post [alert](/kapacitor/v1.5/nodes/alert_node/) handlers
as they consume alert data.
@ -299,20 +319,22 @@ have access to the following fields:
| .Recoverable | Indicates whether or not the alert is auto-recoverable. |
#### Inline alert template
_**kapacitor.conf**_
```toml
[[httppost]]
endpoint = "example"
url = "http://example.com/path"
endpoint = "host"
url = "host={{index .ID \"host\"}}{{index . "time"}}{{end}}}"
alert-template = "{{.Message}}:{{range .Data.Series}}{{.Tags}},{{range .Values}}{{.}}{{end}}{{end}}"
```
#### Alert template file
_**kapacitor.conf**_
```toml
[[httppost]]
endpoint = "example"
url = "http://example.com/path"
endpoint = "host"
url = "host={{index .ID \"host\"}}{{index . "time"}}{{end}}}"
alert-template-file = "/etc/templates/alert.html"
```
@ -322,6 +344,7 @@ _**/etc/templates/alert.html**_
```
### Row templates
Row templates are used to construct a custom HTTP body.
They are only used with [httpPost](/kapacitor/v1.5/nodes/http_post_node/)
handlers as they consume a row at a time.
@ -339,20 +362,22 @@ have access to the following fields:
| .Values | A list of values; each a map containing a "time" key for the time of the point and keys for all other fields on the point. |
#### Inline row template
_**kapacitor.conf**_
```toml
[[httppost]]
endpoint = "example"
url = "http://example.com/path"
endpoint = "host"
url = "host={{index .Tags \"host\"}}{{range .Values}} {{index . "time"}} {{index . "value"}}{{end}}"
row-template = '{{.Name}} host={{index .Tags "host"}}{{range .Values}} {{index . "time"}} {{index . "value"}}{{end}}'
```
#### Row template file
_**kapacitor.conf**_
```toml
[[httppost]]
endpoint = "example"
url = "http://example.com/path"
endpoint = "host"
url = "host={{index .Tags \"host\"}}{{range .Values}} {{index . "time"}} {{index . "value"}}{{end}}"
row-template-file = "/etc/templates/row.html"
```

View File

@ -0,0 +1,111 @@
---
title: ServiceNow event handler
description: >
The ServiceNow event handler lets you to send Kapacitor alerts to ServiceNow. This page includes configuration options and usage examples.
menu:
kapacitor_1_5_ref:
name: ServiceNow
weight: 1500
parent: Event handlers
---
[ServiceNow](https://www.servicenow.com/) provides service management software with a comprehensive managed workflow that supports
features such as real-time communication, collaboration, and resource sharing.
Configure Kapacitor to send alert messages to ServiceNow.
## Configuration
Configuration and default [option](#options) values for the ServiceNow event
handler are set in your `kapacitor.conf`.
The example below shows the default configuration:
```toml
[servicenow]
# Configure ServiceNow.
enabled = false
# The ServiceNow URL for the target table (Alert or Event). Replace this instance with your hostname.
url = "https://instance.service-now.com/api/now/v1/table/em_alert"
# Default source identification.
source = "Kapacitor"
# Username for HTTP BASIC authentication
username = ""
# Password for HTTP BASIC authentication
password = ""
```
#### `enabled`
Set to `true` to enable the ServiceNow event handler.
#### `url`
The ServiceNow instance address.
#### `source`
Default "Kapacitor" source.
#### `username`
Username to use for basic HTTP authentication.
#### `password`
Password to use for basic HTTP authentication.
## Options
The following ServiceNow event handler options can be set in a
[handler file](/kapacitor/v1.5/event_handlers/#create-a-topic-handler-with-a-handler-file) or when using
`.serviceNow()` in a TICKscript. These options set corresponding fields in the ServiceNow alert or event. For information about ServiceNow alerts, see [Manually create an alert](https://docs.servicenow.com/bundle/paris-it-operations-management/page/product/event-management/task/t_EMManuallyCreateAlert.html).
| Name | Type | Description |
| ---- | ---- | ----------- |
| node | string | ServiceNow node to associate with the event. |
| type | string | ServiceNow type used to identify an event record from which alerts are created, for example, disk or CPU.|
| resource | | Adds key values pairs to the Sensu API request. |
| metricName | string | Unique name that describes metrics collected for which the alert has been created. |
| messageKey | string | Unique event identifier used to identify multiple events related to the same alert. If empty, this is generated from the source, node, type, resource, and metricName field values.|
| source | string | Source that generated the event. |
| message | string | Alert message. |
| alert ID | string | Unique ID used to identify the alert. |
{{% note %}}
All the handler options above support templates with the following variables: `ID`, `Name`, `TaskName`, `Fields`, `Tags`, same as in the `AlertNode.message`.
{{% /note %}}
By default, the handler maps the Kapacitor values below to the ServiceNow Alert or Event fields as follows:
| Value | Field |
| ---- | ---- |
| source | Source |
| message | Description |
| alert ID | Message key |
### TICKscript examples
```js
stream
|from()
.measurement('cpu')
|alert()
.crit(lambda: "usage_user" > 90)
.stateChangesOnly()
.message('Hey, check your CPU')
.serviceNow()
```
```js
stream
|from()
.measurement('cpu')
|alert()
.crit(lambda: "usage_user" > 90)
.message('Hey, check your CPU')
.serviceNow()
.node('{{ index .Tags "host" }}')
.type('CPU')
.resource('CPU-Total')
.metricName('usage_user')
.messageKey('Alert: {{ .ID }}')
```

View File

@ -5,7 +5,7 @@ description: >
menu:
kapacitor_1_5_ref:
name: Slack
weight: 1500
weight: 1600
parent: Event handlers
---

View File

@ -5,7 +5,7 @@ description: >
menu:
kapacitor_1_5_ref:
name: SNMP Trap
weight: 1600
weight: 1700
parent: Event handlers
---

View File

@ -5,7 +5,7 @@ description: >
menu:
kapacitor_1_5_ref:
name: Talk
weight: 1700
weight: 1800
parent: Event handlers
---

View File

@ -5,7 +5,7 @@ description: >
menu:
kapacitor_1_5_ref:
name: TCP
weight: 1800
weight: 1900
parent: Event handlers
---

View File

@ -5,7 +5,7 @@ description: >
menu:
kapacitor_1_5_ref:
name: Telegram
weight: 1900
weight: 2000
parent: Event handlers
---

View File

@ -5,7 +5,7 @@ description: >
menu:
kapacitor_1_5_ref:
name: VictorOps
weight: 2000
weight: 2100
parent: Event handlers
---

View File

@ -19,12 +19,11 @@ See [AlertNode.Info](/kapacitor/v1.5/nodes/alert_node/#info),
[AlertNode.Warn](/kapacitor/v1.5/nodes/alert_node/#warn),
and [AlertNode.Crit](/kapacitor/v1.5/nodes/alert_node/#crit) below.
### Constructor
| Chaining method | Description |
|:---------|:---------|
| **alert ( )** | Create an alert node, which can trigger alerts. |
| **alert&nbsp;(&nbsp;)** | Create an alert node, which can trigger alerts. <br> <br>To dynamically construct a custom HTTP body or URL, use an [**alert template**](/kapacitor/v1.5/event_handlers/post/#alert-templates). For example, `httpPost('localhost/?host={{ index .Tags "host"}}&cpu={{ index .Tags "cpu" }}')`. <br> <br> |
### Property methods
@ -75,8 +74,6 @@ and [AlertNode.Crit](/kapacitor/v1.5/nodes/alert_node/#crit) below.
| **[warn](#warn)&nbsp;(&nbsp;`value`&nbsp;`ast.LambdaNode`)** | Filter expression for the WARNING alert level. An empty value indicates the level is invalid and is skipped. |
| **[warnReset](#warnreset)&nbsp;(&nbsp;`value`&nbsp;`ast.LambdaNode`)** | Filter expression for resetting the WARNING alert level to lower level. |
### Chaining methods
[Alert](#alert),
[Barrier](#barrier),
@ -130,7 +127,6 @@ and [AlertNode.Crit](/kapacitor/v1.5/nodes/alert_node/#crit) below.
---
#### Available event handlers
Different event handlers can be configured for each [AlertNode.](/kapacitor/v1.5/nodes/alert_node/)
@ -161,7 +157,6 @@ option, `global`, that indicates that all alerts implicitly use the handler.
| [Telegram](#telegram) | Post alert message to Telegram client. |
| [VictorOps](#victorops) | Send alert to VictorOps. |
#### Alert event data
Each event that gets sent to a handler contains the following alert data:
@ -201,7 +196,6 @@ stream
.email('oncall@example.com')
```
Each expression maintains its own state.
The order of execution for the expressions is not considered to be deterministic.
For each point an expression may or may not be evaluated.
@ -240,8 +234,6 @@ For example, given the following values, the corresponding alert states are:
| 56 | INFO |
| 47 | OK |
**Available Statistics:**
* `alerts_triggered`: Total number of alerts triggered
@ -252,14 +244,12 @@ For example, given the following values, the corresponding alert states are:
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
## Properties
Property methods modify state on the calling node.
They do not add another node to the pipeline, and always return a reference to the calling node.
Property methods are marked using the `.` operator.
### Alerta
Send the alert to Alerta.
@ -285,7 +275,6 @@ stream
.event('Something went wrong')
```
### All
Indicates an alert should trigger only if all points in a batch match the criteria.
@ -297,7 +286,6 @@ alert.all()
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Category
Category places this alert in a named category.
@ -310,7 +298,6 @@ alert.category(value string)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Crit
Filter expression for the CRITICAL alert level.
@ -322,7 +309,6 @@ alert.crit(value ast.LambdaNode)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### CritReset
Filter expression for resetting the CRITICAL alert level to lower level.
@ -333,7 +319,6 @@ alert.critReset(value ast.LambdaNode)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Details
Template for constructing a detailed HTML message for the alert.
@ -394,7 +379,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### DurationField
Optional field key to add the alert duration to the data.
@ -406,7 +390,6 @@ alert.durationField(value string)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Email
Email the alert data to specified "To" email addresses.
@ -444,7 +427,6 @@ Value: {{ index .Fields "value" }}
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Exec
Execute a command whenever an alert is triggered and pass the alert data over STDIN in JSON format.
@ -461,7 +443,6 @@ alert.exec('/usr/bin/python', 'myscript.py')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Flapping
Perform flap detection on the alerts.
@ -488,7 +469,6 @@ alert.flapping(0.25, 0.5)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Kafka
Send the alert to an Apache Kafka cluster.
@ -515,7 +495,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### History
Number of previous states to remember when computing flapping levels and
@ -534,7 +513,6 @@ alert.history(21)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### HipChat
Send the alert to HipChat.
@ -561,7 +539,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Id
Template for constructing a unique ID for a given alert.
@ -625,7 +602,6 @@ Resulting ID: `kapacitor/authentication/auth001.example.com`
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### IdField
Optional field key to add to the data, containing the alert ID as a string.
@ -640,7 +616,6 @@ alert.idField('id')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### IdTag
Optional tag key to use when tagging the data with the alert ID.
@ -655,7 +630,6 @@ alert.idTag('alertID')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Info
Filter expression for the INFO alert level.
@ -671,7 +645,6 @@ alert.info(lambda: 'usage_idle' < 60)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### InfoReset
Filter expression for resetting the INFO alert level to lower level.
@ -686,7 +659,6 @@ alert.infoReset(lamda: 'usage_idle' > 60)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Inhibit
Inhibit other alerts in a category.
@ -725,7 +697,6 @@ alert.inhibit(category string, equalTags ...string)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Kafka
Send the alert to a Kafka topic.
@ -751,7 +722,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### LevelField
Optional field key to add to the data, containing the alert level as a string.
@ -766,7 +736,6 @@ alert.levelField('INFO')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### LevelTag
Optional tag key to use when tagging the data with the alert level.
@ -781,7 +750,6 @@ alert.levelTag('level')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Log
Log JSON alert data to file.
@ -798,7 +766,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Message
Template for constructing a meaningful message for the alert.
@ -836,7 +803,6 @@ Resulting Message: authentication/auth001.example.com is CRITICAL value:42
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### MessageField
Optional field key to add to the data containing the alert message.
@ -851,7 +817,6 @@ alert.messageField('message')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### MQTT
Send alert to an MQTT broker.
@ -880,7 +845,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### NoRecoveries
Do not send recovery alerts. Sets `recoverable` alert data field to `false`.
@ -891,8 +855,8 @@ alert.noRecoveries()
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### OpsGenie v1
Send alert to OpsGenie using OpsGenie's v1 API.
Detailed configuration options and setup instructions are provided in the
[OpsGenie v1 Event Handler](/kapacitor/v1.5/event_handlers/opsgenie/v1/) article.
@ -915,8 +879,8 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### OpsGenie v2
Send alert to OpsGenie using OpsGenie's v2 API.
Detailed configuration options and setup instructions are provided in the
[OpsGenie v2 Event Handler](/kapacitor/v1.5/event_handlers/opsgenie/v2/) article.
@ -939,8 +903,8 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### PagerDuty v1
Send the alert to PagerDuty using PagerDuty's v1 API.
Detailed configuration options and setup instructions are provided in the
[PagerDuty v1 Event Handler](/kapacitor/v1.5/event_handlers/pagerduty/v1/) article.
@ -962,8 +926,8 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### PagerDuty v2
Send the alert to PagerDuty using PagerDuty's v2 API.
Detailed configuration options and setup instructions are provided in the
[PagerDuty v2 Event Handler](/kapacitor/v1.5/event_handlers/pagerduty/v2/) article.
@ -985,7 +949,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Post
HTTP POST JSON alert data to a specified URL.
@ -1003,7 +966,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Pushover
Send the alert to Pushover.
@ -1033,7 +995,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Quiet
Suppress all error logging events from this node.
@ -1044,7 +1005,6 @@ alert.quiet()
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Sensu
Send the alert to Sensu.
@ -1070,7 +1030,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Slack
Send the alert to Slack.
@ -1096,8 +1055,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### SnmpTrap
Send the alert using SNMP traps.
@ -1123,7 +1080,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### StateChangesOnly
Only sends events where the state changed.
@ -1167,7 +1123,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Talk
Send the alert to Talk.
@ -1191,7 +1146,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### TCP
Send JSON alert data to a specified address over TCP.
@ -1208,7 +1162,6 @@ alert.tcp('127.0.0.1:7777')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Telegram
Send the alert to Telegram.
@ -1236,8 +1189,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Topic
Topic specifies the name of an alert topic to which alerts will be published.
@ -1253,7 +1204,6 @@ alert.topic('cpu')
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### VictorOps
Send alert to VictorOps.
@ -1278,8 +1228,6 @@ stream
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### Warn
Filter expression for the WARNING alert level.
@ -1295,7 +1243,6 @@ alert.warn(lambda: 'usage_idle' < 20)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
### WarnReset
Filter expression for resetting the WARNING alert level to lower level.
@ -1310,14 +1257,12 @@ alert.warnReset(lambda: 'usage_idle' > 20)
<a class="top" href="javascript:document.getElementsByClassName('article-heading')[0].scrollIntoView();" title="top"><span class="icon arrow-up"></span></a>
## Chaining Methods
Chaining methods create a new node in the pipeline as a child of the calling node.
They do not modify the calling node.
Chaining methods are marked using the `|` operator.
### Alert
Create an alert node, which can trigger alerts.

View File

@ -18,7 +18,6 @@ method on httpPost. Multiple endpoint property methods may be specified.
Example:
```js
stream
|window()
@ -43,12 +42,11 @@ stream
.endpoint('example')
```
### Constructor
| Chaining Method | Description |
|:---------|:---------|
| **httpPost&nbsp;(&nbsp;`url`&nbsp;`...string`)** | Creates an HTTP Post node that POSTS received data to the provided HTTP endpoint. HttpPost expects 0 or 1 arguments. If 0 arguments are provided, you must specify an endpoint property method. |
| **httpPost&nbsp;(&nbsp;`url`&nbsp;`...string`)** | Creates an HTTP Post node that POSTS received data to the provided HTTP endpoint. HttpPost expects 0 or 1 arguments. If 0 arguments are provided, you must specify an endpoint property method.<br> <br>To dynamically construct a custom HTTP body or URL, use a [**row template**](/kapacitor/v1.5/event_handlers/post/#row-templates ). For example: `httpPost('localhost/?host={{ index .Tags "host"}}&cpu={{ index .Tags "cpu" }}')`.
### Property Methods