docs-v2/content/flux/v0.x/stdlib/pagerduty/actionfromseverity.md

1.6 KiB

title description menu weight
pagerduty.actionFromSeverity() function `pagerduty.actionFromSeverity()` converts a severity to a PagerDuty action.
flux_0_x_ref
name parent identifier
pagerduty.actionFromSeverity pagerduty pagerduty/actionFromSeverity
101

pagerduty.actionFromSeverity() converts a severity to a PagerDuty action.

  • ok converts to resolve.
  • All other severities convert to trigger.
Function type signature
(severity: string) => string

{{% caption %}}For more information, see Function type signatures.{{% /caption %}}

Parameters

severity

({{< req >}}) Severity to convert to a PagerDuty action.

Examples

Convert a severity to a PagerDuty action

import "pagerduty"

pagerduty.actionFromSeverity(severity: "crit")// Returns trigger