|
| 1 | +# AUTOMATICALLY GENERATED |
| 2 | +# DO NOT EDIT THIS FILE DIRECTLY, USE /templates/conf/kubernetes.conf.erb |
| 3 | + |
| 4 | +<match fluent.**> |
| 5 | + type null |
| 6 | +</match> |
| 7 | + |
| 8 | +<source> |
| 9 | + type tail |
| 10 | + path /var/log/containers/*.log |
| 11 | + pos_file /var/log/fluentd-containers.log.pos |
| 12 | + time_format %Y-%m-%dT%H:%M:%S.%NZ |
| 13 | + tag kubernetes.* |
| 14 | + format json |
| 15 | + read_from_head true |
| 16 | +</source> |
| 17 | + |
| 18 | +<source> |
| 19 | + type tail |
| 20 | + format /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/ |
| 21 | + time_format %Y-%m-%d %H:%M:%S |
| 22 | + path /var/log/salt/minion |
| 23 | + pos_file /var/log/fluentd-salt.pos |
| 24 | + tag salt |
| 25 | +</source> |
| 26 | + |
| 27 | +<source> |
| 28 | + type tail |
| 29 | + format syslog |
| 30 | + path /var/log/startupscript.log |
| 31 | + pos_file /var/log/fluentd-startupscript.log.pos |
| 32 | + tag startupscript |
| 33 | +</source> |
| 34 | + |
| 35 | +<source> |
| 36 | + type tail |
| 37 | + format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/ |
| 38 | + path /var/log/docker.log |
| 39 | + pos_file /var/log/fluentd-docker.log.pos |
| 40 | + tag docker |
| 41 | +</source> |
| 42 | + |
| 43 | +<source> |
| 44 | + type tail |
| 45 | + format none |
| 46 | + path /var/log/etcd.log |
| 47 | + pos_file /var/log/fluentd-etcd.log.pos |
| 48 | + tag etcd |
| 49 | +</source> |
| 50 | + |
| 51 | +<source> |
| 52 | + type tail |
| 53 | + format kubernetes |
| 54 | + multiline_flush_interval 5s |
| 55 | + path /var/log/kubelet.log |
| 56 | + pos_file /var/log/fluentd-kubelet.log.pos |
| 57 | + tag kubelet |
| 58 | +</source> |
| 59 | + |
| 60 | +<source> |
| 61 | + type tail |
| 62 | + format kubernetes |
| 63 | + multiline_flush_interval 5s |
| 64 | + path /var/log/kube-proxy.log |
| 65 | + pos_file /var/log/fluentd-kube-proxy.log.pos |
| 66 | + tag kube-proxy |
| 67 | +</source> |
| 68 | + |
| 69 | +<source> |
| 70 | + type tail |
| 71 | + format kubernetes |
| 72 | + multiline_flush_interval 5s |
| 73 | + path /var/log/kube-apiserver.log |
| 74 | + pos_file /var/log/fluentd-kube-apiserver.log.pos |
| 75 | + tag kube-apiserver |
| 76 | +</source> |
| 77 | + |
| 78 | +<source> |
| 79 | + type tail |
| 80 | + format kubernetes |
| 81 | + multiline_flush_interval 5s |
| 82 | + path /var/log/kube-controller-manager.log |
| 83 | + pos_file /var/log/fluentd-kube-controller-manager.log.pos |
| 84 | + tag kube-controller-manager |
| 85 | +</source> |
| 86 | + |
| 87 | +<source> |
| 88 | + type tail |
| 89 | + format kubernetes |
| 90 | + multiline_flush_interval 5s |
| 91 | + path /var/log/kube-scheduler.log |
| 92 | + pos_file /var/log/fluentd-kube-scheduler.log.pos |
| 93 | + tag kube-scheduler |
| 94 | +</source> |
| 95 | + |
| 96 | +<source> |
| 97 | + type tail |
| 98 | + format kubernetes |
| 99 | + multiline_flush_interval 5s |
| 100 | + path /var/log/rescheduler.log |
| 101 | + pos_file /var/log/fluentd-rescheduler.log.pos |
| 102 | + tag rescheduler |
| 103 | +</source> |
| 104 | + |
| 105 | +<source> |
| 106 | + type tail |
| 107 | + format kubernetes |
| 108 | + multiline_flush_interval 5s |
| 109 | + path /var/log/glbc.log |
| 110 | + pos_file /var/log/fluentd-glbc.log.pos |
| 111 | + tag glbc |
| 112 | +</source> |
| 113 | + |
| 114 | +<source> |
| 115 | + type tail |
| 116 | + format kubernetes |
| 117 | + multiline_flush_interval 5s |
| 118 | + path /var/log/cluster-autoscaler.log |
| 119 | + pos_file /var/log/fluentd-cluster-autoscaler.log.pos |
| 120 | + tag cluster-autoscaler |
| 121 | +</source> |
| 122 | + |
| 123 | +# Example: |
| 124 | +# 2017-02-09T00:15:57.992775796Z AUDIT: id="90c73c7c-97d6-4b65-9461-f94606ff825f" ip="104.132.1.72" method="GET" user="kubecfg" as="<self>" asgroups="<lookup>" namespace="default" uri="/api/v1/namespaces/default/pods" |
| 125 | +# 2017-02-09T00:15:57.993528822Z AUDIT: id="90c73c7c-97d6-4b65-9461-f94606ff825f" response="200" |
| 126 | +<source> |
| 127 | + type tail |
| 128 | + format multiline |
| 129 | + multiline_flush_interval 5s |
| 130 | + format_firstline /^\S+\s+AUDIT:/ |
| 131 | + # Fields must be explicitly captured by name to be parsed into the record. |
| 132 | + # Fields may not always be present, and order may change, so this just looks |
| 133 | + # for a list of key="\"quoted\" value" pairs separated by spaces. |
| 134 | + # Unknown fields are ignored. |
| 135 | + # Note: We can't separate query/response lines as format1/format2 because |
| 136 | + # they don't always come one after the other for a given query. |
| 137 | + format1 /^(?<time>\S+) AUDIT:(?: (?:id="(?<id>(?:[^"\\]|\\.)*)"|ip="(?<ip>(?:[^"\\]|\\.)*)"|method="(?<method>(?:[^"\\]|\\.)*)"|user="(?<user>(?:[^"\\]|\\.)*)"|groups="(?<groups>(?:[^"\\]|\\.)*)"|as="(?<as>(?:[^"\\]|\\.)*)"|asgroups="(?<asgroups>(?:[^"\\]|\\.)*)"|namespace="(?<namespace>(?:[^"\\]|\\.)*)"|uri="(?<uri>(?:[^"\\]|\\.)*)"|response="(?<response>(?:[^"\\]|\\.)*)"|\w+="(?:[^"\\]|\\.)*"))*/ |
| 138 | + time_format %FT%T.%L%Z |
| 139 | + path /var/log/kubernetes/kube-apiserver-audit.log |
| 140 | + pos_file /var/log/kube-apiserver-audit.log.pos |
| 141 | + tag kube-apiserver-audit |
| 142 | +</source> |
| 143 | + |
| 144 | +<filter kubernetes.**> |
| 145 | + type kubernetes_metadata |
| 146 | +</filter> |
| 147 | + |
0 commit comments