Skip to content

feat(new sink): Keep sink - #22072

Merged
pront merged 11 commits into
vectordotdev:masterfrom
sainad2222:sainad2222/keep_sink
Jan 23, 2025
Merged

pront merged 11 commits into
vectordotdev:masterfrom
sainad2222:sainad2222/keep_sink

Conversation

@sainad2222

@sainad2222 sainad2222 commented Dec 21, 2024

Copy link
Copy Markdown
Contributor

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Vector config:

sources:
  prometheus:
    type: http
    address: 0.0.0.0:8686

sinks:
  keep:
    type: "keep"
    inputs: ["prometheus"]
    endpoint: "http://localhost:8080/alerts/event/vectordev?provider_id=test"
    api_key: "keepappkey"

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Please read our Vector contributor resources.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

@bits-bot

bits-bot commented Dec 21, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the domain: sinks Anything related to the Vector's sinks label Dec 21, 2024
@talboren

talboren commented Jan 3, 2025

Copy link
Copy Markdown

@sainad2222 looks good!!

@pront
pront marked this pull request as ready for review January 3, 2025 14:36
@pront
pront requested a review from a team as a code owner January 3, 2025 14:36

@pront pront left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @sainad2222, can you add a changelong fragment?

@pront

pront commented Jan 7, 2025

Copy link
Copy Markdown
Member

Also, please take a look at this PR as an example on how to include this new sink to our website: https://github.com/vectordotdev/vector/pull/13007/files#diff-a0be14524a6e437c68388b393dbff417eceb1dd09857df9173b3e6f217f57376

You can start with the following:

  • Run make generate-component-docs
  • Add a website/content/en/docs/reference/configuration/sinks/keep.md

@sainad2222
sainad2222 force-pushed the sainad2222/keep_sink branch from 2b4d26d to ae1e7c3 Compare January 11, 2025 10:59
@sainad2222
sainad2222 requested a review from a team January 11, 2025 10:59
@sainad2222
sainad2222 requested a review from a team as a code owner January 11, 2025 10:59
@github-actions github-actions Bot added the domain: external docs Anything related to Vector's external, public documentation label Jan 11, 2025
@sainad2222
sainad2222 force-pushed the sainad2222/keep_sink branch from ae1e7c3 to d142eae Compare January 11, 2025 11:01
Comment thread website/cue/reference/components/sinks/base/socket.cue
rtrieu
rtrieu previously requested changes Jan 13, 2025

@rtrieu rtrieu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi, I left some feedback for your review, mostly to maintain style consistency.

Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/base/keep.cue Outdated
@sainad2222

Copy link
Copy Markdown
Contributor Author

@rtrieu @pront Moved the documentation fixes to a separate PR
#22200

@sainad2222
sainad2222 force-pushed the sainad2222/keep_sink branch from d142eae to 8a142a8 Compare January 15, 2025 05:58
@sainad2222
sainad2222 requested review from pront and rtrieu January 15, 2025 05:59
Comment thread website/cue/reference/components/sinks/base/keep.cue
@sainad2222
sainad2222 requested a review from pront January 17, 2025 14:28
@pront

pront commented Jan 21, 2025

Copy link
Copy Markdown
Member

Hi @sainad2222, thanks for your patience on this PR. I understand we lack some guidance here on adding docs for new components. We are still missing CUE files.

See other sinks for inspiration or a recent PR here.

Note we have two folders:

  • website/cue/reference/components/sinks/base/keep.cue (like the one you generated here)
  • website/cue/reference/components/sinks

This is useful because it adds doc tags to the sink like "beta" etc.

@talboren

Copy link
Copy Markdown

Hi @sainad2222, thanks for your patience on this PR. I understand we lack some guidance here on adding docs for new components. We are still missing CUE files.

See other sinks for inspiration or a recent PR here.

Note we have two folders:

  • website/cue/reference/components/sinks/base/keep.cue (like the one you generated here)
  • website/cue/reference/components/sinks

This is useful because it adds doc tags to the sink like "beta" etc.

excited to see this PR getting merged 🤩

@sainad2222

Copy link
Copy Markdown
Contributor Author

Hi @pront, my aplogies for missing this earlier. I will add the other cue files too. Btw do you mean the two folders being website/cue/reference/components/sinks/base/keep.cue and website/cue/reference/services/keep.cue(this is missing)?
I'll also try to build the website locally to see if it as expected
Thanks

@sainad2222

Copy link
Copy Markdown
Contributor Author

@pront How do we generate website/cue/reference/components/sinks/keep.cue? I checked Makefile but could only find generate-component-docs. If it's the same command then I don't see any errors too. It's only generating base/keep.cue

website/cue/reference/services/keep.cue (which I wonder if it should have been generated for you)

It also didn't get auto generated for me

@pront

pront commented Jan 21, 2025

Copy link
Copy Markdown
Member

@pront How do we generate website/cue/reference/components/sinks/keep.cue? I checked Makefile but could only find generate-component-docs. If it's the same command then I don't see any errors too. It's only generating base/keep.cue

website/cue/reference/services/keep.cue (which I wonder if it should have been generated for you)

It also didn't get auto generated for me

That needs to be added manually.

@sainad2222

Copy link
Copy Markdown
Contributor Author

I added the file and looks to be fine in website too. I modified the fields based on my understanding and reading about the others. Feel free to modify if something is wrong in the new cue file website/cue/reference/components/sinks/keep.cue. You can review rest of the files too in the meantime

Comment thread website/cue/reference/components/sinks/keep.cue Outdated
Comment thread website/cue/reference/components/sinks/keep.cue Outdated
@sainad2222
sainad2222 requested review from pront and talboren January 22, 2025 03:50
@pront
pront enabled auto-merge January 22, 2025 15:36
auto-merge was automatically disabled January 22, 2025 17:50

Head branch was pushed to by a user without write access

@pront
pront dismissed rtrieu’s stale review January 22, 2025 18:38

review comments were addressed

@pront
pront enabled auto-merge January 22, 2025 18:38
body: """
1. Register for a free account at [platform.keephq.dev](\(urls.keep_platform))

2. Go to providers tab and setup vector as a provider

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
2. Go to providers tab and setup vector as a provider
2. Go to the providers tab and setup vector as a provider

@pront
pront added this pull request to the merge queue Jan 23, 2025
Merged via the queue into vectordotdev:master with commit fd515ea Jan 23, 2025
@talboren

talboren commented Jan 26, 2025

Copy link
Copy Markdown

@rtrieu @pront quick question: we should we be able to see Keep's sink in the website/docs?

@sainad2222

Copy link
Copy Markdown
Contributor Author

@talboren I think it will be available once next release goes out

@pront

pront commented Jan 27, 2025

Copy link
Copy Markdown
Member

@talboren I think it will be available once next release goes out

@sainad2222 is right, the website branch doesn't contain this commit yet.

@sainad2222

Copy link
Copy Markdown
Contributor Author

@talboren Feel free to build website locally for now and make suggestions on documentation. I feel like we should make a "How it works" with examples since we expect specific id in the configuration(prometheus although thinking to rename it to prometheus_alertmanager, so will need to change accordingly at Keep too)

@talboren

talboren commented Feb 1, 2025

Copy link
Copy Markdown

@talboren Feel free to build website locally for now and make suggestions on documentation. I feel like we should make a "How it works" with examples since we expect specific id in the configuration(prometheus although thinking to rename it to prometheus_alertmanager, so will need to change accordingly at Keep too)

Let me know if you want to collaborate on it!

@sainad2222

Copy link
Copy Markdown
Contributor Author

@talboren Feel free to build website locally for now and make suggestions on documentation. I feel like we should make a "How it works" with examples since we expect specific id in the configuration(prometheus although thinking to rename it to prometheus_alertmanager, so will need to change accordingly at Keep too)

Let me know if you want to collaborate on it!

Yes, I can take up the changes needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: external docs Anything related to Vector's external, public documentation domain: sinks Anything related to the Vector's sinks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Keep sink

5 participants