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

1.6 KiB

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

pagerduty.actionFromLevel() converts a monitoring level to a PagerDuty action.

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

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

Parameters

level

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

Examples

Convert a monitoring level to a PagerDuty action

import "pagerduty"

pagerduty.actionFromLevel(level: "crit")// Returns trigger