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

Add support for loading the raw json template file #7039

Merged
merged 2 commits into from
May 22, 2018

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented May 8, 2018

Current in 6.x templates can only be loaded from the fields.yml and are generated or have to be loaded manually. To allow users to create their own template.json file and still use the Beat to load it, setup.template.raw.path can now be used.

@ruflin ruflin added in progress Pull request is currently in progress. review libbeat labels May 8, 2018
@ruflin
Copy link
Member Author

ruflin commented May 8, 2018

@tsg Any input on the config naming?

@tsg
Copy link
Contributor

tsg commented May 8, 2018

Maybe setup.template.json.path? or raw_json?

@tsg tsg closed this May 8, 2018
@tsg tsg reopened this May 8, 2018
@tsg
Copy link
Contributor

tsg commented May 8, 2018

(pressed the wrong button, sorry)

@@ -215,7 +215,7 @@ Contains common fields available in all event types.
required: True

The event log API type used to read the record. The possible values are "wineventlog" for the Windows Event Log API or "eventlogging" for the Event Logging API.
The Event Logging API was designed for Windows Server 2003 or Windows 2000 operating systems. In Windows Vista, the event logging infrastructure was redesigned. On Windows Vista or later operating systems, the Windows Event Log API is used. Winlogbeat automatically detects which API to use for reading event logs.
The Event Logging API was designed for Windows Server 2003, Windows XP, or Windows 2000 operating systems. In Windows Vista, the event logging infrastructure was redesigned. On Windows Vista or later operating systems, the Windows Event Log API is used. Winlogbeat automatically detects which API to use for reading event logs.
Copy link
Member

Choose a reason for hiding this comment

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

That sounds correct, but doesn't seem related to this PR.

@ruflin ruflin removed the in progress Pull request is currently in progress. label May 14, 2018
@ruflin
Copy link
Member Author

ruflin commented May 14, 2018

The config option is now called setup.template.json. Docs and tests were added. Ready for review.

@ruflin ruflin force-pushed the raw-template branch 7 times, most recently from 687ad33 to 09651f3 Compare May 16, 2018 11:48
@ruflin
Copy link
Member Author

ruflin commented May 17, 2018

Ready for an other round of reviews.

Current in 6.x templates can only be loaded from the fields.yml and are generated or have to be loaded manually. To allow users to create their own template.json file and still use the Beat to load it, `setup.template.json.path` can now be used.

The configuration options look as following:

```
setup.template.json.enabled: true
setup.template.json.path: "template.json"
setup.template.json.name: "template-name
```
@ruflin
Copy link
Member Author

ruflin commented May 22, 2018

CI failure is not related.

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewkroh andrewkroh merged commit 9f499c0 into elastic:master May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants