Michael Kuty | 5a2f6c5 | 2014-05-04 13:00:37 +0200 | [diff] [blame] | 1 | {% from "fluentd/map.jinja" import server with context %} |
Michael Kuty | d346020 | 2014-05-03 15:54:26 +0200 | [diff] [blame] | 2 | |
Michael Kuty | 5a2f6c5 | 2014-05-04 13:00:37 +0200 | [diff] [blame] | 3 | {%- for config in server.config %} |
| 4 | |
| 5 | {%- if config.type == "input" and config.name =="forward" %} |
Michael Kuty | d346020 | 2014-05-03 15:54:26 +0200 | [diff] [blame] | 6 | <source> |
| 7 | type forward |
Michael Kuty | 5a2f6c5 | 2014-05-04 13:00:37 +0200 | [diff] [blame] | 8 | port {{ config.bind.port }} |
| 9 | bind {{ config.bind.host }} |
Michael Kuty | d346020 | 2014-05-03 15:54:26 +0200 | [diff] [blame] | 10 | </source> |
Michael Kuty | 5a2f6c5 | 2014-05-04 13:00:37 +0200 | [diff] [blame] | 11 | {%- 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 Kuty | d346020 | 2014-05-03 15:54:26 +0200 | [diff] [blame] | 23 | # 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 Kuty | 5a2f6c5 | 2014-05-04 13:00:37 +0200 | [diff] [blame] | 37 | {%- endif %} |
Michael Kuty | d346020 | 2014-05-03 15:54:26 +0200 | [diff] [blame] | 38 | |
Michael Kuty | 5a2f6c5 | 2014-05-04 13:00:37 +0200 | [diff] [blame] | 39 | {%- endfor %} |
Michael Kuty | d346020 | 2014-05-03 15:54:26 +0200 | [diff] [blame] | 40 | |
Michael Kuty | 5a2f6c5 | 2014-05-04 13:00:37 +0200 | [diff] [blame] | 41 | <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> |