---
title: telegraf secrets
description: The telegraf secrets command manages secrets in secret stores to use with Telegraf.
url: https://docs.influxdata.com/telegraf/v1/commands/secrets/
estimated_tokens: 334
product: Telegraf Enterprise
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/commands/secrets/
date: '2024-04-03T14:36:07-06:00'
lastmod: '2024-04-03T14:36:07-06:00'
---

The `telegraf secrets` command manages secrets in secret stores to use with Telegraf.

## Usage

```sh
telegraf [global-flags] secrets [subcommand] [flags]
```

## Subcommands

|                Subcommand                 |                   Description                    |
|-------------------------------------------|--------------------------------------------------|
|[list](/telegraf/v1/commands/secrets/list/)|       List known secrets and secret stores       |
| [get](/telegraf/v1/commands/secrets/get/) |Retrieve the value of a secret from a secret store|
| [set](/telegraf/v1/commands/secrets/set/) |   Create or modify a secret in a secret store    |
|                `help`, `h`                |                Shows command help                |

## Flags

|Flag|        |   Description   |
|----|--------|-----------------|
|`-h`|`--help`|Show command help|

*Also see [Telegraf global flags](/telegraf/v1/commands/#telegraf-global-flags).*
| Subcommand | Description |
| --- | --- |
| Subcommand | Description |
| list | List known secrets and secret stores |
| get | Retrieve the value of a secret from a secret store |
| set | Create or modify a secret in a secret store |
| help ,  h | Shows command help |

| Flag |  | Description |
| --- | --- | --- |
| Flag |  | Description |
| -h | --help | Show command help |
