Skip to content

set up extension to publish osq logs to another destination #2253

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

James-Pickett
Copy link
Contributor

No description provided.

Copy link
Contributor

@directionless directionless left a comment

Choose a reason for hiding this comment

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

Aside from being unsure what the network transport looks like, it seems pretty clearn

}
req.Header.Set("Content-Type", "application/json")

// TODO: set any auth headers ... deal with auth in general
Copy link
Contributor

Choose a reason for hiding this comment

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

Ha. Yes

Results []distributed.Result `json:"results"`
}

func (p *osqueryPublisher) PublishLogs(ctx context.Context, nodeKey string, logType logger.LogType, logs []string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we buffering and batching these, like we do on the other endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we're talking about the same thing, the extension itself handles buffering and batching of the logs. I think here were are just tacking on a second transport interface. Maybe osquery_publisher is a poor name since really it's just a client?

Copy link
Contributor

Choose a reason for hiding this comment

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

Where is the dynamic buffer resizing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the extension manages an osq log buffer here, is this what you are referring to? Or is this something that is happening in go-kit with our current service?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hrm. So the extension does the log buffering, and we fork after. Which I think means that things are going to be super weird if one of the targets is down.

Which is maybe okay, since it's just a transition period?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea maybe it's okay .... I think I'll look at how bad it would be to set up a store per log destination. I think that would make it easier to switch between the 2 log destinations.

Copy link
Contributor

Choose a reason for hiding this comment

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

We'll eventually only have one, so putting up with some ugliness now isn't unreasonable. Though I'm not sure which way that argues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants