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 registration ID to osquery history #1982

Conversation

RebeccaMahany
Copy link
Contributor

Another smaller task for #1939 -- adds the registration ID to osquery instance history, and includes it appropriately when working with instance history.

Updates the kolide_launcher_config table to handle multiple registration IDs in preparation for registrations having different osquery configs.

@@ -57,7 +58,7 @@ func generateLauncherInfoTable(configStore types.GetterSetter, LauncherHistorySt
return nil, err
}

osqueryInstance, err := history.LatestInstance()
osqueryInstance, err := history.LatestInstanceByRegistrationID(types.DefaultRegistrationID)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we want to return multiple rows for this table -- I'm not sure how K2 will handle that at the moment. So for now, I'm defaulting to using default ID (the same as we do in other places).

Copy link
Contributor

Choose a reason for hiding this comment

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

You can return whatever makes sense here, multiple rows are fine.

This isn't data k2 collects, it's here solely for our debugging.

Copy link
Contributor

Choose a reason for hiding this comment

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

Correcting myself... We do query kolide_launcher_info, but I don't think we look at this column.

@RebeccaMahany RebeccaMahany marked this pull request as ready for review December 6, 2024 21:38
@RebeccaMahany RebeccaMahany added this pull request to the merge queue Dec 9, 2024
Merged via the queue into kolide:main with commit b36c719 Dec 9, 2024
32 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/add-registration-id-to-osq-history branch December 9, 2024 15:21
@RebeccaMahany RebeccaMahany added the component:table Table Changes label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:table Table Changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants