monitor.notify() function

The monitor.notify() function sends a notification to an endpoint and logs it in the notifications measurement in the _monitoring bucket.

*Function type: Output*

  1. import "influxdata/influxdb/monitor"
  2. monitor.notify(
  3. endpoint: endpoint,
  4. data: {}
  5. )

Parameters

endpoint

A function that constructs and sends the notification to an endpoint.

*Data type: Function*

data

Data to append to the output. InfluxDB populates notification data.

*Data type: Record*

Examples

Send a notification to Slack

  1. import "influxdata/influxdb/monitor"
  2. import "slack"
  3. endpoint = slack.endpoint(name: "slack", channel: "#flux")
  4. from(bucket: "system")
  5. |> range(start: -5m)
  6. |> monitor.notify(endpoint: endpoint)