Documentation

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

import "influxdata/influxdb/monitor"

monitor.notify(
  endpoint: endpoint,
  data: {}
)

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

import "influxdata/influxdb/monitor"
import "slack"

endpoint = slack.endpoint(name: "slack", channel: "#flux")

from(bucket: "system")
	|> range(start: -5m)
	|> monitor.notify(endpoint: endpoint)

New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: