Documentation

pagerduty.sendEvent() function

Flux 0.43.0+

The pagerduty.sendEvent() function sends an event to PagerDuty.

import "pagerduty"

pagerduty.sendEvent(
  pagerdutyURL: "https://events.pagerduty.com/v2/enqueue",
  routingKey: "ExampleRoutingKey",
  client: "ExampleClient",
  clientURL: "http://examplepagerdutyclient.com",
  dedupkey: "ExampleDedupKey",
  class: "cpu usage",
  group: "app-stack",
  severity: "ok",
  eventAction: "trigger",
  source: "monitoringtool:vendor:region",
  summary: "This is an example summary.",
  timestamp: "2016-07-17T08:42:58.315+0000"
)

Parameters

pagerdutyURL

The URL of the PagerDuty endpoint. Defaults to https://events.pagerduty.com/v2/enqueue.

routingKey

The routing key generated from your PagerDuty integration.

client

The name of the client sending the alert.

clientURL

The URL of the client sending the alert.

dedupkey

A per-alert ID that acts as deduplication key and allows you to acknowledge or change the severity of previous messages. Supports a maximum of 255 characters.

When using pagerduty.endpoint() to send data to PagerDuty, the function uses the pagerduty.dedupKey() function to populate the dedupkey parameter.

class

The class or type of the event. Classes are user-defined. For example, ping failure or cpu load.

group

A logical grouping used by PagerDuty. Groups are user-defined. For example, app-stack.

severity

The severity of the event.

Valid values include:

  • critical
  • error
  • warning
  • info

eventAction

Event type to send to PagerDuty.

Valid values include:

  • trigger
  • resolve
  • acknowledge

source

The unique location of the affected system. For example, the hostname or fully qualified domain name (FQDN).

summary

A brief text summary of the event used as the summaries or titles of associated alerts. The maximum permitted length is 1024 characters.

timestamp

The time the detected event occurred in RFC3339nano format.


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.