-
Notifications
You must be signed in to change notification settings - Fork 75
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
[Discuss] Proposal: support integration sets #132
Comments
Let me ask few people to join the discussion. Kibana: @jen-huang @skh It would be great to justify first if we're able to introduce such changes and when would be the right time. |
Let's keep @mostlyjason @andresrc in the loop |
Thank you for starting this discussion @mtojek. One use case I was thinking about is the usage of
UPDATE integration_policies:
logs:
inputs:
- name: error
ilm_policy: custom-hot-warm-logs
vars: ~ # ...
- name: slowlog
ilm_policy: hot-warm
vars: ~ # ...
vars: ~ # ...
|
Thanks @mtojek and @sorantis! I like the design of having
|
Hey @kaiyan-sheng , thanks for taking a look. I assume you're referring to this level: https://github.com/mtojek/integrations/tree/v2-integration-sets/packages/mysql-2/integration_sets/basic/integration_policies . The goal of the additional directory with inputs ( |
One of the stated requirements is:
I would not optimize for machine reading (Kibana and EPR) when thinking about the format/structure of the package manifests. We can always use When thinking of the package structure I would optimize for human consumption instead, as this will impact package developers more frequently. If, by that measure, a single manifest file is more convenient then let's go with that. But if multiple files, grouped by logical folders (like we have today) is more easily understood and maintainable by humans, I would lean towards that. |
Where would stack assets (index templates, dashboards, pipelines, etc.) be defined? Don't they need to come from somewhere associated with a package version so Kibana can install them? Can you flesh out one more integration set in your sample package? I'm curious to know if there's any repetition of contents between two integration sets (e.g. agent policies or fields). Speaking of fields, I see |
Thank you, Shaunak, for looking into this.
Agree, but I'm not sure if the current structure is sufficient to model the "integration-sets" concept. If so, then all names will be wrong (policy templates -> integration policies?). In this case building procedure will mean mapping entities from one domain to another. I'm not sure if this is the expected way to go, definitely it will hard to debug/RCA anything if integrations stay as is and the Kibana side changes (new domain). Side note - if we keep the human model aligned with machine model (or even have a single one), the build procedure will be less error prone.
Sure, we can split the single manifest into multiple entries. It just depends what is the current user experience, I mean, is it easier to design new integration while looking at all integration policies or it's fine to navigate between directories.
Frankly speaking, I skipped them intentionally in the initial draft to agree first on the core model (integration sets, integration policies, etc.). Things like vars, fields, kibana saved objects can be added later on whenever we want (even on every level).
As I stated above I wanted to focus on the core structure first. Regarding the repetitions, I don't think we'll be able to get rid of them. Imagine the case in which some fields are valid for 2/3 metrics integration policies. The presented model doesn't cover this. |
I don't think I was suggesting reusing the current structure (as in, what live packages use today). All my comments here are referring to the new proposed structure. To be clear: I'm suggesting that the new proposed structure that you are demonstrating in https://github.com/mtojek/integrations/tree/v2-integration-sets/packages/mysql-2 should not optimize for machine consumption but rather human consumption to make package authors' lives easier. Via
I'm not sure about this. Certainly if the two are the same there's no build process as such so it's completely error-prone. But I'm not sure this is worth making the developer experience poorer either. We can have tests to make sure the build procedure produces expect output for a given input. Now, it may turn out that humans actually would prefer a single large manifest file. In that case, I'm all for it! Maybe this is something we need more feedback from current package authors on? I do think that to provide such feedback it would be helpful to have the sample package more fleshed out. This would give a more accurate picture of what a package developer would need to create and maintain.
It is to inform decisions about the core structure that I'd like to see it more fleshed out 🙂.
I think repetitions could be avoided by referencing, just as an example. But before we jump to a solution, it would be good know, at least for me, where repetitions could show up in the structure. I guess I'm uncomfortable having a strong opinion on the proposed structure without seeing more use of it — both within a single integration (more fleshing out of the sample package) but also across different types of integrations (maybe pick a few diverse examples of integrations from @sorantis's doc and create sample packages for those as well?) You don't need to flesh out every field or every asset in general, but seeing 2-3 instances of every type of asset would be enough to see patterns, I think. I'm on PTO at the moment but, if you prefer, I can do all the work I'm asking for here once I'm back via a PR to your branch. |
@jen-huang This is the other issue related to the doc, I've shared with you. |
@kaiyan-sheng I think this should be a good exercise to see how the proposed changes look like in the AWS case. |
I'm not sure I would throw the current structure over board. There are 2 parts in the packages:
We will always need 1. and I would assume it does not really change if we have integration sets. What changes is 2. But for the grouping of 2. we already have One thing to keep in mind is multiple integration sets can reuse the same data_streams. This is possible in the current structure but not sure how this would work with the proposal here. |
I reckon that the naming part is crucial in this case, not to end up with something which is not descriptive at all. Even now it's already a bit tangled (starting with package's The missing part is grouping of policy templates, including screenshots, icons for particular groups. We can add these definitions aside, but I'm afraid that it might be hard to justify the design of the structure not referring to backwards compatibility or historical reasons. The reason why I created this thread is to evaluate if we can leverage from the package spec versioning (v2?) and invent a more suitable format to current requirements. Maybe it isn't doable at all due to complexity of various parts and we HAVE to stick to spec extensions/patches. BTW I'm happy to zoom and talk about all cases. Later on It would be great to write down a short decision log entry justifying the decision. |
+1 Naming convention aside, if we are to define a v2 of package specs we should do it with the target user in mind and optimize for package developers. |
Here an alternative approach for discussion. The assumptions I make on my end:
All the below is for starting a discussion and is not intended to be 100% accurate
|
@ruflin What I like about your proposal is that it promotes reuse of a package's components, which means less repetition for a package author. I'm in favor of this from a maintenance perspective. A couple of suggestions to tweak it, based on ideas from @mtojek's original proposal:
Additionally, a couple of minor suggestions of my own:
|
BTW, whatever latest proposal we end up with after today's meeting, I still think it needs to be tested with a few fleshed out packages just to make sure it's going to work for all of the use cases @sorantis mentioned in his original doc. |
Based on our conversation here's an alternative structure that combines Marcin's and existing schema and makes it possible to create groups that each input can refer to. It can be called a groups:
- name: logs
title: "My beautiful logs"
- name: metrics
title: "Foobar"
- name: synthetics
....
- name: packets
policy_templates:
- name: basic
screenshots:
icons:
readme:
searchable: true
description:
title:
inputs:
- name: error
type:
tabs: logs
vars: ~ # ...
- name: slowlog
tabs: logs
vars: ~ # ...
- name: perf
group: metrics
vars: ~ # ...
vars: ~ # ...
- name: enterprise
inputs:
- name: error
tabs: logs
vars: ~ # ...
- name: slowlog
group: logs
vars: ~ # ...
- name: perf
group: metrics
vars: ~ # ...
- name: galera
- name: traffic
- name: uptime
vars:
- name: mysql_dsn
title: MySQL DSN
type: text
default: "tcp(127.0.0.1:3306)/"
- name: mysql_username
title: Username
type: text
default: "root"
- name: mysql_password
title: Password
type: password
default: "test"
ilm_policies:
- name: custom-hot-warm-logs
# more properties
- name: custom-hot-warm-metrics
# more properties |
Question about icons: with this structure are we defining icons in each policy template? And where we gonna put icons for the individual input, such as EC2? Looking at AWS package as an example, AWS icon instead of being under
|
@kaiyan-sheng I think in your example |
A question came up about were the user will land after clicking e.g. EC2 tile. If we keep README at the package level, then the behavior won't change - the user will see the AWS details page. Alternatively we can define README at the policy set level, which will allow us to create "tile" specific detail pages. Thoughts? |
I suggest to start with baby steps and don't change the behavior for READMEs. We can adjust it later in next iterations, let's focus first on delivery something. I'm working on transforming the concept into official spec (PR). |
@kaiyan-sheng Icons should be under policy templates not inputs and dynamodb from @sorantis too. Lets wait on what @mtojek comes up with :-D |
@ruflin There is actually a good question about policy templates. I think it's related to what @kaiyan-sheng presented here.
|
@sorantis I think we should have README at both package level and policy template level. For AWS, README at package level will be an overview to the whole package, the common configuration for credentials and etc. Policy template level README will contain information(exported fields, dashboards,...) specific to the input(data stream?), such as EC2. |
In this case we'll have to adjust also logic responsible for generating README files (fields, sample events, doc templates). Kibana will have to merge both READMEs into single file. I don't mind splitting, but not quite sure about the gain in splitting them. Another though, where in the directory tree should we keep them? There won't be a directory dedicated to policy sets or policy templates at all. |
@mtojek The gain for splitting them is to keep the README file shorter and more readable. This current README for AWS integration includes all data streams, exported fields, credentials but only one dashboard screenshot. |
I am in favor of creating such directories. It gives us a place to store larger assets like README files instead of defining them inline in the YAML files. |
Sharing my perspective on @mtojek's questions:
No we shouldn't. We could, but I think one
Yes, so each policy set is represented like this: policy_templates:
- name: ec2
description: AWS EC2
inputs:
...
- name: dynamodb
description: AWS DynamoDB
inputs:
...
- name: ebs
description: AWS EBS
inputs:
...
The purpose of the |
I might have not expressed myself clearly, but you responded to the question :) Single
I wonder if we can deduce it from the input type. In this case Kibana would need to know on how to group inputs, but maybe it's an overkill. |
It is likely that the input type will not always work for this. Lets take redis logs and an example. Some logs come from file, others need the redis connection (slowlog). So these are 2 different inputs but I would assume they are under the same tab. At the same time it could be argued it is a bit an odd example ... Maybe we have better ones.
This might be useful to group screenshots together or place the README. But at the same time we could use smart defaults for the names. Like the README for EC is called EC2.md. I think for the icons it is also likely that many policy_templates will have the same icon just a different text? |
I've started pouring out the package contents and the relevant spec in #137 . I believe it will ease reviewing. Feel free to jump in and comment on particular lines. |
Resolving on behalf of #144 |
* HOWTO: Writing pipeline tests for a package * Fill test case definitions * Fix: deploy ES only * Fix * Fix * Update docs/howto/pipeline_testing.md Co-authored-by: Shaunak Kashyap <[email protected]> * Update docs/howto/pipeline_testing.md Co-authored-by: Shaunak Kashyap <[email protected]> * Update docs/howto/pipeline_testing.md Co-authored-by: Shaunak Kashyap <[email protected]> * Update docs/howto/pipeline_testing.md Co-authored-by: Shaunak Kashyap <[email protected]> * Update docs/howto/pipeline_testing.md Co-authored-by: Shaunak Kashyap <[email protected]> * Update docs/howto/pipeline_testing.md Co-authored-by: Shaunak Kashyap <[email protected]> * Address PR comments for README * More comments * More comments * File naming rules * Why we need fields * Fixes Co-authored-by: Shaunak Kashyap <[email protected]>
Hi everyone,
The goal of this issue is to discuss challenges, benefits and drawbacks of introducing a new package structure (potentially v2?), which can satisfy the requirement of service granularity (reported in #122). I've prepared a sample package to visualize the proposal.
MySQL pseudo-integration: https://github.com/mtojek/integrations/tree/v2-integration-sets/packages/mysql-2
Requirements:
Notes/observations:
data_stream
names are aligned with the manifest structure, e.g.:logs-mysql-basic.error-shared
. I suppose there should be an option for the end-user to correct/change it.Please do not consider this is as future approach or a kick-off for adjustments, it's rather an exercise to understand and estimate the amount of work in multiple places. It would be nice to hear some feedback from all parties.
EDIT:
Do not look at the manifest as it's the final/target format. Please rather focus on concepts/requirements.
The text was updated successfully, but these errors were encountered: