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 OpenObserve as an officially supported sink #21531

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Nextbook
Nextcloud
OVH
Odys
openobserve
Openpeak
Oppo
Ovi
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ sinks-logs = [
"sinks-new_relic",
"sinks-papertrail",
"sinks-pulsar",
"sinks-openobserve",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this used anywhere else.

Copy link
Author

Choose a reason for hiding this comment

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

I was following #21514 (comment). Could you guide me on where to open a PR to be able to be added on https://vector.dev/guides/ ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @chaitanya-sistla, thank you for pointing me to this. That proposal makes sense to me.

Since there is no precedent, let's think about it a bit:

  • wrap an existing sink, hardcode configuration specific to OpenObserve and expose it as a new sink
  • add a guide to the existing http docs, see example here
  • add community guide on how to use it

Overall, I am happy with both options. But if we go with (1), we might need to do a few iterations since there is no precedent. Option (2) is more straightforward to do. For option (3), the guides live in website/content/en/guides.

Also, I would like to cc @jszwedko for awareness.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you @pront I would like to follow the first approach if that is ideal. Does my PR reflect the Option (1)? Please let me know if I have to make any changes.

Copy link
Member

Choose a reason for hiding this comment

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

I think there is precedent for (1). An example would be the recent changes to the Axiom sink: #21362

Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding the CLA, can you try from a different browser or cleaning your cookies? Seems like the Github signin failed for you.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, I opened in other browsers, it doesn't show an option called Agree anywhere and auto redirects me to github once I signed in with my github.

Copy link
Member

Choose a reason for hiding this comment

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

Chaitanya Sistla seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

I think the issue might be that your commits don't have an email address associated. Could you set an email address via git config user.email and the use git rebase to squash and then git commit --amend --reset-author to add an email address to the commits? The email you use should be associated with your GitHub account.

Copy link
Member

Choose a reason for hiding this comment

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

Hello @pront thank you. Yes I did and made the file changes, does this relate? I would love to make changes in addition but since we don't need any changes in type, I just modified the needed files.

The changes here only modify documentation. We need to actually implement another sink to follow existing precedent (i.e. write Rust code). See the axiom sink for an example: https://github.com/vectordotdev/vector/blob/master/src/sinks/axiom.rs. That sink also just wraps the http sink as you would do. Let me know if that is unclear!

Copy link
Author

Choose a reason for hiding this comment

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

Thank you, the cla issue is now resolved. Let me look into this.

"sinks-redis",
"sinks-sematext",
"sinks-socket",
Expand Down
61 changes: 61 additions & 0 deletions website/cue/reference/components/sinks/base/openobserve.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package metadata

base: components: sinks: openobserve: configuration: {
type: "http"
inputs: ["source_or_transform_id"]
uri: {
description: "The OpenObserve endpoint to send data to."
required: true
type: string: examples: ["http://localhost:5080/api/default/default/_json"]
}
method: {
description: "The HTTP method to use for the request."
required: true
type: string: default: "post"
}
auth: {
description: "Authentication for OpenObserve."
required: true
type: object: options: {
strategy: {
description: "The authentication strategy."
required: true
type: string: default: "basic"
}
user: {
description: "The username for basic authentication."
required: true
type: string: examples: ["[email protected]"]
}
password: {
description: "The password for basic authentication."
required: true
type: string: examples: ["your_ingestion_password"]
}
}
}
compression: {
description: "The compression algorithm to use."
required: true
type: string: default: "gzip"
}
encoding: {
codec: {
description: "The encoding format to use for the request body."
required: true
type: string: default: "json"
}
timestamp_format: {
description: "The format for encoding timestamps."
required: true
type: string: default: "rfc3339"
}
}
healthcheck: {
enabled: {
description: "Enables or disables the health check."
required: true
type: bool: default: false
}
}
}
60 changes: 60 additions & 0 deletions website/cue/reference/components/sinks/openobserve.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package metadata

components: sinks: openobserve: {
title: "OpenObserve"

features: {
healthcheck: {
enabled: false
}
send: {
compression: {
enabled: true
default: "gzip"
}
encoding: {
enabled: true
codec: {
enabled: true
default: "json"
}
timestamp_format: {
enabled: true
default: "rfc3339"
}
}
}
}

configuration: {
type: "http"
inputs: ["source_or_transform_id"]
uri: {
description: "The OpenObserve endpoint to send data to."
required: true
type: string: default: "http://localhost:5080/api/default/default/_json"
}
method: {
description: "The HTTP method to use."
required: true
type: string: default: "post"
}
auth: {
strategy: {
description: "The authentication strategy."
required: true
type: string: default: "basic"
}
user: {
description: "The username for basic authentication."
required: true
type: string: default: "[email protected]"
}
password: {
description: "The password for basic authentication."
required: true
type: string: default: "your_ingestion_password"
}
}
}
}
Loading