---
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: 377
product: Telegraf Enterprise
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/commands/secrets/
date: '2026-09-09T13:24:15-06:00'
lastmod: '2026-09-09T13:24:15-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    |
|[remove](/telegraf/v1/commands/secrets/remove/)|       Remove a secret from 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 |
| remove | Remove a secret from a secret store |
| help ,  h | Shows command help |

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