summaryrefslogtreecommitdiffstats
path: root/roles/fluentd_node/templates
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2015-06-01 16:00:11 -0700
committerJhon Honce <jhonce@redhat.com>2015-06-01 16:00:11 -0700
commit433e3c77adf99cfaa5d6b8f94d2f0065f187b0fc (patch)
treea1e01051d2e971364c4415a673a6c8683b80d2fb /roles/fluentd_node/templates
parent92524d99ddcb5365bebf3e73e32ab604581d0fd9 (diff)
parent3f486ba15524ece60a2e211416535ca3d40708bc (diff)
downloadopenshift-433e3c77adf99cfaa5d6b8f94d2f0065f187b0fc.tar.gz
openshift-433e3c77adf99cfaa5d6b8f94d2f0065f187b0fc.tar.bz2
openshift-433e3c77adf99cfaa5d6b8f94d2f0065f187b0fc.tar.xz
openshift-433e3c77adf99cfaa5d6b8f94d2f0065f187b0fc.zip
Merge pull request #190 from jwhonce/wip/containers
Infrastructure - Deploy services in cluster @twiest All comments covered.
Diffstat (limited to 'roles/fluentd_node/templates')
-rw-r--r--roles/fluentd_node/templates/kubernetes.conf.j253
-rw-r--r--roles/fluentd_node/templates/td-agent.j22
2 files changed, 55 insertions, 0 deletions
diff --git a/roles/fluentd_node/templates/kubernetes.conf.j2 b/roles/fluentd_node/templates/kubernetes.conf.j2
new file mode 100644
index 000000000..5f1eecb20
--- /dev/null
+++ b/roles/fluentd_node/templates/kubernetes.conf.j2
@@ -0,0 +1,53 @@
+<source>
+ type tail
+ path /var/lib/docker/containers/*/*-json.log
+ pos_file /var/log/td-agent/tmp/fluentd-docker.pos
+ time_format %Y-%m-%dT%H:%M:%S
+ tag docker.*
+ format json
+ read_from_head true
+</source>
+
+<match docker.var.lib.docker.containers.*.*.log>
+ type kubernetes
+ container_id ${tag_parts[5]}
+ tag docker.${name}
+</match>
+
+<match kubernetes>
+ type copy
+
+ <store>
+ type forward
+ send_timeout 60s
+ recover_wait 10s
+ heartbeat_interval 1s
+ phi_threshold 16
+ hard_timeout 60s
+ log_level trace
+ require_ack_response true
+ heartbeat_type tcp
+
+ <server>
+ name {{groups['oo_first_master'][0]}}
+ host {{hostvars[groups['oo_first_master'][0]].openshift.common.hostname}}
+ port 24224
+ weight 60
+ </server>
+
+ <secondary>
+ type file
+ path /var/log/td-agent/forward-failed
+ </secondary>
+ </store>
+
+ <store>
+ type file
+ path /var/log/td-agent/containers.log
+ time_slice_format %Y%m%d
+ time_slice_wait 10m
+ time_format %Y%m%dT%H%M%S%z
+ compress gzip
+ utc
+ </store>
+</match>
diff --git a/roles/fluentd_node/templates/td-agent.j2 b/roles/fluentd_node/templates/td-agent.j2
new file mode 100644
index 000000000..7245e11ec
--- /dev/null
+++ b/roles/fluentd_node/templates/td-agent.j2
@@ -0,0 +1,2 @@
+DAEMON_ARGS=
+TD_AGENT_ARGS="/usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --use-v1-config"