docs: update README with info on package repos (#9964)
This commit is contained in:
parent
cf605b5d9a
commit
c669874750
94
README.md
94
README.md
|
|
@ -3,27 +3,26 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
[](https://circleci.com/gh/influxdata/telegraf) [](https://hub.docker.com/_/telegraf/) [](https://lgtm.com/projects/g/influxdata/telegraf/alerts/)
|
[](https://circleci.com/gh/influxdata/telegraf) [](https://hub.docker.com/_/telegraf/)
|
||||||
[](https://www.influxdata.com/slack)
|
[](https://www.influxdata.com/slack)
|
||||||
|
|
||||||
Telegraf is an agent for collecting, processing, aggregating, and writing metrics.
|
Telegraf is an agent for collecting, processing, aggregating, and writing metrics. Based on a
|
||||||
|
plugin system to enable developers in the community to easily add support for additional
|
||||||
Design goal:
|
metric collection. There are four distinct types of plugins:
|
||||||
- Have a minimal memory footprint with a plugin system so that developers in the community can easily add support for collecting metrics.
|
|
||||||
|
|
||||||
Telegraf is plugin-driven and has the concept of 4 distinct plugin types:
|
|
||||||
|
|
||||||
1. [Input Plugins](/docs/INPUTS.md) collect metrics from the system, services, or 3rd party APIs
|
1. [Input Plugins](/docs/INPUTS.md) collect metrics from the system, services, or 3rd party APIs
|
||||||
2. [Processor Plugins](/docs/PROCESSORS.md) transform, decorate, and/or filter metrics
|
2. [Processor Plugins](/docs/PROCESSORS.md) transform, decorate, and/or filter metrics
|
||||||
3. [Aggregator Plugins](/docs/AGGREGATORS.md) create aggregate metrics (e.g. mean, min, max, quantiles, etc.)
|
3. [Aggregator Plugins](/docs/AGGREGATORS.md) create aggregate metrics (e.g. mean, min, max, quantiles, etc.)
|
||||||
4. [Output Plugins](/docs/OUTPUTS.md) write metrics to various destinations
|
4. [Output Plugins](/docs/OUTPUTS.md) write metrics to various destinations
|
||||||
|
|
||||||
New plugins are designed to be easy to contribute, pull requests are welcomed and we work to incorporate as many pull requests as possible. If none of the internal plugins fit your needs, you could have a look at the
|
New plugins are designed to be easy to contribute, pull requests are welcomed, and we work to
|
||||||
[list of external plugins](EXTERNAL_PLUGINS.md).
|
incorporate as many pull requests as possible. Consider looking at the
|
||||||
|
[list of external plugins](EXTERNAL_PLUGINS.md) as well.
|
||||||
|
|
||||||
## Minimum Requirements
|
## Minimum Requirements
|
||||||
|
|
||||||
Telegraf shares the same [minimum requirements][] as Go:
|
Telegraf shares the same [minimum requirements][] as Go:
|
||||||
|
|
||||||
- Linux kernel version 2.6.23 or later
|
- Linux kernel version 2.6.23 or later
|
||||||
- Windows 7 or later
|
- Windows 7 or later
|
||||||
- FreeBSD 11.2 or later
|
- FreeBSD 11.2 or later
|
||||||
|
|
@ -31,105 +30,122 @@ Telegraf shares the same [minimum requirements][] as Go:
|
||||||
|
|
||||||
[minimum requirements]: https://github.com/golang/go/wiki/MinimumRequirements#minimum-requirements
|
[minimum requirements]: https://github.com/golang/go/wiki/MinimumRequirements#minimum-requirements
|
||||||
|
|
||||||
## Installation:
|
## Obtaining Telegraf
|
||||||
|
|
||||||
You can download the binaries directly from the [downloads](https://www.influxdata.com/downloads) page
|
View the [changelog](/CHANGELOG.md) for the latest updates and changes by version.
|
||||||
or from the [releases](https://github.com/influxdata/telegraf/releases) section.
|
|
||||||
|
|
||||||
### Ansible Role:
|
### Binary Downloads
|
||||||
|
|
||||||
Ansible role: https://github.com/rossmcdonald/telegraf
|
Binary downloads are available from the [InfluxData downloads](https://www.influxdata.com/downloads)
|
||||||
|
page or from each [GitHub Releases](https://github.com/influxdata/telegraf/releases) page.
|
||||||
|
|
||||||
### From Source:
|
### Package Repository
|
||||||
|
|
||||||
|
InfluxData also provides a package repo that contains both DEB and RPM downloads.
|
||||||
|
|
||||||
|
For deb-based platforms run the following to add the repo key and setup a new
|
||||||
|
sources.list entry:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -s https://repos.influxdata.com/influxdb.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdb.gpg
|
||||||
|
export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc)
|
||||||
|
echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.gpg] https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" > /etc/apt/sources.list.d/influxdb.list
|
||||||
|
```
|
||||||
|
|
||||||
|
For RPM-based platforms use the following repo file in `/etc/yum.repos.d/`:
|
||||||
|
|
||||||
|
```text
|
||||||
|
[influxdb]
|
||||||
|
name = InfluxDB Repository - RHEL $releasever
|
||||||
|
baseurl = https://repos.influxdata.com/rhel/$releasever/$basearch/stable
|
||||||
|
enabled = 1
|
||||||
|
gpgcheck = 1
|
||||||
|
gpgkey = https://repos.influxdata.com/influxdb.key
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build From Source
|
||||||
|
|
||||||
Telegraf requires Go version 1.17 or newer, the Makefile requires GNU make.
|
Telegraf requires Go version 1.17 or newer, the Makefile requires GNU make.
|
||||||
|
|
||||||
1. [Install Go](https://golang.org/doc/install) >=1.17 (1.17.2 recommended)
|
1. [Install Go](https://golang.org/doc/install) >=1.17 (1.17.2 recommended)
|
||||||
2. Clone the Telegraf repository:
|
2. Clone the Telegraf repository:
|
||||||
```
|
```
|
||||||
cd ~/src
|
|
||||||
git clone https://github.com/influxdata/telegraf.git
|
git clone https://github.com/influxdata/telegraf.git
|
||||||
```
|
```
|
||||||
3. Run `make` from the source directory
|
3. Run `make` from the source directory
|
||||||
```
|
```
|
||||||
cd ~/src/telegraf
|
cd telegraf
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
### Changelog
|
|
||||||
|
|
||||||
View the [changelog](/CHANGELOG.md) for the latest updates and changes by
|
|
||||||
version.
|
|
||||||
|
|
||||||
### Nightly Builds
|
### Nightly Builds
|
||||||
|
|
||||||
[Nightly](/docs/NIGHTLIES.md) builds are available, generated from the master branch.
|
[Nightly](/docs/NIGHTLIES.md) builds are available, generated from the master branch.
|
||||||
|
|
||||||
### 3rd Party Builds
|
### 3rd Party Builds
|
||||||
|
|
||||||
Builds for other platforms or package formats are provided by members of the Telegraf community. These packages are not built, tested or supported by the Telegraf project or InfluxData, we make no guarantees that they will work. Please get in touch with the package author if you need support.
|
Builds for other platforms or package formats are provided by members of theTelegraf community.
|
||||||
|
These packages are not built, tested, or supported by the Telegraf project or InfluxData. Please
|
||||||
|
get in touch with the package author if support is needed:
|
||||||
|
|
||||||
* Windows
|
- [Ansible Role](https://github.com/rossmcdonald/telegraf)
|
||||||
* [Chocolatey](https://chocolatey.org/packages/telegraf) by [ripclawffb](https://chocolatey.org/profiles/ripclawffb)
|
- [Chocolatey](https://chocolatey.org/packages/telegraf) by [ripclawffb](https://chocolatey.org/profiles/ripclawffb)
|
||||||
* [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/telegraf.json)
|
- [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/telegraf.json)
|
||||||
* Linux
|
- [Snap](https://snapcraft.io/telegraf) by Laurent Sesquès (sajoupa)
|
||||||
* [Snap](https://snapcraft.io/telegraf) by Laurent Sesquès (sajoupa)
|
|
||||||
|
|
||||||
## How to use it:
|
## Getting Started
|
||||||
|
|
||||||
See usage with:
|
See usage with:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
telegraf --help
|
telegraf --help
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Generate a telegraf config file:
|
#### Generate a telegraf config file:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
telegraf config > telegraf.conf
|
telegraf config > telegraf.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Generate config with only cpu input & influxdb output plugins defined:
|
#### Generate config with only cpu input & influxdb output plugins defined:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
telegraf --section-filter agent:inputs:outputs --input-filter cpu --output-filter influxdb config
|
telegraf --section-filter agent:inputs:outputs --input-filter cpu --output-filter influxdb config
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Run a single telegraf collection, outputting metrics to stdout:
|
#### Run a single telegraf collection, outputting metrics to stdout:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
telegraf --config telegraf.conf --test
|
telegraf --config telegraf.conf --test
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Run telegraf with all plugins defined in config file:
|
#### Run telegraf with all plugins defined in config file:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
telegraf --config telegraf.conf
|
telegraf --config telegraf.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Run telegraf, enabling the cpu & memory input, and influxdb output plugins:
|
#### Run telegraf, enabling the cpu & memory input, and influxdb output plugins:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb
|
telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb
|
||||||
```
|
```
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
[Latest Release Documentation][release docs].
|
[Latest Release Documentation](https://docs.influxdata.com/telegraf)
|
||||||
|
|
||||||
For documentation on the latest development code see the [documentation index](/docs).
|
For documentation on the latest development code see the [documentation index](/docs).
|
||||||
|
|
||||||
[release docs]: https://docs.influxdata.com/telegraf
|
|
||||||
[developer docs]: docs
|
|
||||||
- [Input Plugins](/docs/INPUTS.md)
|
- [Input Plugins](/docs/INPUTS.md)
|
||||||
- [Output Plugins](/docs/OUTPUTS.md)
|
- [Output Plugins](/docs/OUTPUTS.md)
|
||||||
- [Processor Plugins](/docs/PROCESSORS.md)
|
- [Processor Plugins](/docs/PROCESSORS.md)
|
||||||
- [Aggregator Plugins](/docs/AGGREGATORS.md)
|
- [Aggregator Plugins](/docs/AGGREGATORS.md)
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
There are many ways to contribute:
|
There are many ways to contribute:
|
||||||
|
|
||||||
- Fix and [report bugs](https://github.com/influxdata/telegraf/issues/new)
|
- Fix and [report bugs](https://github.com/influxdata/telegraf/issues/new)
|
||||||
- [Improve documentation](https://github.com/influxdata/telegraf/issues?q=is%3Aopen+label%3Adocumentation)
|
- [Improve documentation](https://github.com/influxdata/telegraf/issues?q=is%3Aopen+label%3Adocumentation)
|
||||||
- [Review code and feature proposals](https://github.com/influxdata/telegraf/pulls)
|
- [Review code and feature proposals](https://github.com/influxdata/telegraf/pulls)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue