InfluxDB Docs

pagerduty.actionFromSeverity() function

The pagerduty.actionFromSeverity() function converts a severity to a PagerDuty action. ok converts to resolve. All other severities convert to trigger.

Function type: Transformation

import "pagerduty"

pagerduty.actionFromSeverity(
  severity: "ok"
)

// Returns "resolve"

Parameters

severity

The severity to convert to a PagerDuty action.

Data type: String

Function definition

import "strings"

actionFromSeverity = (severity) =>
  if strings.toLower(v: severity) == "ok" then "resolve"
  else "trigger"