Telegraf,Influxdb,Grafana: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(→Links) |
|||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 6: | Zeile 6: | ||
**create database telegraf | **create database telegraf | ||
**create user telegraf_admin with password 'sysadm' | **create user telegraf_admin with password 'sysadm' | ||
| + | **grant all on telegraf to telegraf_admin | ||
| + | |||
==Check database and user== | ==Check database and user== | ||
**show databases | **show databases | ||
| Zeile 13: | Zeile 15: | ||
==Install== | ==Install== | ||
*[[Telegraf install]] | *[[Telegraf install]] | ||
| + | ==Config to connect Influxdb and use the Telegraf Dashboard in Grafana== | ||
| + | *cat /etc/telegraf/telegraf.conf | ||
| + | <pre> | ||
| + | [global_tags] | ||
| + | [agent] | ||
| + | interval = "10s" | ||
| + | round_interval = true | ||
| + | metric_batch_size = 1000 | ||
| + | metric_buffer_limit = 10000 | ||
| + | collection_jitter = "0s" | ||
| + | flush_interval = "10s" | ||
| + | flush_jitter = "0s" | ||
| + | precision = "" | ||
| + | debug = false | ||
| + | quiet = false | ||
| + | hostname = "nagus.xxx.org" | ||
| + | omit_hostname = false | ||
| + | [[outputs.influxdb]] | ||
| + | database = "telegraf" | ||
| + | urls = [ "http://127.0.0.1:8086" ] | ||
| + | username = "telegraf_admin" | ||
| + | password = "sysadm" | ||
| + | retention_policy = "" | ||
| + | write_consistency = "any" | ||
| + | timeout = "5s" | ||
| + | [[inputs.cpu]] | ||
| + | percpu = true | ||
| + | totalcpu = true | ||
| + | fielddrop = ["time_*"] | ||
| + | [[inputs.disk]] | ||
| + | ignore_fs = ["tmpfs", "devtmpfs"] | ||
| + | [[inputs.diskio]] | ||
| + | [[inputs.kernel]] | ||
| + | [[inputs.mem]] | ||
| + | [[inputs.processes]] | ||
| + | [[inputs.swap]] | ||
| + | [[inputs.system]] | ||
| + | [[inputs.net]] | ||
| + | [[inputs.netstat]] | ||
| + | [[inputs.interrupts]] | ||
| + | </pre> | ||
| + | |||
| + | ==Restart== | ||
| + | *systemctl restart telegraf | ||
| + | |||
| + | =Grafana= | ||
| + | ==Install== | ||
| + | *[[Grafana install]] | ||
=Links= | =Links= | ||
*https://www.howtoforge.com/tutorial/how-to-install-tig-stack-telegraf-influxdb-and-grafana-on-ubuntu-1804/ | *https://www.howtoforge.com/tutorial/how-to-install-tig-stack-telegraf-influxdb-and-grafana-on-ubuntu-1804/ | ||
*https://grafana.com/docs/installation/debian/ | *https://grafana.com/docs/installation/debian/ | ||
Aktuelle Version vom 10. Oktober 2019, 08:25 Uhr
Influxdb
Install
Create database and a user
- influx
- create database telegraf
- create user telegraf_admin with password 'sysadm'
- grant all on telegraf to telegraf_admin
Check database and user
- show databases
- show users
- exit
Telegraf
Install
Config to connect Influxdb and use the Telegraf Dashboard in Grafana
- cat /etc/telegraf/telegraf.conf
[global_tags] [agent] interval = "10s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 collection_jitter = "0s" flush_interval = "10s" flush_jitter = "0s" precision = "" debug = false quiet = false hostname = "nagus.xxx.org" omit_hostname = false [[outputs.influxdb]] database = "telegraf" urls = [ "http://127.0.0.1:8086" ] username = "telegraf_admin" password = "sysadm" retention_policy = "" write_consistency = "any" timeout = "5s" [[inputs.cpu]] percpu = true totalcpu = true fielddrop = ["time_*"] [[inputs.disk]] ignore_fs = ["tmpfs", "devtmpfs"] [[inputs.diskio]] [[inputs.kernel]] [[inputs.mem]] [[inputs.processes]] [[inputs.swap]] [[inputs.system]] [[inputs.net]] [[inputs.netstat]] [[inputs.interrupts]]
Restart
- systemctl restart telegraf