Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Possibility to use elasticsearch datastreams #164

Open
applike-ss opened this issue Nov 26, 2021 · 4 comments · May be fixed by #165
Open

Possibility to use elasticsearch datastreams #164

applike-ss opened this issue Nov 26, 2021 · 4 comments · May be fixed by #165

Comments

@applike-ss
Copy link

applike-ss commented Nov 26, 2021

We would like to be able to write into an elasticsearch datastream instead of into an index directly.
Is there such a functionality planned or even alread existing?
I couldn't find anything in the Readme.md and couldn't find any other docs.

We are getting this kind of message when trying to write into a datastream:

2021-11-26T09:02:50Z ERR bitnami/blacksmith-sandox/kubernetes-event-exporter-0.11.0/src/github.com/opsgenie/kubernetes-event-exporter/pkg/sinks/elasticsearch.go:144 > Indexing failed: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"illegal_argument_exception","reason":"data stream timestamp field [@timestamp] is missing"}},"status":400}

See: https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-data-stream

@applike-ss applike-ss linked a pull request Nov 26, 2021 that will close this issue
@anannaya
Copy link

@applike-ss Do you have built image?

@applike-ss
Copy link
Author

Yes, i used this dockerfile:

FROM golang:1.17 AS builder

ADD . /app
WORKDIR /app
RUN CGO_ENABLED=0 GOOS=linux GO11MODULE=on go build -mod=vendor -a -o /main .

FROM docker.io/bitnami/kubernetes-event-exporter:0.11.0-debian-10-r0
COPY --from=builder /main /opt/bitnami/kubernetes-event-exporter/bin/kubernetes-event-exporter

@anannaya
Copy link

@applike-ss Thanks for the PR which solved my issue.

@applike-ss
Copy link
Author

Happy to help :-)

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

Successfully merging a pull request may close this issue.

2 participants