telegraf/cmd/telegraf
stepga 55f471aa32
fix(secrets): Make "insufficient lockable memory" warning work on BSDs (#16682)
Co-authored-by: Stephan Gabert <stepga@nirgendwo.eu>
2025-03-24 09:08:01 -05:00
..
README.md docs: Add symlink to command documentation (#9926) 2021-10-15 13:05:37 -06:00
agent.conf feat(logging): Allow overriding message key for structured logging (#16242) 2024-12-05 10:38:32 -06:00
cmd_config.go fix(agent): Avoid panic by checking for skip_processors_after_aggregators (#16477) 2025-02-05 09:12:51 -06:00
cmd_plugins.go chore(linters): Enforce import grouping with gci linter (#16526) 2025-02-24 19:37:12 -06:00
cmd_secretstore.go chore(linters): Remove blank identifiers and errors which are not needed to handle (#14399) 2023-12-07 08:09:01 -07:00
cmd_win_service.go chore(agent): Fix typo in service install command (#15967) 2024-10-02 18:41:34 +02:00
cmd_win_service_notwindows.go chore: Enable `revive:enforce-slice-style` rule (#16173) 2024-11-13 01:24:35 -06:00
main.go feat(agent): Print plugins source information (#16270) 2025-01-22 09:35:15 -06:00
main_test.go chore: Fix linter findings for `revive:unused-receiver` in `agent`, `cmd`, `config`, `internal`, `metric`, `migrations`, `models`, `testutils` and `tools` (#16340) 2025-01-15 20:58:58 +01:00
main_win_test.go chore(linters): Fix findings found by testifylint for Windows and enable it. (#14238) 2023-11-02 06:40:30 -06:00
pprof.go fix(agent): Ensure import of required package for pprof support (#15054) 2024-04-02 03:35:34 -04:00
printer.go chore: Enable `revive:enforce-slice-style` rule (#16173) 2024-11-13 01:24:35 -06:00
telegraf.go fix(agent): Add authorization and user-agent when watching remote configs (#16546) 2025-02-24 11:58:29 -06:00
telegraf_posix.go fix(secrets): Make "insufficient lockable memory" warning work on BSDs (#16682) 2025-03-24 09:08:01 -05:00
telegraf_windows.go chore: Update go to v1.23.0 (#15766) 2024-08-30 14:23:51 -05:00

README.md

Telegraf Commands & Flags

The following page describes some of the commands and flags available via the Telegraf command line interface.

Usage

General usage of Telegraf, requires passing in at least one config file with the plugins the user wishes to use:

telegraf --config config.toml

Help

To get the full list of subcommands and flags run:

telegraf help

Here are some commonly used flags that users should be aware of:

  • --config-directory: Read all config files from a directory
  • --debug: Enable additional debug logging
  • --once: Run one collection and flush interval then exit
  • --test: Run only inputs, output to stdout, and exit

Check out the full help out for more available flags and options.

Version

While telegraf will print out the version when running, if a user is uncertain what version their binary is, run the version subcommand:

telegraf version

Config

The config subcommand allows users to print out a sample configuration to stdout. This subcommand can very quickly print out the default values for all or any of the plugins available in Telegraf.

For example to print the example config for all plugins run:

telegraf config > telegraf.conf

If a user only wanted certain inputs or outputs, then the filters can be used:

telegraf config --input-filter cpu --output-filter influxdb