---
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: 147
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/pagerduty/actionfromseverity/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.43.0+

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

```
import "pagerduty"

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

```
