---
title: sensu.toSensuName() function
description: sensu.toSensuName() translates a string value to a Sensu name by replacing non-alphanumeric characters ([a-zA-Z0-9_.-]) with underscores (_).
url: https://docs.influxdata.com/flux/v0/stdlib/contrib/sranka/sensu/tosensuname/
estimated_tokens: 178
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/contrib/sranka/sensu/tosensuname/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.90.0+

InfluxDB support

> [!Important]
> `sensu.toSensuName()` is a user-contributed function maintained by
> the [package author](#package-author-and-maintainer).

`sensu.toSensuName()` translates a string value to a Sensu name
by replacing non-alphanumeric characters (`[a-zA-Z0-9_.-]`) with underscores (`_`).

##### Function type signature

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

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

## Parameters

### v

(Required)
String to operate on.

## Examples

### Convert a string into a Sensu name

```
import "contrib/sranka/sensu"

sensu.toSensuName(v: "Example name conversion")// Returns "Example_name_conversion"

```
