-
Notifications
You must be signed in to change notification settings - Fork 90
Adding initial spec files #1
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
Changes from 15 commits
394b1cb
2967350
bdffdfa
5558e48
2419161
eb9a53e
904bc9b
d0d5255
c2a1e1a
5c81724
7eff101
10449e0
fe691af
73b7e4d
367be0d
e3cc793
18863b1
f0ab0e9
08e40c7
b0c05d6
431d3c7
5f4f5c1
fd5303c
07bbedd
41bb01c
e6e5b3f
e9a6dbd
0f15458
da00c28
dd76b6d
0141965
6c38cc1
e585265
930d297
e4b6e97
d475a6d
6024684
e315c0d
396721e
076597f
4085ee2
3bb6f7c
d99805f
bed02b2
ac61112
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| ## | ||
| ## Describes the specification for the package's CHANGELOG file | ||
| ## | ||
| spec: | ||
| # Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| version: | ||
| description: Package version. | ||
| type: string | ||
| pattern: "^[0-9]+\.[0-9]+\.[0-9]+$" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe you can use the semver pattern.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in 6c38cc1 (using the regex from my previous comment). |
||
| examples: | ||
| - "1.0.4" | ||
| changes: | ||
| description: List of changes in package version. | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| description: | ||
| description: Description of change. | ||
| type: string | ||
| examples: | ||
| - "Fix broken template" | ||
| type: | ||
| description: Type of change. | ||
| type: string | ||
| enum: | ||
| - "breaking-change" | ||
| - "bugfix" | ||
| - "enhancement" | ||
| - "known-issue" | ||
| link: | ||
| description: Link to issue or PR describing change in detail. | ||
| type: string | ||
| examples: | ||
| - "https://github.com/elastic/beats/issues/13507" | ||
| required: | ||
| - description | ||
| - type | ||
| - link | ||
| required: | ||
| - version | ||
| - changes | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| ## | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, we are getting a spec version of the fields.yml. This is huge. @webmat You will like this for ECS if you don't already have it. |
||
| ## Describes the specification for a dataset's various field definition files | ||
| ## | ||
| spec: | ||
| # Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability | ||
| type: object | ||
| properties: | ||
| name: | ||
| description: Name of field | ||
| type: string | ||
| title: | ||
| description: Title of field | ||
| type: string | ||
| type: | ||
| description: Datatype of field | ||
| type: string | ||
| enum: | ||
| - constant_keyword | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these can be any valid elasticsearch type right? Or is this just meant as an example?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right these should be any valid Elasticsearch field datatype. I will add the rest. Thanks!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in d475a6d. |
||
| - date | ||
| - group | ||
| description: | ||
| description: Short description of field | ||
| type: string | ||
| group: | ||
|
ycombinator marked this conversation as resolved.
Outdated
|
||
| description: TODO | ||
| type: int | ||
| level: | ||
|
ycombinator marked this conversation as resolved.
Outdated
|
||
| description: TODO | ||
| type: string | ||
| enum: | ||
| - custom | ||
| default_field: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jonathan-buttner I saw this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, ignore my comment above, just realised this is
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can ignore this one too I think: It is outputted by the ECS beats tooling: https://github.com/elastic/ecs/blob/master/generated/beats/fields.ecs.yml#L77 I'm not even really sure what it is used for 🤷
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea at all, I think you can safely ignore/remove this field from spec.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I will remove it from the spec, similar to the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed in 396721e. |
||
| description: "Is this field a default? TODO: better description" | ||
| type: boolean | ||
| default: true | ||
| fields: | ||
| description: Sub-fields, when type is group | ||
| $ref: "#" # JSON-schema syntax for pointing to the root of the schema | ||
| required: | ||
| - name | ||
| - type | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| spec: | ||
| - name: base fields | ||
| description: Base fields definitions | ||
| type: file | ||
| name: "base-fields.yml" | ||
| required: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the only constraints is that somewhere in the fields defined in the @ruflin correct me if I'm wrong, but a package developer can name the "fields.yml" whatever they want right? I can't remember if it is actually enforced by the registry or if it just looks for a file that's yml format. |
||
| contentMediaType: "application/x-yaml" | ||
| specRef: "fields.spec.yml" | ||
| - name: dataset fields | ||
| description: Dataset-specific fields definitions | ||
| type: file | ||
| name: "fields.yml" | ||
| required: true | ||
| contentMediaType: "application/x-yaml" | ||
| specRef: "fields.spec.yml" | ||
| - name: package fields | ||
| description: Package-specific fields definitions | ||
| type: file | ||
| name: "package-fields.yml" | ||
| contentMediaType: "application/x-yaml" | ||
| specRef: "fields.spec.yml" | ||
| - name: ECS fields | ||
| description: ECS fields definitions | ||
| type: file | ||
| name: "ecs.yml" | ||
| contentMediaType: "application/x-yaml" | ||
| specRef: "fields.spec.yml" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| ## | ||
| ## Describes the specification for a dataset's manifest.yml file | ||
| ## | ||
| spec: | ||
| # Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability | ||
| type: object | ||
| properties: | ||
| title: | ||
| description: Title of dataset. | ||
| type: string | ||
| examples: | ||
| - AWS billing metrics | ||
| release: | ||
| description: Stability of dataset. | ||
| type: string | ||
| enum: | ||
| - experimental | ||
| - beta | ||
| examples: | ||
| - beta | ||
| type: | ||
| description: Type of dataset | ||
| type: string | ||
| enum: | ||
| - metrics | ||
| - logs | ||
| examples: | ||
| - metrics | ||
| streams: | ||
| description: Streams offered by dataset. | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| title: | ||
| type: string | ||
| examples: | ||
| - AWS Billing metrics | ||
| description: | ||
| type: string | ||
| examples: | ||
| - Collect AWS billing metrics | ||
| input: | ||
| type: string | ||
| examples: | ||
| - aws/metrics | ||
| - s3 | ||
| - file | ||
| vars: | ||
| description: Input variables. | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| name: | ||
| description: Variable name. | ||
| type: string | ||
| examples: | ||
| - hosts | ||
| type: | ||
| description: Data type of variable. | ||
| type: string | ||
| enum: | ||
| - text | ||
| examples: | ||
| - text | ||
| title: | ||
| description: Title of variable | ||
| type: string | ||
| examples: | ||
| - Hosts | ||
| multi: | ||
| description: TODO | ||
| type: boolean | ||
| default: false | ||
| examples: | ||
| - true | ||
| required: | ||
| description: Is variable required? | ||
| type: boolean | ||
| default: false | ||
| examples: | ||
| - true | ||
| show_user: | ||
| description: TODO | ||
| type: boolean | ||
| default: true | ||
| examples: | ||
| - false | ||
| default: | ||
| description: Default value(s) for variable | ||
| type: array | ||
| items: | ||
| type: string | ||
| examples: | ||
| - "http://127.0.0.1" | ||
| required: | ||
| - name | ||
| - type | ||
| required: | ||
| - title | ||
| - description | ||
| required: | ||
| - title | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's another section here that the registry supports: https://github.com/elastic/endpoint-package/blob/master/package/endpoint/dataset/file/manifest.yml#L7 This part can be any fields you want: It's a way to set settings and mappings in component templates for ES. @ruflin I know there was discussion about not using that though? And instead just using a raw json template component file? Do you know if the plan is to keep that section around?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, I didn't know there is such section :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets have it in for now and discuss if we remove it for 7.10 and update the packages.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in 3bb6f7c. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| spec: | ||
| - description: Folder containing a single dataset definition | ||
| type: folder | ||
| pattern: "[a-z0-9][a-z0-9_]+[a-z0-9]" | ||
|
ycombinator marked this conversation as resolved.
Outdated
|
||
| minOccurences: 1 | ||
| spec: | ||
| - description: A dataset's manifest file | ||
| type: file | ||
| contentMediaType: "application/x-yaml" | ||
| name: "manifest.yml" | ||
| required: true | ||
| specRef: "manifest.spec.yml" | ||
| - description: Folder containing field definitions | ||
| type: folder | ||
| name: fields | ||
| required: true | ||
| specRef: "fields/spec.yml" | ||
| - description: Folder containing agent-related definitions | ||
| type: folder | ||
| name: agent | ||
| required: true | ||
| spec: | ||
| - description: Folder containing agent stream definitions | ||
| type: folder | ||
| name: stream | ||
| required: true | ||
| spec: | ||
| - description: Agent stream definition | ||
| type: file | ||
| name: "stream.yml.hbs" | ||
| contentMediaType: "application/x-hbs" | ||
| required: true | ||
| - description: Folder containing Elasticsearch assets | ||
| type: folder | ||
| name: elasticsearch | ||
| spec: | ||
| - description: Folder containing Elasticsearch Ingest Node pipeline definitions | ||
| type: folder | ||
| name: ingest_pipeline | ||
| spec: | ||
| - description: Default ingest pipeline definition | ||
| type: file | ||
| name: "default.yml" | ||
| contentMediaType: "application/x-yaml" | ||
| required: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| spec: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty cool that we can also describe the assets. |
||
| - description: Folder containing Kibana dashboard assets | ||
| type: folder | ||
| name: dashboard | ||
| required: false | ||
| spec: | ||
| - description: A dashboard asset file | ||
| type: file | ||
| contentMediaType: "application/json" | ||
| pattern: ".+\.json" | ||
| - description: Folder containing Kibana visualization assets | ||
| type: folder | ||
| name: visualization | ||
| required: false | ||
| spec: | ||
| - description: A visualization asset file | ||
| type: file | ||
| contentMediaType: "application/json" | ||
| pattern: ".+\.json" | ||
| - description: Folder containing Kibana saved search assets | ||
| type: folder | ||
| name: search | ||
| required: false | ||
| spec: | ||
| - description: A saved search asset file | ||
| type: file | ||
| contentMediaType: "application/json" | ||
| pattern: ".+\.json" | ||
| - description: Folder containing Kibana map assets | ||
| type: folder | ||
| name: map | ||
| required: false | ||
| spec: | ||
| - description: A map asset file | ||
| type: file | ||
| contentMediaType: "application/json" | ||
| pattern: ".+\.json" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Index patterns is another possible folder: Although there's a bug with the ingest manager when using it right now: elastic/kibana#70864
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in e315c0d. |
||
Uh oh!
There was an error while loading. Please reload this page.