Telegraf,Influxdb,Grafana: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (Eine dazwischenliegende Version desselben Benutzers wird 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 | + | ==Config to connect Influxdb and use the Telegraf Dashboard in Grafana== |
| − | *cat /etc/ | + | *cat /etc/telegraf/telegraf.conf |
<pre> | <pre> | ||
[global_tags] | [global_tags] | ||
| Zeile 54: | Zeile 56: | ||
[[inputs.interrupts]] | [[inputs.interrupts]] | ||
</pre> | </pre> | ||
| + | |||
==Restart== | ==Restart== | ||
*systemctl restart telegraf | *systemctl restart telegraf | ||
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