Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update custom log package #449

Merged
merged 1 commit into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ paths:
{{/each}}

dataset: {{dataset}}

{{custom}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nchaulet I tried to have a fully custom part in this config here. When I try to fill it in with foo: bar in the UI I get the following error:

can not read an implicit mapping pair; a colon is missed at line 7, column 13: "##custom##" ^

If would assume it replaced {{custom}} by foo: bar so it should be valid?

Copy link
Member

@nchaulet nchaulet May 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This a good scenario that we did not cover, I did the compilation of yaml to be able to support values like custom: {{custom}}

Thinking of the solution we have:

  1. We can probably add a new concept in the registry variables, to flag a variable that should be spread to the agent yaml.
  2. we can try to detect in the template that custom is a root level yaml value and do another special treatment, I have a POC here [Ingest] Support root level yaml variables in agent stream template kibana#66120

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ on option 2 as I would prefer to have as few "types" as possible on the package level.

5 changes: 5 additions & 0 deletions dev/packages/example/log/0.9.0/dataset/log/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ streams:
Set the name for your dataset. Changing the dataset will send the data to a different index.
You can't use `-` in the name of a dataset and only valid characters for [Elasticsearch index names](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html).
type: text

- name: custom
# Custom configs
type: yaml
default: >