Telegraf: Difference between revisions
(Created page with "=Telegraf= https://github.com/influxdb/telegraf ''agent written in Go for collecting metrics from the system it's running on, or from other services, and writing them into...") |
|||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
''agent written in Go for collecting metrics from the system it's running on, or from other services, and writing them into [[InfluxDB]]. '' |
|||
=[[Telegraf]]= |
|||
https://github.com/influxdb/telegraf |
* https://github.com/influxdb/telegraf |
||
* https://influxdata.com/time-series-platform/telegraf/ |
|||
''agent written in Go for collecting metrics from the system it's running on, or from other services, and writing them into InfluxDB. '' |
|||
Telegraf propose de nombreux plugins pour |
|||
aerospike |
|||
apache |
|||
bcache |
|||
disque |
|||
docker |
|||
elasticsearch |
|||
exec (generic JSON-emitting executable plugin) |
|||
haproxy |
|||
httpjson (generic JSON-emitting http service plugin) |
|||
influxdb |
|||
jolokia |
|||
leofs |
|||
lustre2 |
|||
mailchimp |
|||
memcached |
|||
mongodb |
|||
mysql |
|||
nginx |
|||
nsq |
|||
phpfpm |
|||
phusion passenger |
|||
ping |
|||
postgresql |
|||
powerdns |
|||
procstat |
|||
prometheus |
|||
puppetagent |
|||
rabbitmq |
|||
redis |
|||
rethinkdb |
|||
sql server (microsoft) |
|||
twemproxy |
|||
zfs |
|||
zookeeper |
|||
sensors |
|||
snmp |
|||
win_perf_counters (windows performance counters) |
|||
system |
|||
=Installation= |
|||
==Sur [[Debian]]== |
|||
Il faut préalablement installer et démarrer [[InfluxDB]]. |
|||
<pre> |
|||
wget http://get.influxdb.org/telegraf/telegraf_0.10.1-1_amd64.deb |
|||
sudo dpkg -i telegraf_0.10.1-1_amd64.deb |
|||
telegraf -help |
|||
telegraf --usage mysql |
|||
telegraf --usage influxdb |
|||
</pre> |
|||
==Avec [[Docker]]== |
|||
Suivre |
|||
* https://hub.docker.com/r/bbailey/telegraf/ |
|||
* https://github.com/benfb/docker-telegraf |
|||
=Configuration= |
|||
<pre> |
|||
telegraf -sample-config > telegraf.conf |
|||
</pre> |
|||
Editer le fichier de configuration telegraf.conf pour donner le serveur influxdb (par défaut localhost). |
|||
=Lancement= |
|||
<pre> |
|||
telegraf -config telegraf.conf -input-filter cpu:mem:disk:diskio:swap:net:netstat -output-filter influxdb |
|||
</pre> |
|||
=Requêtes= |
|||
==Depuis le shell influx== |
|||
<pre> |
|||
SHOW DATABASES |
|||
USE telegraf |
|||
SELECT * FROM cpu |
|||
SELECT * FROM cpu, mem LIMIT 1 |
|||
SELECT * FROM /.*/ LIMIT 1 |
|||
</pre> |
|||
==Depuis [[Chronograf]]== |
|||
Ajouter un graphique avec SELECT * FROM cpu |
|||
==Depuis [[Grafana]]== |
|||
Importer et configurer le dashboard pour [https://grafana.net/dashboards/61 Telegraf] via la console Web ou la ligne de commande. |
|||
=Extra: Telegraf usages= |
|||
<pre> |
|||
#!/bin/sh |
|||
PLUGINS=" |
|||
aerospike \ |
|||
apache \ |
|||
bcache \ |
|||
disque \ |
|||
docker \ |
|||
elasticsearch \ |
|||
exec \ |
|||
haproxy \ |
|||
httpjson \ |
|||
influxdb \ |
|||
jolokia \ |
|||
leofs \ |
|||
lustre2 \ |
|||
mailchimp \ |
|||
memcached \ |
|||
mongodb \ |
|||
mysql \ |
|||
nginx \ |
|||
nsq \ |
|||
phpfpm \ |
|||
phusion \ |
|||
ping \ |
|||
postgresql \ |
|||
powerdns \ |
|||
procstat \ |
|||
prometheus \ |
|||
puppetagent \ |
|||
rabbitmq \ |
|||
redis \ |
|||
rethinkdb \ |
|||
sqlserver \ |
|||
twemproxy \ |
|||
zfs \ |
|||
zookeeper \ |
|||
sensors \ |
|||
snmp \ |
|||
win_perf_counters \ |
|||
system \ |
|||
statsd \ |
|||
kafka_consumer \ |
|||
github_webhooks \ |
|||
influxdb \ |
|||
amon \ |
|||
amqp \ |
|||
kinesis \ |
|||
cloudwatch \ |
|||
datadog \ |
|||
graphite \ |
|||
kafka \ |
|||
librato \ |
|||
mqtt \ |
|||
nsq \ |
|||
opentsdb \ |
|||
prometheus \ |
|||
riemann \ |
|||
" |
|||
for p in $PLUGINS |
|||
do |
|||
echo "\n===============" |
|||
echo $p |
|||
echo "===============" |
|||
telegraf --usage $p |
|||
done |
|||
</pre> |
Latest revision as of 08:49, 30 August 2016
agent written in Go for collecting metrics from the system it's running on, or from other services, and writing them into InfluxDB.
Telegraf propose de nombreux plugins pour aerospike apache bcache disque docker elasticsearch exec (generic JSON-emitting executable plugin) haproxy httpjson (generic JSON-emitting http service plugin) influxdb jolokia leofs lustre2 mailchimp memcached mongodb mysql nginx nsq phpfpm phusion passenger ping postgresql powerdns procstat prometheus puppetagent rabbitmq redis rethinkdb sql server (microsoft) twemproxy zfs zookeeper sensors snmp win_perf_counters (windows performance counters) system
Installation
Sur Debian
Il faut préalablement installer et démarrer InfluxDB.
wget http://get.influxdb.org/telegraf/telegraf_0.10.1-1_amd64.deb sudo dpkg -i telegraf_0.10.1-1_amd64.deb telegraf -help telegraf --usage mysql telegraf --usage influxdb
Avec Docker
Suivre
Configuration
telegraf -sample-config > telegraf.conf
Editer le fichier de configuration telegraf.conf pour donner le serveur influxdb (par défaut localhost).
Lancement
telegraf -config telegraf.conf -input-filter cpu:mem:disk:diskio:swap:net:netstat -output-filter influxdb
Requêtes
Depuis le shell influx
SHOW DATABASES USE telegraf SELECT * FROM cpu SELECT * FROM cpu, mem LIMIT 1 SELECT * FROM /.*/ LIMIT 1
Depuis Chronograf
Ajouter un graphique avec SELECT * FROM cpu
Depuis Grafana
Importer et configurer le dashboard pour Telegraf via la console Web ou la ligne de commande.
Extra: Telegraf usages
#!/bin/sh PLUGINS=" aerospike \ apache \ bcache \ disque \ docker \ elasticsearch \ exec \ haproxy \ httpjson \ influxdb \ jolokia \ leofs \ lustre2 \ mailchimp \ memcached \ mongodb \ mysql \ nginx \ nsq \ phpfpm \ phusion \ ping \ postgresql \ powerdns \ procstat \ prometheus \ puppetagent \ rabbitmq \ redis \ rethinkdb \ sqlserver \ twemproxy \ zfs \ zookeeper \ sensors \ snmp \ win_perf_counters \ system \ statsd \ kafka_consumer \ github_webhooks \ influxdb \ amon \ amqp \ kinesis \ cloudwatch \ datadog \ graphite \ kafka \ librato \ mqtt \ nsq \ opentsdb \ prometheus \ riemann \ " for p in $PLUGINS do echo "\n===============" echo $p echo "===============" telegraf --usage $p done