Skip to content

Commit

Permalink
add syslog and splunk logging driver options for docker compose stack
Browse files Browse the repository at this point in the history
  • Loading branch information
gschmutz committed Jan 2, 2024
1 parent 618ed4b commit 3ef0cf5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
6 changes: 5 additions & 1 deletion documentation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ There are some overall settings which will control the behaviour for all or a gr
| Config | Default | Since | Description |
|------------------------------------------------ |:-------: |------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `use_timezone` | | 1.5.0 | The timezone to use for the whole stack. By default is empty so the timezone of the docker engine is not changed and it will run as `Etc/UTC`. If you want to set it to another timezone, then specify a Unix timezone string, such as `Europe/Zurich` or `America/New_York`. An overview on the valid timezones can be found here: <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones> |
| `logging_driver` | `json-file` | 1.17.0 | [Docker logging driver](https://docs.docker.com/config/containers/logging/configure/) to use, currently we support the following ones: `json-file`, `fluentd` or `loki`. |
| `logging_driver` | `json-file` | 1.17.0 | [Docker logging driver](https://docs.docker.com/config/containers/logging/configure/) to use, currently we support the following ones: `json-file`, `fluentd` or `loki` or `syslog` or `splunk`. |
| `loggin_fluentd_address` | `fluentd:24224` | 1.17.0 | The socket address to connect to the Fluentd daemon, only applicable if `logging_driver` is set to `fluentd`. |
| `logging_syslog_address` | `udp://syslog:1111` | 1.17.0 | The address of a syslog server, only applicable if `logging_driver` is set to `syslog`. |
| `logging_splunk_url` | `http://splunk:8000` | 1.17.0 | Path to the Splunk Enterprise instance, self-service Splunk Cloud instance, or Splunk Cloud managed cluster, only applicable if `logging_driver` is set to `splunk`. |
| `logging_splunk_token` | `` | 1.17.0 | Splunk HTTP Event Collector token used to authenticate at the Splunk HTTP Event Collector (HEC), only applicable if `logging_driver` is set to `splunk`. |
| `private_docker_repository_name` | `trivadis` | 1.5.0 | Docker images not available on public Docker Hub will be retrieved using this private repository. By default it points to `trivadis` and you have to login first, before you can use the generated stack, if you have selected a private image. Use this config to point to your own private docker registry if needed. |
| `uid` | `1000` | 1.9.0 | The UID to use when using the "user" property in a service to override the user inside the container. |
| `env` | ${PLATYS_ENV} | 1.16.0 | Optional environment identifier of this platys instance, by default take it from the environment variable (can be specified in the `.env` file), but can be changed to hardcoded value. Allowed values (taken from [DataHub](https://datahubproject.io/docs/graphql/enums/#fabrictype)): `dev`, `test`, `qa`, `uat`, `ei`, `pre`, `non_prod`, `prod`, `corp` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ x-logging: &logging
logging:
driver: fluentd
options:
fluentd-address: "localhost:24224"
fluentd-address: "{{loggin_fluentd_address}}"
fluentd-async-connect: "true"
tag: docker
{% endif %} {# logging_driver = 'fluentd' #}
Expand All @@ -1104,6 +1104,25 @@ x-logging: &logging
loki-retries: "0"
{% endif %} {# logging_driver = 'loki' #}

{%if logging_driver == "syslog" | default(false) %}
x-logging: &logging
logging:
driver: syslog
options:
syslog-address: "{{logging_syslog_address}}"
tag: docker
{% endif %} {# logging_driver = 'syslog' #}

{%if logging_driver == "splunk" | default(false) %}
x-logging: &logging
logging:
driver: splunk
options:
splunk-url: "{{logging_splunk_url}}"
splunk-token: "{{logging_splunk_token | default(omit) }}"
tag: "docker"
{% endif %} {# logging_driver = 'syslog' #}

{# ================================== Services ========================================== #}

services:
Expand Down
6 changes: 5 additions & 1 deletion modern-data-platform-stack/generator-config/vars/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
# Timezone, use a Linux string such as Europe/Zurich or America/New_York
use_timezone: ''

# Docker Logging Driver to use, either 'json-file', 'fluentd' or 'loki'
# Docker Logging Driver to use, either 'json-file', 'fluentd' or 'loki' or 'splunk' or 'syslog'
logging_driver: 'json-file'
loggin_fluentd_address: 'fluentd:24224'
logging_syslog_address: 'udp://syslog:1111'
logging_splunk_url: 'http://splunk:8000'
logging_splunk_token: ''

# Name of the repository to use for private images, which are not on docker hub (currently only Oracle images)
private_docker_repository_name: 'trivadis'
Expand Down

0 comments on commit 3ef0cf5

Please sign in to comment.