---
title: pagerduty.actionFromSeverity() function
description: pagerduty.actionFromSeverity() converts a severity to a PagerDuty action.
url: https://docs.influxdata.com/flux/v0/stdlib/pagerduty/actionfromseverity/
estimated_tokens: 478
product: Flux
version: v0
---

# pagerduty.actionFromSeverity() function

-   Flux 0.43.0+
-   View InfluxDB support

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

-   `ok` converts to `resolve`.
-   All other severities convert to `trigger`.

##### Function type signature

```js
(severity: string) => string
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### severity

(Required) Severity to convert to a PagerDuty action.

## Examples

### Convert a severity to a PagerDuty action

```js
import "pagerduty"

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

```
