fluentd-linux:
enabled: true
fluentd-windows:
enabled: false
nameOverride: fluentd
rbac:
create: true
serviceAccount:
create: true
service:
type: ClusterIP
ports:
- name: metric
port: 24231
targetPort: metric
secrets:
entry:
fluent.conf: |-
@include /fluentd/etc/config/precan/*.conf
@include /fluentd/etc/config/custom/project/*.conf
@include /fluentd/etc/config/custom/cluster/*.conf
config:
system.conf: |-
@type prometheus
bind 0.0.0.0
port 24231
metrics_path /metrics
@type prometheus_output_monitor
interval 10
pod_name ${hostname}
rpc_endpoint 127.0.0.1:24444
custom_cluster.conf: |-
@type tail
path /var/lib/rancher/log-volumes/*/apache2/*/*
pos_file /fluentd/log/custom_cluster_apache2_new.log.pos
tag tmp-cluster-custom.*
format /^(?[^ ]*) [^ ]* (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/*/nginx/*/*
pos_file /fluentd/log/custom_cluster_nginx_new.log.pos
tag tmp-cluster-custom.*
format /^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/*/rfc3164/*/*
pos_file /fluentd/log/custom_cluster_rfc3164_new.log.pos
tag tmp-cluster-custom.*
format /^\<(?[0-9]+)\>(?
@type tail
path /var/lib/rancher/log-volumes/*/rfc5424/*/*
pos_file /fluentd/log/custom_cluster_rfc5424_new.log.pos
tag tmp-cluster-custom.*
format /\A^\<(?[0-9]{1,3})\>[1-9]\d{0,2} (?
@type tail
path /var/lib/rancher/log-volumes/*/json/*/*
pos_file /fluentd/log/custom_cluster_json_new.log.pos
tag tmp-cluster-custom.*
format json
@type tail
path /var/lib/rancher/log-volumes/*/none/*/*
pos_file /fluentd/log/custom_cluster_none_new.log.pos
tag tmp-cluster-custom.*
@type none
message_key log
@type record_transformer
enable_ruby true
tag ${tag}
cluster_id ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['cluster_id']}
cluster_name ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['cluster_name']}
project_id ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['project_id']}
project_name ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['project_name'].gsub('~', '_')}
workload_name ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['workload_name']}
volume_name ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['volume_name']}
filename ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['filename']}
format ${component = tag.match(Regexp.compile('tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[^_]+)_(?[^_]+)\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])+)_(?[^_^.]+)\.(?.+)')); component['format']}
@type rewrite_tag_filter
key tag
pattern tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)
tag tmp1.cluster-custom.$10_$6_$10_$11
@type kubernetes_metadata
tag_to_kubernetes_name_regexp tmp1\.cluster-custom\.(?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)_(?.+)$
@type rewrite_tag_filter
remove_tag_prefix tmp1
key tag
pattern tmp-cluster-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)
tag cluster-custom
@type record_transformer
enable_ruby
remove_keys tag
custom_project.conf: |-
@type tail
path /var/lib/rancher/log-volumes/*/apache2/*/*
pos_file /fluentd/log/custom_project_apache2_new.log.pos
tag tmp-project-custom.*
format /^(?[^ ]*) [^ ]* (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/*/nginx/*/*
pos_file /fluentd/log/custom_project_nginx_new.log.pos
tag tmp-project-custom.*
format /^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/*/rfc3164/*/*
pos_file /fluentd/log/custom_project_rfc3164_new.log.pos
tag tmp-project-custom.*
format /^\<(?[0-9]+)\>(?
@type tail
path /var/lib/rancher/log-volumes/*/rfc5424/*/*
pos_file /fluentd/log/custom_project_rfc5424_new.log.pos
tag tmp-project-custom.*
format /\A^\<(?[0-9]{1,3})\>[1-9]\d{0,2} (?
@type tail
path /var/lib/rancher/log-volumes/*/json/*/*
pos_file /fluentd/log/custom_project_json_new.log.pos
tag tmp-project-custom.*
format json
@type tail
path /var/lib/rancher/log-volumes/*/none/*/*
pos_file /fluentd/log/custom_project_none_new.log.pos
tag tmp-project-custom.*
@type none
message_key log
@type record_transformer
enable_ruby true
tag ${tag}
cluster_id ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['cluster_id']}
cluster_name ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['cluster_name']}
project_id ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['project_id']}
project_name ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['project_name'].gsub('~', '_')}
workload_name ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['workload_name']}
volume_name ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['volume_name']}
filename ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['filename']}
format ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); component['format']}
cluster_project ${component = tag.match(Regexp.compile('tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)')); "#{component['cluster_id']}:#{component['project_id']}"}
@type rewrite_tag_filter
key tag
pattern tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)
tag tmp1.tmp2-project-custom.$10_$6_$10_$11
@type kubernetes_metadata
tag_to_kubernetes_name_regexp tmp1\.tmp2-project-custom\.(?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?[^_]+)_(?.+)_(?.+)$
@type rewrite_tag_filter
remove_tag_prefix tmp1
key tag
pattern tmp-project-custom\.var\.lib\.rancher\.log-volumes\.((?[^_]+)_(?[^_]+))\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[a-z0-9]([-a-z0-9]*[a-z0-9])*)_(?[^_^.]+)\.(?.+)
tag tmp2-project-custom
@type rewrite_tag_filter
key cluster_project
pattern (?.+\:.+)
tag project-custom.$1
@type record_transformer
enable_ruby
remove_keys docker,tag
legacy_custom_cluster.conf: |-
@type tail
path /var/lib/rancher/log-volumes/apache2/*/*
pos_file /fluentd/log/custom_cluster_apache2.log.pos
tag tmp2.cluster-custom.*
format /^(?[^ ]*) [^ ]* (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/nginx/*/*
pos_file /fluentd/log/custom_cluster_nginx.log.pos
tag tmp2.cluster-custom.*
format /^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/rfc3164/*/*
pos_file /fluentd/log/custom_cluster_rfc3164.log.pos
tag tmp2.cluster-custom.*
format /^\<(?[0-9]+)\>(?
@type tail
path /var/lib/rancher/log-volumes/rfc5424/*/*
pos_file /fluentd/log/custom_cluster_rfc5424.log.pos
tag tmp2.cluster-custom.*
format /\A^\<(?[0-9]{1,3})\>[1-9]\d{0,2} (?
@type tail
path /var/lib/rancher/log-volumes/json/*/*
pos_file /fluentd/log/custom_cluster_json.log.pos
tag tmp2.cluster-custom.*
format json
@type record_transformer
enable_ruby true
tag ${tag}
cluster_id ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$'));component['cluster_id']}
cluster_name ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['cluster_name']}
project_id ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['project_id']}
project_name ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['project_name'].gsub('~', '_')}
workload_name ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['workload_name']}
volume_name ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['volume_name']}
filename ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['filename']}
format ${component = tag.match(Regexp.compile('tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['format']}
@type rewrite_tag_filter
remove_tag_prefix tmp2
key tag
pattern tmp2\.cluster-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$
tag cluster-custom
legacy_custom_project.conf: |-
@type tail
path /var/lib/rancher/log-volumes/apache2/*/*
pos_file /fluentd/log/custom_project_apache2.log.pos
tag tmp2.tmp2-project-custom.*
format /^(?[^ ]*) [^ ]* (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/nginx/*/*
pos_file /fluentd/log/custom_project_nginx.log.pos
tag tmp2.tmp2-project-custom.*
format /^(?[^ ]*) (?[^ ]*) (?[^ ]*) \[(?
@type tail
path /var/lib/rancher/log-volumes/rfc3164/*/*
pos_file /fluentd/log/custom_project_rfc3164.log.pos
tag tmp2.tmp2-project-custom.*
format /^\<(?[0-9]+)\>(?
@type tail
path /var/lib/rancher/log-volumes/rfc5424/*/*
pos_file /fluentd/log/custom_project_rfc5424.log.pos
tag tmp2.tmp2-project-custom.*
format /\A^\<(?[0-9]{1,3})\>[1-9]\d{0,2} (?
@type tail
path /var/lib/rancher/log-volumes/json/*/*
pos_file /fluentd/log/custom_project_json.log.pos
tag tmp2.tmp2-project-custom.*
format json
@type record_transformer
enable_ruby true
tag ${tag}
cluster_id ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['cluster_id']}
cluster_name ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['cluster_name']}
project_id ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['project_id']}
project_name ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['project_name']}
workload_name ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['workload_name']}
volume_name ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['volume_name']}
filename ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['filename']}
format ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); component['format']}
cluster_project ${component = tag.match(Regexp.compile('tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?.+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$')); "#{component['cluster_id']}:#{component['project_id']}"}
@type rewrite_tag_filter
remove_tag_prefix tmp2
key tag
pattern tmp2\.tmp2-project-custom\.var\.lib\.rancher\.log-volumes\.(?[a-z0-9]+)\.(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_]+)_(?[^_^.]+)\.(?.+)$
tag tmp2-project-custom