This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Globegitter/some-updates
Pull out config files. Add rbac and other minor updates.
- Loading branch information
Showing
6 changed files
with
143 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
FROM fluent/fluent-bit:0.11.17 | ||
FROM fluent/fluent-bit:0.12.1 | ||
MAINTAINER Eduardo Silva <[email protected]> | ||
USER root | ||
|
||
COPY fluent-bit.conf /fluent-bit/etc/ | ||
COPY parsers.conf /fluent-bit/etc/ | ||
|
||
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: fluent-bit-config-v1 | ||
namespace: kube-system | ||
data: | ||
fluent-bit.conf: | | ||
[SERVICE] | ||
Flush 1 | ||
Daemon Off | ||
Log_Level info | ||
Parsers_File parsers.conf | ||
[INPUT] | ||
Name tail | ||
Tag kubernetes.* | ||
Path /var/log/containers/*.log | ||
Parser docker | ||
DB /var/log/flb_kube.db | ||
Mem_Buf_Limit 5MB | ||
[FILTER] | ||
Name kubernetes | ||
Match kubernetes.* | ||
Kube_URL https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT} | ||
tls.verify False | ||
Merge_JSON_Log On | ||
[OUTPUT] | ||
Name es | ||
Match * | ||
Host ${FLUENT_ELASTICSEARCH_HOST} | ||
Port ${FLUENT_ELASTICSEARCH_PORT} | ||
Logstash_Format On | ||
Retry_Limit False | ||
parsers.conf: | | ||
[PARSER] | ||
Name apache | ||
Format regex | ||
Regex ^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$ | ||
Time_Key time | ||
Time_Format %d/%b/%Y:%H:%M:%S %z | ||
[PARSER] | ||
Name apache2 | ||
Format regex | ||
Regex ^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$ | ||
Time_Key time | ||
Time_Format %d/%b/%Y:%H:%M:%S %z | ||
[PARSER] | ||
Name apache_error | ||
Format regex | ||
Regex ^\[[^ ]* (?<time>[^\]]*)\] \[(?<level>[^\]]*)\](?: \[pid (?<pid>[^\]]*)\])?( \[client (?<client>[^\]]*)\])? (?<message>.*)$ | ||
[PARSER] | ||
Name nginx | ||
Format regex | ||
Regex ^(?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$ | ||
Time_Key time | ||
Time_Format %d/%b/%Y:%H:%M:%S %z | ||
[PARSER] | ||
Name json-test | ||
Format json | ||
Time_Key time | ||
Time_Format %d/%b/%Y:%H:%M:%S %z | ||
[PARSER] | ||
Name docker | ||
Format json | ||
Time_Key time | ||
Time_Format %Y-%m-%dT%H:%M:%S.%L | ||
Time_Keep On | ||
[PARSER] | ||
Name syslog | ||
Format regex | ||
Regex ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$ | ||
Time_Key time | ||
Time_Format %b %d %H:%M:%S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: fluentd-bit-logging | ||
namespace: kube-system | ||
labels: | ||
run: fluentd-bit-logging | ||
|
||
--- | ||
|
||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: fluentd-bit-logging | ||
labels: | ||
run: fluentd-bit-logging | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- "namespaces" | ||
- "pods" | ||
verbs: | ||
- "get" | ||
- "watch" | ||
- "list" | ||
|
||
--- | ||
|
||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: fluentd-bit-logging | ||
labels: | ||
run: fluentd-bit-logging | ||
subjects: | ||
- kind: ServiceAccount | ||
name: fluentd-bit-logging | ||
namespace: kube-system | ||
apiGroup: "" | ||
roleRef: | ||
kind: ClusterRole | ||
name: fluentd-bit-logging | ||
apiGroup: "" |