Dit geeft de verschillen weer tussen de geselecteerde revisie en de huidige revisie van de pagina.
| Beide kanten vorige revisie Vorige revisie Volgende revisie | Vorige revisie | ||
|
installatie_handleidingen:fluentd [2016/08/14 13:34] abel [Fluentd voor elasticsearch op CentOS 7] |
installatie_handleidingen:fluentd [2016/08/24 11:04] (huidige) abel [configuratie] |
||
|---|---|---|---|
| Regel 4: | Regel 4: | ||
| Deze handleiding gaat er van uit dat Fluentd op een server wordt waarop ook Elasticsearch is geïnstalleerd volgens [[installatie_handleidingen: | Deze handleiding gaat er van uit dat Fluentd op een server wordt waarop ook Elasticsearch is geïnstalleerd volgens [[installatie_handleidingen: | ||
| + | ===== Prerequisites ===== | ||
| + | ==== File descriptors ==== | ||
| + | Het maximum aantal open files per proces staat default op 1024 wat voor de meeste installaties prima is. echter fluentd moet er meer open kunnen hebben. | ||
| + | |||
| + | check de huidige settings met '' | ||
| + | |||
| + | pas de settings aan door:'' | ||
| + | |||
| + | en toe te voegen voor ''# | ||
| + | < | ||
| + | root soft nofile 65536 | ||
| + | root hard nofile 65536 | ||
| + | * soft nofile 65536 | ||
| + | * hard nofile 65536 | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Installatie van fluentd ===== | ||
| + | |||
| + | installeer ruby:\\ '' | ||
| + | |||
| + | En gebruik vervolgens de ruby installer om fluentd te installeren: | ||
| + | |||
| + | |||
| + | ==== configuratie file ==== | ||
| + | |||
| + | Maak de configuratie file aan: | ||
| + | |||
| + | '' | ||
| + | vi / | ||
| + | |||
| + | en zet hier in: | ||
| + | < | ||
| + | |||
| + | </ | ||
| + | |||
| + | === systemd start stop configuratie === | ||
| + | |||
| + | Omdat we niet uit een repository hebben geinstalleerd moeten we met de hand een systemd configuratie maken voor fluentd. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | --------------------------------- | ||
| + | =====andere methode===== | ||
| + | |||
| + | Deze methode wordt op de fluentd website aanbevolen. | ||
| + | |||
| + | Het shell script installeert een repository en tegelijk '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ==== configuratie ==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | en zet hier in: | ||
| + | < | ||
| + | #### | ||
| + | ## Output descriptions: | ||
| + | ### | ||
| + | |||
| + | ## match tag=debug.** and dump to console | ||
| + | <match debug.**> | ||
| + | type stdout | ||
| + | </ | ||
| + | |||
| + | #### | ||
| + | ## Source descriptions: | ||
| + | ## | ||
| + | |||
| + | ## built-in TCP input | ||
| + | ## @see http:// | ||
| + | < | ||
| + | type forward | ||
| + | </ | ||
| + | |||
| + | ## built-in UNIX socket input | ||
| + | #< | ||
| + | # type unix | ||
| + | #</ | ||
| + | |||
| + | # HTTP input | ||
| + | # POST http:// | ||
| + | # POST http:// | ||
| + | # @see http:// | ||
| + | < | ||
| + | type http | ||
| + | port 8888 | ||
| + | </ | ||
| + | |||
| + | ## live debugging agent | ||
| + | < | ||
| + | type debug_agent | ||
| + | bind 127.0.0.1 | ||
| + | port 24230 | ||
| + | </ | ||
| + | |||
| + | #### | ||
| + | ## Examples: | ||
| + | ## | ||
| + | |||
| + | ## File input | ||
| + | ## read apache logs continuously and tags td.apache.access | ||
| + | #< | ||
| + | # type tail | ||
| + | # format apache | ||
| + | # path / | ||
| + | # tag td.apache.access | ||
| + | #</ | ||
| + | |||
| + | ## File output | ||
| + | ## match tag=local.** and write to file | ||
| + | #<match local.**> | ||
| + | # type file | ||
| + | # path / | ||
| + | #</ | ||
| + | |||
| + | ## Forwarding | ||
| + | ## match tag=system.** and forward to another td-agent server | ||
| + | #<match system.**> | ||
| + | # type forward | ||
| + | # host 192.168.0.11 | ||
| + | # # secondary host is optional | ||
| + | # < | ||
| + | # host 192.168.0.12 | ||
| + | # </ | ||
| + | #</ | ||
| + | |||
| + | ## Multiple output | ||
| + | ## match tag=td.*.* and output to Treasure Data AND file | ||
| + | #<match td.*.*> | ||
| + | # type copy | ||
| + | # < | ||
| + | # type tdlog | ||
| + | # apikey API_KEY | ||
| + | # auto_create_table | ||
| + | # buffer_type file | ||
| + | # buffer_path / | ||
| + | # </ | ||
| + | # < | ||
| + | # type file | ||
| + | # path / | ||
| + | # </ | ||
| + | #</ | ||
| + | |||
| + | ###SNMP gedeelte | ||
| + | ### | ||
| + | |||
| + | ##SNMP waarden als input | ||
| + | |||
| + | # netwerk | ||
| + | |||
| + | < | ||
| + | type snmp | ||
| + | tag snmp.server3 | ||
| + | nodes name, value | ||
| + | host " | ||
| + | community public | ||
| + | mib ifInOctets.7 | ||
| + | method_type get | ||
| + | polling_time 5 | ||
| + | polling_type async_run | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | type snmp | ||
| + | tag snmp.server4 | ||
| + | nodes name, value | ||
| + | host " | ||
| + | community public | ||
| + | mib ifOutOctets.7 | ||
| + | method_type get | ||
| + | polling_time 5 | ||
| + | polling_type async_run | ||
| + | </ | ||
| + | |||
| + | |||
| + | ##output naar Elasticsearch | ||
| + | |||
| + | <match snmp.server*> | ||
| + | type copy | ||
| + | |||
| + | < | ||
| + | type derive | ||
| + | add_tag_prefix derive | ||
| + | key2 value *8 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | type stdout | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | type elasticsearch | ||
| + | host localhost | ||
| + | port 9200 | ||
| + | type_name traffic | ||
| + | logstash_format true | ||
| + | logstash_prefix snmp | ||
| + | logstash_dateformat %Y%m | ||
| + | |||
| + | buffer_type memory | ||
| + | buffer_chunk_limit 10m | ||
| + | buffer_queue_limit 10 | ||
| + | flush_interval 1s | ||
| + | retry_limit 16 | ||
| + | retry_wait 1s | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ----------------------------------- | ||
| ===== Bronnen ===== | ===== Bronnen ===== | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | |||
| + | |||
| [[https:// | [[https:// | ||