Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

schema updates #170

Merged
merged 5 commits into from
May 29, 2024
Merged

schema updates #170

merged 5 commits into from
May 29, 2024

Conversation

RasonJ
Copy link
Collaborator

@RasonJ RasonJ commented May 22, 2024

Notes & Questions:
I couldn't find a single date-time format spec that matched the json schema format, but if you add ignore_malformed OS saves the date-time regardless.

More questions on the query index:

  • Do we want to keep client_id ? It'd make it much easier to do top queries per "client" with it.
  • Following up on the network exchange vs implementation, do we add user_query and query_attributes to the query index? Would the plugin save to those fields?

@RasonJ RasonJ requested review from jzonthemtn and epugh as code owners May 22, 2024 11:36
Copy link
Member

@epugh epugh left a comment

Choose a reason for hiding this comment

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

This is looking much nicer.. a couple of ideas that maybe we can chat about later today, and a couple of questions on if we have gaps in spec or not...

"timestamp": {
"type": "date",
"format":"rfc3339_lenient||epoch_millis",
Copy link
Member

Choose a reason for hiding this comment

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

hey, that's cool!

"type": "keyword"
},
"application": { "type": "keyword", "ignore_above": 256 },
"action_name": { "type": "keyword", "ignore_above": 100 },
Copy link
Member

Choose a reason for hiding this comment

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

should we roll these into the spec then as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought they were???

}
"internal_id": { "type": "keyword" },
"object_id": { "type": "keyword", "ignore_above": 256 },
"object_type": { "type": "keyword", "ignore_above": 100 },
Copy link
Member

Choose a reason for hiding this comment

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

are we still doing object_type? we should chat since we don't have that in the spec, are we missing it? I guess I was assuming an object_id would tell you everything you needed to know....

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we need it. At the very least, in the js you can stuff anything into an object. So, for example, I cram the whole javascript timer in there because it has other cool info that someone might want.
That aside, I'm sure someone will have multiple kinds of things/objects/cats/dogs with the same id.

"timestamp": { "type": "date" },
"query_id": { "type": "keyword", "ignore_above": 100 },
"query": { "type": "flat_object" },
"query_response_id": { "type": "keyword", "ignore_above": 100 },
Copy link
Member

Choose a reason for hiding this comment

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

we should probably get on the same page on what query_response_id is, again, we odn't have it in the spec, is this an internal thing?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a difference in the mappings vs the request/response schema. This is for indexing the query_response_id, not returning it in a response.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

query_response_id is a unique id per OS response to the client.
Theoretically, a client could reuse the same query_id several times to query something, but the query_response_id should always be unique.

@epugh
Copy link
Member

epugh commented May 23, 2024

i am going to go throught this and get this sorted, so we can get #169 done

@@ -1,114 +1,50 @@
{
"dynamic": true,
Copy link
Member

Choose a reason for hiding this comment

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

@RasonJ is going to look at moving this down INTO the event_attributes stanza so you can have dynamic fields in there. That would map to the specifiation that says "Additional Properties of any type allowed": https://o19s.github.io/ubi/docs/html/event.schema.html#event_attributes_object_additionalProperties

@epugh epugh merged commit 08a0174 into 2.14.0 May 29, 2024
18 checks passed
@epugh epugh deleted the schema-update branch May 29, 2024 15:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants