mirror of
https://gitlab.com/shouptech/flux.git
synced 2026-02-03 19:39:43 +00:00
Compare commits
9 commits
1a8448b816
...
9713453a53
| Author | SHA1 | Date | |
|---|---|---|---|
| 9713453a53 | |||
| 11f516b7e8 | |||
| 2aa26b5a22 | |||
| 3d16c9b425 | |||
| 7a338c4a2e | |||
| 4cf178c8fd | |||
| 2867634567 | |||
| 18cb5acccf | |||
| 544c968654 |
3 changed files with 38 additions and 3 deletions
3
flux.yml
3
flux.yml
|
|
@ -213,6 +213,9 @@ spec:
|
||||||
# Enable garbage collection
|
# Enable garbage collection
|
||||||
- --sync-garbage-collection
|
- --sync-garbage-collection
|
||||||
|
|
||||||
|
# Set log format to json
|
||||||
|
- --log-format=json
|
||||||
|
|
||||||
# Optional DNS settings, configuring the ndots option may resolve
|
# Optional DNS settings, configuring the ndots option may resolve
|
||||||
# nslookup issues on some Kubernetes setups.
|
# nslookup issues on some Kubernetes setups.
|
||||||
# dnsPolicy: "None"
|
# dnsPolicy: "None"
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ data:
|
||||||
@include "#{ENV['FLUENTD_SYSTEMD_CONF'] || 'systemd'}.conf"
|
@include "#{ENV['FLUENTD_SYSTEMD_CONF'] || 'systemd'}.conf"
|
||||||
@include "#{ENV['FLUENTD_PROMETHEUS_CONF'] || 'prometheus'}.conf"
|
@include "#{ENV['FLUENTD_PROMETHEUS_CONF'] || 'prometheus'}.conf"
|
||||||
@include kubernetes.conf
|
@include kubernetes.conf
|
||||||
|
@include nextcloud.conf
|
||||||
@include conf.d/*.conf
|
@include conf.d/*.conf
|
||||||
@include filters.conf
|
@include filters.conf
|
||||||
|
|
||||||
|
|
@ -54,26 +55,50 @@ data:
|
||||||
disable.conf: ""
|
disable.conf: ""
|
||||||
|
|
||||||
filters.conf: |
|
filters.conf: |
|
||||||
<filter kubernetes.var.log.containers.nextcloud-**>
|
<filter kubernetes.var.log.containers.nextcloud-** kubernetes.var.log.containers.echoserver-**>
|
||||||
@type parser
|
@type parser
|
||||||
key_name log
|
key_name log
|
||||||
reserve_data true
|
reserve_data true
|
||||||
inject_key_prefix apache2.
|
|
||||||
<parse>
|
<parse>
|
||||||
@type apache2
|
@type apache2
|
||||||
</parse>
|
</parse>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<filter kubernetes.var.log.containers.hass-**>
|
<filter kubernetes.var.log.containers.hass-**>
|
||||||
@type parser
|
@type parser
|
||||||
key_name log
|
key_name log
|
||||||
reserve_data true
|
reserve_data true
|
||||||
inject_key_prefix hass.
|
|
||||||
<parse>
|
<parse>
|
||||||
@type regexp
|
@type regexp
|
||||||
expression /^(?<logtime>.*) (?<level>.*) \((?<thread>.*)\) \[(?<source>.*)\] (?<message>.*)$/
|
expression /^(?<logtime>.*) (?<level>.*) \((?<thread>.*)\) \[(?<source>.*)\] (?<message>.*)$/
|
||||||
</parse>
|
</parse>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
|
<filter kubernetes.var.log.containers.flux-**>
|
||||||
|
@type parser
|
||||||
|
key_name log
|
||||||
|
reserve_data true
|
||||||
|
<parse>
|
||||||
|
@type json
|
||||||
|
</parse>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
nextcloud.conf: |
|
||||||
|
<source>
|
||||||
|
@type tail
|
||||||
|
@id in_tail_nextcloud_log
|
||||||
|
path /opt/nextcloud/nextcloud.log
|
||||||
|
pos_file /var/log/nextcloud.log.pos
|
||||||
|
tag nextcloud.log
|
||||||
|
read_from_head true
|
||||||
|
reserve_data true
|
||||||
|
<parse>
|
||||||
|
@type json
|
||||||
|
time_key time
|
||||||
|
time_format %Y-%m-%dT%H:%M:%S%z
|
||||||
|
</parse>
|
||||||
|
</source>
|
||||||
|
|
||||||
kubernetes.conf: |
|
kubernetes.conf: |
|
||||||
<label @FLUENT_LOG>
|
<label @FLUENT_LOG>
|
||||||
<match fluent.**>
|
<match fluent.**>
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,9 @@ spec:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /fluentd/etc
|
mountPath: /fluentd/etc
|
||||||
|
- name: nextcloud-data
|
||||||
|
mountPath: /opt/nextcloud/nextcloud.log
|
||||||
|
subPath: data/nextcloud.log
|
||||||
terminationGracePeriodSeconds: 30
|
terminationGracePeriodSeconds: 30
|
||||||
volumes:
|
volumes:
|
||||||
- name: varlog
|
- name: varlog
|
||||||
|
|
@ -116,3 +119,7 @@ spec:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: fluentd-logging
|
name: fluentd-logging
|
||||||
|
- name: nextcloud-data
|
||||||
|
hostPath:
|
||||||
|
path: /opt/nextcloud/pod
|
||||||
|
type: Directory
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue