Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
camdencheek committed Jul 23, 2020
1 parent 51e5b5c commit 03d01b4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugins/openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ version: 0.0.1
title: Openshift
description: Log parser for Openshift
parameters:
journal_directory:
journald_log_path:
label: Containers Log Path
description: The directory where the journald logs are located. Defaults to '/var/log/journal'.
type: string
start_at:
label: Start At
description: Start reading file from 'beginning' or 'end'. Defaults to 'end'.
type: string
container_logs:
container_log:
label: Enable Container Logs
description: Enable collection of container logs
type: bool
docker_logs:
docker_log:
label: Enable Docker Daemon Logs
description: Enable collection of the Docker Daemon logs
type: bool
openshift_logs:
openshift_log:
label: Enable Openshift logs
description: Enable collection of Openshift unit logs
type: bool

pipeline:
- type: journald_input
directory: /var/log/journal
directory: {{ or .journald_log_path "/var/log/journal" }}
start_at: {{ or .start_at "end" }}

- type: router
Expand All @@ -35,13 +35,13 @@ pipeline:
output: drop_output
# Send all container logs to the container name parser
- expr: '$record._SYSTEMD_UNIT == "docker.service" and $record.CONTAINER_NAME != nil'
output: {{ if .container_logs -}} regex_parser {{- else -}} drop_output {{- end }}
output: {{ if .container_log -}} regex_parser {{- else -}} drop_output {{- end }}
# Send all docker logs to the be labeled
- expr: '$record._SYSTEMD_UNIT == "docker.service"'
output: {{ if .docker_logs -}} docker_decorator {{- else -}} drop_output {{- end }}
output: {{ if .docker_log -}} docker_decorator {{- else -}} drop_output {{- end }}
# Send all openshift logs to be labeled and parsed
- expr: '$record._SYSTEMD_UNIT == "atomic-openshift-node.service"'
output: {{ if .openshift_logs -}} openshift_decorator {{- else -}} drop_output {{- end }}
output: {{ if .openshift_log -}} openshift_decorator {{- else -}} drop_output {{- end }}

# Drop unwanted logs
- type: "drop_output"
Expand Down

0 comments on commit 03d01b4

Please sign in to comment.