InfluxDB Docs

pagerduty.sendEvent() function

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

Function type: Output

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",
  component: "postgres",
  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.

Data type: String

routingKey

The routing key generated from your PagerDuty integration.

Data type: String

client

The name of the client sending the alert.

Data type: String

clientURL

The URL of the client sending the alert.

Data type: String

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.

Data type: String

class

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

Data type: String

group

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

Data type: String

severity

The severity of the event.

Valid values include:

  • critical
  • error
  • warning
  • info

Data type: String

eventAction

The type of event to send to PagerDuty.

Valid values include:

  • trigger
  • resolve
  • acknowledge

Data type: String

component

The component of the source machine responsible for the event. Components are user-defined. For example, mysql or eth0.

Data type: String

source

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

Data type: String

summary

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

Data type: String

timestamp

The time the detected event occurred in RFC3339nano format.

Data type: String