Skip to content

Allow for webhooks as a logging target #1876

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

Open
1 task done
stgraber opened this issue Apr 1, 2025 · 4 comments
Open
1 task done

Allow for webhooks as a logging target #1876

stgraber opened this issue Apr 1, 2025 · 4 comments
Assignees
Labels
API Changes to the REST API Documentation Documentation needs updating Easy Good for new contributors
Milestone

Comments

@stgraber
Copy link
Member

stgraber commented Apr 1, 2025

Is there an existing issue for this?

  • There is no existing issue for this feature

What are you currently unable to do

Similar to #1420, it would make sense to also supports webhooks as another logging target type.

So we'd basically end up supporting:

  • loki
  • syslog
  • webhook

For each of which we'd support selecting the type of events we want to send as well as some other configuration options like the log level for logging messages or the number of retries that should be made for sending to loki or webhook.

For webhooks specifically, we'll need the user to provide a URL and an optional number of retries that should be made. Internally we'll just spawn a goroutine which will make up to that number of attempts to send the data. We'd also allow configuring the format of the webhook. Initially we could support our own (same JSON struct as an API event) as well as some common options like the Slack webhook format and Google Chat webhook format so Incus can directly notify a notification channel in those chat platforms.

What do you think would need to be added

No response

@stgraber stgraber added API Changes to the REST API Documentation Documentation needs updating Easy Good for new contributors labels Apr 1, 2025
@stgraber stgraber added this to the soon milestone Apr 1, 2025
@chxmxii
Copy link

chxmxii commented Apr 2, 2025

Hello @stgraber, can you assign this to me?

@stgraber stgraber added the Blocked Waiting on an external task label Apr 2, 2025
@stgraber
Copy link
Member Author

stgraber commented Apr 2, 2025

@chxmxii I'm going to hold off on that for a few more days as @presztak is currently working on #1420 which will cause the main reorganization of how we do logging in Incus.

Once he's part of the work (adding the new structure, adding syslog and moving loki over) is complete, then this issue can move forward with adding webhook as an extra option to it which at that point should be pretty straightforward to do.

@stgraber stgraber removed the Blocked Waiting on an external task label Apr 12, 2025
@stgraber
Copy link
Member Author

stgraber commented Apr 12, 2025

This is now unblocked.
@chxmxii let me know if you still want it.

@chxmxii
Copy link

chxmxii commented Apr 12, 2025

Yes, you can assign this to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating Easy Good for new contributors
Development

No branches or pull requests

2 participants