blob: 3ee09cf9267ef06797427da5ffc7be6321481d77 [file] [log] [blame]
Michael Kuty5a2f6c52014-05-04 13:00:37 +02001{% from "fluentd/map.jinja" import server with context %}
Michael Kutyd3460202014-05-03 15:54:26 +02002
Michael Kuty5a2f6c52014-05-04 13:00:37 +02003{%- for config in server.config %}
4
5{%- if config.type == "input" and config.name =="forward" %}
Michael Kutyd3460202014-05-03 15:54:26 +02006<source>
7 type forward
Michael Kuty5a2f6c52014-05-04 13:00:37 +02008 port {{ config.bind.port }}
9 bind {{ config.bind.host }}
Michael Kutyd3460202014-05-03 15:54:26 +020010</source>
Michael Kuty5a2f6c52014-05-04 13:00:37 +020011{%- endif %}
12{%- if config.type == "output" and config.name == "elasticsearch" %}
13<match *>
14 port {{ config.bind.port }}
15 bind {{ config.bind.host }}
16 type elasticsearch
17 logstash_format true
18 flush_interval 10s # for testing
19</match>
20{%- endif %}
21{%- if config.type == "output" and config.name == "mongodb" %}
22<match *>
Michael Kutyd3460202014-05-03 15:54:26 +020023 # plugin type
24 type mongo
25
26 # mongodb db + collection
27 database apache
28 collection access
29
30 # mongodb host + port
31 host localhost
32 port 27017
33
34 # interval
35 flush_interval 10s
36</match>
Michael Kuty5a2f6c52014-05-04 13:00:37 +020037{%- endif %}
Michael Kutyd3460202014-05-03 15:54:26 +020038
Michael Kuty5a2f6c52014-05-04 13:00:37 +020039{%- endfor %}
Michael Kutyd3460202014-05-03 15:54:26 +020040
Michael Kuty5a2f6c52014-05-04 13:00:37 +020041<source>
42 type syslog
43 port 42185
44 tag syslog
45</source>
46
47<source>
48 type tail
49 format apache2
50 path /var/log/httpd/kibana_kibana.access.log
51 pos_file /var/log/td-agent/kibana_kibana.access_log.pos
52 tag mongo.apache.access
53</source>