# 使用 Homebrew, apk, chocolatey, MacPorts, Nix, zypper, scoop, winget 安装 telegraf

查看 telegraf 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:telegraf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install telegraf
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install telegraf
```

  证据: MacPorts ports tree: sysutils/telegraf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add telegraf
```

  证据: Alpine Linux edge package indexes: telegraf from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#telegraf
```

  证据: nixpkgs package indexes: pkgs/by-name/te/telegraf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install telegraf
```

  证据: openSUSE Tumbleweed package metadata: telegraf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install telegraf
```

  证据: Chocolatey community package catalog: telegraf from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','synologydrive'

- Scoop (92%):

```sh
scoop install main/telegraf
```

  证据: Scoop official bucket manifest trees: bucket/telegraf.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id InfluxData.Telegraf -e
```

  证据: Windows Package Manager source index: InfluxData.Telegraf from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:telegraf
- **软件包管理器:** Homebrew
- **版本:** 1.39.2
- **来源摘要:** Plugin-driven server agent for collecting & reporting metrics
- **主页:** <https://www.influxdata.com/time-series-platform/telegraf/>
- **仓库:** <https://github.com/influxdata/telegraf>
- **最后更新:** 2026-07-26T00:50:34+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- telegraf (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.39.2
## 项目历史与用法

Telegraf is InfluxData's plugin-driven collection agent for metrics, logs, and other telemetry. It became a standard package-manager install for observability setups because it is a single agent that can read many inputs, transform data, and write to many backends.

### 项目历史

InfluxData says it released Telegraf in 2015 as a lightweight, plugin-driven collection agent written in Go and designed around tagged measurements used by InfluxDB and OpenTSDB. The project grew inside the InfluxData ecosystem alongside the TICK stack.

The Telegraf 1.0 announcement described it as InfluxDB's native data collector and the first step of the TICK stack. At that point, the project had grown from a small number of input and output plugins into a broad open source agent with many contributors and plugin types.

### 采用历史

Telegraf's adoption followed its plugin model. Official docs describe input, output, aggregator, processor, and secretstore plugin categories, and InfluxData's product page now presents Telegraf as an open source agent with hundreds of community-tested plugins.

Because it could output beyond InfluxDB and integrate with infrastructure, applications, cloud services, message queues, and edge devices, Telegraf became common in package repositories across Unix, Windows, and container workflows.

### 使用方式

Users normally generate or edit a TOML configuration, enable input and output plugins, and run the telegraf daemon as a service. Official docs show `telegraf config > telegraf.conf` as the standard way to generate a configuration file from the available plugins.

In package-manager culture, Telegraf is valued for being a boring, service-friendly collector: install it, place config under `/etc/telegraf`, drop fragments into `telegraf.d`, and let it feed the telemetry backend.

### 为什么软件包爱好者会关心

Telegraf is significant because it turns a large observability integration surface into one package. Formula maintainers care about its build, plugin set, service files, config paths, and release cadence because those determine whether fleet installs behave predictably.

It also illustrates a packaging pattern common in infrastructure tooling: a single Go binary with a large plugin catalog and a stable text configuration format becomes the portable unit that package managers distribute.

### 时间线

- 2015: InfluxData releases Telegraf as a lightweight Go collection agent.
- 2016: Telegraf 1.0 GA is announced as InfluxDB's native data collector and the first step of the TICK stack.
- 2020s: Telegraf expands into a broad telemetry agent with hundreds of plugins and multi-backend output support.
- 2026: Telegraf v1.39.1 is published in the official GitHub releases.

### Related projects

- InfluxDB is Telegraf's original and primary ecosystem partner.
- Kapacitor and Chronograf are related TICK stack components.
- Prometheus, Grafana, OpenTelemetry collectors, and vendor agents occupy adjacent telemetry collection niches.

### 来源

- <https://docs.influxdata.com/telegraf/v1/configuration/>
- <https://docs.influxdata.com/telegraf/v1/plugins/>
- <https://github.com/influxdata/telegraf/releases/tag/v1.39.1>
- <https://www.influxdata.com/blog/announcing-telegraf-1-0-the-plugin-driven-agent-for-collecting-metrics/>
- <https://www.influxdata.com/blog/telegraf-go-collection-agent/>
- <https://www.influxdata.com/time-series-platform/telegraf/>


## 安全说明

formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/telegraf/telegraf.conf, /etc/telegraf/telegraf.d

## Credential files

- Linux: /etc/default/telegraf, /etc/telegraf/secrets
## 其他软件包管理器记录

- Nix - telegraf: normalized package name match | nixpkgs package indexes: pkgs/by-name/te/telegraf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - telegraf - 1.37.0-r6: normalized package name match | Alpine Linux edge package indexes: telegraf from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A plugin-driven server agent for collecting & reporting metrics, part of the InfluxDB project | https://www.influxdata.com/time-series-platform/telegraf/
- apk - telegraf-doc - 1.37.0-r6: normalized package name match | Alpine Linux edge package indexes: telegraf-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A plugin-driven server agent for collecting & reporting metrics, part of the InfluxDB project (documentation) | https://www.influxdata.com/time-series-platform/telegraf/
- apk - telegraf-openrc - 1.37.0-r6: normalized package name match | Alpine Linux edge package indexes: telegraf-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A plugin-driven server agent for collecting & reporting metrics, part of the InfluxDB project (OpenRC init scripts) | https://www.influxdata.com/time-series-platform/telegraf/
- zypper - telegraf - 1.39.0-1.4: normalized package name match | openSUSE Tumbleweed package metadata: telegraf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | The plugin-driven server agent for collecting & reporting metrics | https://github.com/influxdata/telegraf
- MacPorts - telegraf: normalized package name match | MacPorts ports tree: sysutils/telegraf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - telegraf: normalized package name match | Chocolatey community package catalog: telegraf from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','synologydrive'
- Scoop - main/telegraf: normalized package name match | Scoop official bucket manifest trees: bucket/telegraf.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - InfluxData.Telegraf: normalized package name match | Windows Package Manager source index: InfluxData.Telegraf from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/telegraf.yml](https://github.com/mxcl/pkgdb/blob/main/combined/telegraf.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
