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

Make it possible for Windowseventlogreceiver to deal with a missing channel #36237

Open
stampflit opened this issue Nov 6, 2024 · 7 comments
Labels
enhancement New feature or request needs triage New item requiring triage os:windows receiver/windowseventlog

Comments

@stampflit
Copy link

Component(s)

receiver/windowseventlog

Is your feature request related to a problem? Please describe.

When using the Windowseventlogreceiver with a channel that doesn't exist, it forces the entire collector to shutdown. This is fine for the expected default behavior. However, I'm using the otlp collector on multiple machines and windows being windows, on some them, some of the channels I want to receive are missing. I still want my collector to run, possibly to write some log message but definitely not to shutdown.

Describe the solution you'd like

I have a simple workaround fix that I'm using for now: stampflit@b646550
This is by far not in a shape to be upstreamed. But it kinda gets the point across of what my problem is and it presents a direction for how it could be solved.

Describe alternatives you've considered

Either I manually gather the channel availability of all machines and generate specific configurations for each one. I don't want to do that. Instead we should make it possible to make it configurable for the Collector to deal with a missing channel.

There are two approaches to solving it by it configurable:

  • With windowseventlogreceiver being built around Stanza, there could be an option to deal with the Start-failure of any Stanza receiver. Such a solution would be harder to implement, but probably solve problems that other people have / will have as well.
  • Solving it for the Windowseventlogreceiver only. Kinda doing the same thing as I did in my workaround I linked above, but only if some config setting is enabled. And possibly catch some more Start error cases than just the one I care about. This is simpler. But it might be a solution on the wrong level.

Additional context

If there is a decision to solve this problem and to go with the second approach, I can gladly provide a proper implementation of a fix / help with testing. If we solve it on Stanza level, I think this will be a more longterm endeavor. I can help with the Windowseventlogreceiver related parts or again with testing, but I don't think I'm familiar enough with Stanza and it's design considerations and inner workings to help with coming up and implementing a solution with the first approach.

What are your thoughts?

@stampflit stampflit added enhancement New feature or request needs triage New item requiring triage labels Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@stampflit
Copy link
Author

/label os:windows

@pjanotti
Copy link
Contributor

pjanotti commented Nov 8, 2024

The ask itself seems reasonable to me @stampflit - I didn't look into the 2 implementation options, but, at first my instinct would be to implement on the receiver and as you said a config to opt in or our of the behavior.

@stampflit
Copy link
Author

Should I create a PR with a opt-in config value in windowseventlogreceiver to gracefully handle missing channels? Or should we wait to hear more opinions?

@jsirianni
Copy link
Member

I think this would be great 👍

@pjanotti
Copy link
Contributor

pjanotti commented Nov 20, 2024

Please, go ahead @stampflit: create a PR with an opt-in config value to gracefully handle missing channels.

@dpaasman00
Copy link
Contributor

Hey @stampflit wondering if you've been able to make any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage os:windows receiver/windowseventlog
Projects
None yet
Development

No branches or pull requests

4 participants