01 - Telegraf: First Steps and Guide-Lines: Unterschied zwischen den Versionen
Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Installation == == Installing Telegraf Agent as a Windows Service with a configuration directory (recommended) == .\telegraf.exe --service install --config…“) |
Admin (Diskussion | Beiträge) K |
||
(34 dazwischenliegende Versionen des gleichen Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
+ | [[Datei:01-telegraf architecture.gif|800px|right]]<br> | ||
== Installation == | == Installation == | ||
− | == Installing Telegraf Agent as a Windows Service with a configuration directory (recommended) == | + | === Installing Telegraf Agent as a Windows Service with a configuration directory (recommended) === |
.\telegraf.exe --service install --config-directory "C:\Program Files\Telegraf\telegraf.d" | .\telegraf.exe --service install --config-directory "C:\Program Files\Telegraf\telegraf.d" | ||
− | == Installing Telegraf Agent as a Windows Service with a configuration directory and the default configuration file == | + | === Installing Telegraf Agent as a Windows Service with a configuration directory and the default configuration file === |
.\telegraf.exe --service install --config "C:\Program Files\Telegraf\telegraf.conf" --config-directory "C:\Program Files\Telegraf\telegraf.d" | .\telegraf.exe --service install --config "C:\Program Files\Telegraf\telegraf.conf" --config-directory "C:\Program Files\Telegraf\telegraf.d" | ||
− | == Installing Telegraf Agent as a Windows Service == | + | === Installing Telegraf Agent as a Windows Service === |
''The Telegraf Agent searches the configuration: "C:\Program Files\Telegraf\telegraf.conf"'' | ''The Telegraf Agent searches the configuration: "C:\Program Files\Telegraf\telegraf.conf"'' | ||
.\telegraf.exe --service install | .\telegraf.exe --service install | ||
+ | |||
+ | |||
+ | == Deinstallation == | ||
+ | === Deinstallation of the Telegraf agent (Windows Service) === | ||
+ | .\telegraf.exe --service uninstall | ||
+ | |||
+ | |||
+ | == Testing / Debugging == | ||
+ | === Testing Telegraf input configurations === | ||
+ | .\telegraf.exe --config-directory .\telegraf.d\ --test --debug | ||
+ | |||
+ | |||
+ | == Useful Telegraf queries == | ||
+ | === Show Telegraf version === | ||
+ | .\telegraf.exe version | ||
+ | |||
+ | === Show all Telegraf input plugins === | ||
+ | .\telegraf.exe --input-list | ||
+ | |||
+ | === Create a Telegraf config (example with the Input-Plugin "disk") === | ||
+ | .\telegraf.exe --section-filter agent:inputs --input-filter disk config > telegraf.conf | ||
+ | If you get an error: ''[telegraf] Error running agent: Error loading config file telegraf.conf: Error parsing data: line 1: invalid TOML syntax'' then maybe the enconding of the file "telegraf.conf" is not UTF-8. | ||
Zeile 20: | Zeile 43: | ||
<Telegraf-Type>.<Plugin>.<Component>.<Optionals>.conf | <Telegraf-Type>.<Plugin>.<Component>.<Optionals>.conf | ||
− | '''Example: An Input-Plugin to collect VHD informations with a PowerShell-Script:''' inputs.exec.vhd.conf | + | '''Example: An Input-Plugin to collect VHD informations with a PowerShell-Script:''' inputs.exec.vhd.conf <br> |
− | '''Example: An Input-Plugin to collect Basic Windows informations with Perfmon:''' inputs.win_perf_counters.basic.conf | + | '''Example: An Input-Plugin to collect Basic Windows informations with Perfmon:''' inputs.win_perf_counters.basic.conf <br> |
− | '''Example: An Input-Plugin to collect Hyper-V informations with Perfmon:''' inputs. | + | '''Example: An Input-Plugin to collect Hyper-V informations with Perfmon:''' inputs.win_perf_counters.hyper-v.conf <br> |
− | '''Example: Telegraf-Agent configurations:''' agent.global.conf | + | '''Example: Telegraf-Agent configurations:''' agent.global.conf <br> |
− | '''Example: Global tagging:''' tags.global.conf | + | '''Example: Global tagging:''' tags.global.conf <br> |
− | '''Example: InfluxDB configurations:''' outputs.global.influxdb.conf | + | '''Example: InfluxDB configurations:''' outputs.global.influxdb.conf <br> |
− | '''Example: Internal Monitoring of the Telegraf Agent:''' inputs.internal.telegraf.conf | + | '''Example: Internal Monitoring of the Telegraf Agent:''' inputs.internal.telegraf.conf <br> |
+ | '''Example: Aggregator "BasicStats":''' aggregators.basicstats.global.conf <br> | ||
+ | |||
'''Telegraf-Types''' | '''Telegraf-Types''' | ||
Zeile 37: | Zeile 62: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | === Telegraf Inputs === | |
− | + | Telegraf Inputs are documented in: [[Telegraf: Input Plugins]] | |
− | + | ||
− | + | ||
− | + | ||
+ | === Telegraf Processors === | ||
+ | Telegraf Processors are documented in: [[Telegraf: Processor Plugins]] | ||
Aktuelle Version vom 20. Januar 2022, 10:51 Uhr
Inhaltsverzeichnis
Installation
Installing Telegraf Agent as a Windows Service with a configuration directory (recommended)
.\telegraf.exe --service install --config-directory "C:\Program Files\Telegraf\telegraf.d"
Installing Telegraf Agent as a Windows Service with a configuration directory and the default configuration file
.\telegraf.exe --service install --config "C:\Program Files\Telegraf\telegraf.conf" --config-directory "C:\Program Files\Telegraf\telegraf.d"
Installing Telegraf Agent as a Windows Service
The Telegraf Agent searches the configuration: "C:\Program Files\Telegraf\telegraf.conf"
.\telegraf.exe --service install
Deinstallation
Deinstallation of the Telegraf agent (Windows Service)
.\telegraf.exe --service uninstall
Testing / Debugging
Testing Telegraf input configurations
.\telegraf.exe --config-directory .\telegraf.d\ --test --debug
Useful Telegraf queries
Show Telegraf version
.\telegraf.exe version
Show all Telegraf input plugins
.\telegraf.exe --input-list
Create a Telegraf config (example with the Input-Plugin "disk")
.\telegraf.exe --section-filter agent:inputs --input-filter disk config > telegraf.conf
If you get an error: [telegraf] Error running agent: Error loading config file telegraf.conf: Error parsing data: line 1: invalid TOML syntax then maybe the enconding of the file "telegraf.conf" is not UTF-8.
Telegraf Configurations/Plugins
All Telegraf Plugins are Built-In. That means you don't use extra plugin file, you can use the plugin directly you only have to write a configuration file ".conf".
Guide-Line: Save all Telegraf configurations/plugins in .conf files at: C:\Program Files\Telegraf\telegraf.d
Naming (Guide-Line)
<Telegraf-Type>.<Plugin>.<Component>.<Optionals>.conf
Example: An Input-Plugin to collect VHD informations with a PowerShell-Script: inputs.exec.vhd.conf
Example: An Input-Plugin to collect Basic Windows informations with Perfmon: inputs.win_perf_counters.basic.conf
Example: An Input-Plugin to collect Hyper-V informations with Perfmon: inputs.win_perf_counters.hyper-v.conf
Example: Telegraf-Agent configurations: agent.global.conf
Example: Global tagging: tags.global.conf
Example: InfluxDB configurations: outputs.global.influxdb.conf
Example: Internal Monitoring of the Telegraf Agent: inputs.internal.telegraf.conf
Example: Aggregator "BasicStats": aggregators.basicstats.global.conf
Telegraf-Types
- input
- output
- aggregator
- processor
- agent (Agent configurations: Global Intervalls,...)
- tags (Definition of global tags)
Telegraf Inputs
Telegraf Inputs are documented in: Telegraf: Input Plugins
Telegraf Processors
Telegraf Processors are documented in: Telegraf: Processor Plugins